Add ListDevicesImages DescribeIpcLiveAddress.

This commit is contained in:
sdk-team
2020-05-13 19:41:49 +08:00
parent 735c64063a
commit 2fd4ebc0a8
17 changed files with 678 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
2020-05-13 Version: 1.36.410
- Add ListDevicesImages DescribeIpcLiveAddress.
- Modify DescribeDevices.
2020-05-13 Version: 1.36.409
- Add ExportTas apis.

View File

@@ -1 +1 @@
1.36.409
1.36.410

View File

@@ -35,12 +35,16 @@ set(reid_public_header_model
include/alibabacloud/reid/model/DescribeHeatMapResult.h
include/alibabacloud/reid/model/DescribeImageUrlsRequest.h
include/alibabacloud/reid/model/DescribeImageUrlsResult.h
include/alibabacloud/reid/model/DescribeIpcLiveAddressRequest.h
include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h
include/alibabacloud/reid/model/DescribeOverviewDataRequest.h
include/alibabacloud/reid/model/DescribeOverviewDataResult.h
include/alibabacloud/reid/model/ImportSpecialPersonnelRequest.h
include/alibabacloud/reid/model/ImportSpecialPersonnelResult.h
include/alibabacloud/reid/model/ListActionDataRequest.h
include/alibabacloud/reid/model/ListActionDataResult.h
include/alibabacloud/reid/model/ListDevicesImagesRequest.h
include/alibabacloud/reid/model/ListDevicesImagesResult.h
include/alibabacloud/reid/model/ListEmapRequest.h
include/alibabacloud/reid/model/ListEmapResult.h
include/alibabacloud/reid/model/ListLocationRequest.h
@@ -70,12 +74,16 @@ set(reid_src
src/model/DescribeHeatMapResult.cc
src/model/DescribeImageUrlsRequest.cc
src/model/DescribeImageUrlsResult.cc
src/model/DescribeIpcLiveAddressRequest.cc
src/model/DescribeIpcLiveAddressResult.cc
src/model/DescribeOverviewDataRequest.cc
src/model/DescribeOverviewDataResult.cc
src/model/ImportSpecialPersonnelRequest.cc
src/model/ImportSpecialPersonnelResult.cc
src/model/ListActionDataRequest.cc
src/model/ListActionDataResult.cc
src/model/ListDevicesImagesRequest.cc
src/model/ListDevicesImagesResult.cc
src/model/ListEmapRequest.cc
src/model/ListEmapResult.cc
src/model/ListLocationRequest.cc

View File

@@ -36,12 +36,16 @@
#include "model/DescribeHeatMapResult.h"
#include "model/DescribeImageUrlsRequest.h"
#include "model/DescribeImageUrlsResult.h"
#include "model/DescribeIpcLiveAddressRequest.h"
#include "model/DescribeIpcLiveAddressResult.h"
#include "model/DescribeOverviewDataRequest.h"
#include "model/DescribeOverviewDataResult.h"
#include "model/ImportSpecialPersonnelRequest.h"
#include "model/ImportSpecialPersonnelResult.h"
#include "model/ListActionDataRequest.h"
#include "model/ListActionDataResult.h"
#include "model/ListDevicesImagesRequest.h"
#include "model/ListDevicesImagesResult.h"
#include "model/ListEmapRequest.h"
#include "model/ListEmapResult.h"
#include "model/ListLocationRequest.h"
@@ -84,6 +88,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeImageUrlsResult> DescribeImageUrlsOutcome;
typedef std::future<DescribeImageUrlsOutcome> DescribeImageUrlsOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeImageUrlsRequest&, const DescribeImageUrlsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeImageUrlsAsyncHandler;
typedef Outcome<Error, Model::DescribeIpcLiveAddressResult> DescribeIpcLiveAddressOutcome;
typedef std::future<DescribeIpcLiveAddressOutcome> DescribeIpcLiveAddressOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeIpcLiveAddressRequest&, const DescribeIpcLiveAddressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeIpcLiveAddressAsyncHandler;
typedef Outcome<Error, Model::DescribeOverviewDataResult> DescribeOverviewDataOutcome;
typedef std::future<DescribeOverviewDataOutcome> DescribeOverviewDataOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeOverviewDataRequest&, const DescribeOverviewDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeOverviewDataAsyncHandler;
@@ -93,6 +100,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListActionDataResult> ListActionDataOutcome;
typedef std::future<ListActionDataOutcome> ListActionDataOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListActionDataRequest&, const ListActionDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListActionDataAsyncHandler;
typedef Outcome<Error, Model::ListDevicesImagesResult> ListDevicesImagesOutcome;
typedef std::future<ListDevicesImagesOutcome> ListDevicesImagesOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListDevicesImagesRequest&, const ListDevicesImagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesImagesAsyncHandler;
typedef Outcome<Error, Model::ListEmapResult> ListEmapOutcome;
typedef std::future<ListEmapOutcome> ListEmapOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListEmapRequest&, const ListEmapOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListEmapAsyncHandler;
@@ -137,6 +147,9 @@ namespace AlibabaCloud
DescribeImageUrlsOutcome describeImageUrls(const Model::DescribeImageUrlsRequest &request)const;
void describeImageUrlsAsync(const Model::DescribeImageUrlsRequest& request, const DescribeImageUrlsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeImageUrlsOutcomeCallable describeImageUrlsCallable(const Model::DescribeImageUrlsRequest& request) const;
DescribeIpcLiveAddressOutcome describeIpcLiveAddress(const Model::DescribeIpcLiveAddressRequest &request)const;
void describeIpcLiveAddressAsync(const Model::DescribeIpcLiveAddressRequest& request, const DescribeIpcLiveAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeIpcLiveAddressOutcomeCallable describeIpcLiveAddressCallable(const Model::DescribeIpcLiveAddressRequest& request) const;
DescribeOverviewDataOutcome describeOverviewData(const Model::DescribeOverviewDataRequest &request)const;
void describeOverviewDataAsync(const Model::DescribeOverviewDataRequest& request, const DescribeOverviewDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeOverviewDataOutcomeCallable describeOverviewDataCallable(const Model::DescribeOverviewDataRequest& request) const;
@@ -146,6 +159,9 @@ namespace AlibabaCloud
ListActionDataOutcome listActionData(const Model::ListActionDataRequest &request)const;
void listActionDataAsync(const Model::ListActionDataRequest& request, const ListActionDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListActionDataOutcomeCallable listActionDataCallable(const Model::ListActionDataRequest& request) const;
ListDevicesImagesOutcome listDevicesImages(const Model::ListDevicesImagesRequest &request)const;
void listDevicesImagesAsync(const Model::ListDevicesImagesRequest& request, const ListDevicesImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDevicesImagesOutcomeCallable listDevicesImagesCallable(const Model::ListDevicesImagesRequest& request) const;
ListEmapOutcome listEmap(const Model::ListEmapRequest &request)const;
void listEmapAsync(const Model::ListEmapRequest& request, const ListEmapAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListEmapOutcomeCallable listEmapCallable(const Model::ListEmapRequest& request) const;

View File

@@ -44,6 +44,7 @@ namespace AlibabaCloud
std::vector<PvStatisticResult::Rect> pvRects;
long locationId;
long processCursor;
std::string pvType;
long pvCount;
long ipcId;
};

View File

@@ -39,8 +39,10 @@ namespace AlibabaCloud
std::string agentIp;
std::string ipcIp;
long ipcReceiveTime;
std::string ipcName;
std::string ipcStatus;
long agentReceiveTime;
long ipcId;
};

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_
#define ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT DescribeIpcLiveAddressRequest : public RpcServiceRequest
{
public:
DescribeIpcLiveAddressRequest();
~DescribeIpcLiveAddressRequest();
long getIpcId()const;
void setIpcId(long ipcId);
long getStoreId()const;
void setStoreId(long storeId);
private:
long ipcId_;
long storeId_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_

View File

@@ -0,0 +1,69 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_
#define ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT DescribeIpcLiveAddressResult : public ServiceResult
{
public:
DescribeIpcLiveAddressResult();
explicit DescribeIpcLiveAddressResult(const std::string &payload);
~DescribeIpcLiveAddressResult();
std::string getMessage()const;
std::string getExpiredTime()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
long getIpcId()const;
std::string getRtmpUrl()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string expiredTime_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string code_;
bool success_;
long ipcId_;
std::string rtmpUrl_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_
#define ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT ListDevicesImagesRequest : public RpcServiceRequest
{
public:
ListDevicesImagesRequest();
~ListDevicesImagesRequest();
std::string getIpcIdList()const;
void setIpcIdList(const std::string& ipcIdList);
long getStoreId()const;
void setStoreId(long storeId);
private:
std::string ipcIdList_;
long storeId_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESRESULT_H_
#define ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT ListDevicesImagesResult : public ServiceResult
{
public:
struct DeviceImage
{
std::string imageUrl;
long ipcId;
};
ListDevicesImagesResult();
explicit ListDevicesImagesResult(const std::string &payload);
~ListDevicesImagesResult();
std::vector<DeviceImage> getDeviceImages()const;
std::string getMessage()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<DeviceImage> deviceImages_;
std::string message_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESRESULT_H_

View File

@@ -31,21 +31,21 @@ ReidClient::ReidClient(const Credentials &credentials, const ClientConfiguration
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
ReidClient::ReidClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
ReidClient::ReidClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
ReidClient::~ReidClient()
@@ -303,6 +303,42 @@ ReidClient::DescribeImageUrlsOutcomeCallable ReidClient::describeImageUrlsCallab
return task->get_future();
}
ReidClient::DescribeIpcLiveAddressOutcome ReidClient::describeIpcLiveAddress(const DescribeIpcLiveAddressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeIpcLiveAddressOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeIpcLiveAddressOutcome(DescribeIpcLiveAddressResult(outcome.result()));
else
return DescribeIpcLiveAddressOutcome(outcome.error());
}
void ReidClient::describeIpcLiveAddressAsync(const DescribeIpcLiveAddressRequest& request, const DescribeIpcLiveAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeIpcLiveAddress(request), context);
};
asyncExecute(new Runnable(fn));
}
ReidClient::DescribeIpcLiveAddressOutcomeCallable ReidClient::describeIpcLiveAddressCallable(const DescribeIpcLiveAddressRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeIpcLiveAddressOutcome()>>(
[this, request]()
{
return this->describeIpcLiveAddress(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ReidClient::DescribeOverviewDataOutcome ReidClient::describeOverviewData(const DescribeOverviewDataRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -411,6 +447,42 @@ ReidClient::ListActionDataOutcomeCallable ReidClient::listActionDataCallable(con
return task->get_future();
}
ReidClient::ListDevicesImagesOutcome ReidClient::listDevicesImages(const ListDevicesImagesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDevicesImagesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDevicesImagesOutcome(ListDevicesImagesResult(outcome.result()));
else
return ListDevicesImagesOutcome(outcome.error());
}
void ReidClient::listDevicesImagesAsync(const ListDevicesImagesRequest& request, const ListDevicesImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDevicesImages(request), context);
};
asyncExecute(new Runnable(fn));
}
ReidClient::ListDevicesImagesOutcomeCallable ReidClient::listDevicesImagesCallable(const ListDevicesImagesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDevicesImagesOutcome()>>(
[this, request]()
{
return this->listDevicesImages(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ReidClient::ListEmapOutcome ReidClient::listEmap(const ListEmapRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -51,6 +51,8 @@ void DescribeCameraStatisticsResult::parse(const std::string &payload)
pvStatisticResultsObject.pvCount = std::stol(valuePvStatisticResultsPvStatisticResult["PvCount"].asString());
if(!valuePvStatisticResultsPvStatisticResult["LocationId"].isNull())
pvStatisticResultsObject.locationId = std::stol(valuePvStatisticResultsPvStatisticResult["LocationId"].asString());
if(!valuePvStatisticResultsPvStatisticResult["PvType"].isNull())
pvStatisticResultsObject.pvType = valuePvStatisticResultsPvStatisticResult["PvType"].asString();
auto allPvRectsNode = allPvStatisticResultsNode["PvRects"]["Rect"];
for (auto allPvStatisticResultsNodePvRectsRect : allPvRectsNode)
{

View File

@@ -57,6 +57,10 @@ void DescribeDevicesResult::parse(const std::string &payload)
devicesObject.agentMac = valueDevicesDevice["AgentMac"].asString();
if(!valueDevicesDevice["IpcReceiveTime"].isNull())
devicesObject.ipcReceiveTime = std::stol(valueDevicesDevice["IpcReceiveTime"].asString());
if(!valueDevicesDevice["IpcId"].isNull())
devicesObject.ipcId = std::stol(valueDevicesDevice["IpcId"].asString());
if(!valueDevicesDevice["IpcName"].isNull())
devicesObject.ipcName = valueDevicesDevice["IpcName"].asString();
devices_.push_back(devicesObject);
}
if(!value["ErrorCode"].isNull())

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/reid/model/DescribeIpcLiveAddressRequest.h>
using AlibabaCloud::Reid::Model::DescribeIpcLiveAddressRequest;
DescribeIpcLiveAddressRequest::DescribeIpcLiveAddressRequest() :
RpcServiceRequest("reid", "2019-09-28", "DescribeIpcLiveAddress")
{
setMethod(HttpRequest::Method::Post);
}
DescribeIpcLiveAddressRequest::~DescribeIpcLiveAddressRequest()
{}
long DescribeIpcLiveAddressRequest::getIpcId()const
{
return ipcId_;
}
void DescribeIpcLiveAddressRequest::setIpcId(long ipcId)
{
ipcId_ = ipcId;
setBodyParameter("IpcId", std::to_string(ipcId));
}
long DescribeIpcLiveAddressRequest::getStoreId()const
{
return storeId_;
}
void DescribeIpcLiveAddressRequest::setStoreId(long storeId)
{
storeId_ = storeId;
setBodyParameter("StoreId", std::to_string(storeId));
}

View File

@@ -0,0 +1,114 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/reid/model/DescribeIpcLiveAddressResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Reid;
using namespace AlibabaCloud::Reid::Model;
DescribeIpcLiveAddressResult::DescribeIpcLiveAddressResult() :
ServiceResult()
{}
DescribeIpcLiveAddressResult::DescribeIpcLiveAddressResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeIpcLiveAddressResult::~DescribeIpcLiveAddressResult()
{}
void DescribeIpcLiveAddressResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["RtmpUrl"].isNull())
rtmpUrl_ = value["RtmpUrl"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ExpiredTime"].isNull())
expiredTime_ = value["ExpiredTime"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["IpcId"].isNull())
ipcId_ = std::stol(value["IpcId"].asString());
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::string DescribeIpcLiveAddressResult::getMessage()const
{
return message_;
}
std::string DescribeIpcLiveAddressResult::getExpiredTime()const
{
return expiredTime_;
}
std::string DescribeIpcLiveAddressResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string DescribeIpcLiveAddressResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeIpcLiveAddressResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string DescribeIpcLiveAddressResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DescribeIpcLiveAddressResult::getCode()const
{
return code_;
}
bool DescribeIpcLiveAddressResult::getSuccess()const
{
return success_;
}
long DescribeIpcLiveAddressResult::getIpcId()const
{
return ipcId_;
}
std::string DescribeIpcLiveAddressResult::getRtmpUrl()const
{
return rtmpUrl_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/reid/model/ListDevicesImagesRequest.h>
using AlibabaCloud::Reid::Model::ListDevicesImagesRequest;
ListDevicesImagesRequest::ListDevicesImagesRequest() :
RpcServiceRequest("reid", "2019-09-28", "ListDevicesImages")
{
setMethod(HttpRequest::Method::Post);
}
ListDevicesImagesRequest::~ListDevicesImagesRequest()
{}
std::string ListDevicesImagesRequest::getIpcIdList()const
{
return ipcIdList_;
}
void ListDevicesImagesRequest::setIpcIdList(const std::string& ipcIdList)
{
ipcIdList_ = ipcIdList;
setBodyParameter("IpcIdList", ipcIdList);
}
long ListDevicesImagesRequest::getStoreId()const
{
return storeId_;
}
void ListDevicesImagesRequest::setStoreId(long storeId)
{
storeId_ = storeId;
setBodyParameter("StoreId", std::to_string(storeId));
}

View File

@@ -0,0 +1,108 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/reid/model/ListDevicesImagesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Reid;
using namespace AlibabaCloud::Reid::Model;
ListDevicesImagesResult::ListDevicesImagesResult() :
ServiceResult()
{}
ListDevicesImagesResult::ListDevicesImagesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDevicesImagesResult::~ListDevicesImagesResult()
{}
void ListDevicesImagesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDeviceImagesNode = value["DeviceImages"]["DeviceImage"];
for (auto valueDeviceImagesDeviceImage : allDeviceImagesNode)
{
DeviceImage deviceImagesObject;
if(!valueDeviceImagesDeviceImage["IpcId"].isNull())
deviceImagesObject.ipcId = std::stol(valueDeviceImagesDeviceImage["IpcId"].asString());
if(!valueDeviceImagesDeviceImage["ImageUrl"].isNull())
deviceImagesObject.imageUrl = valueDeviceImagesDeviceImage["ImageUrl"].asString();
deviceImages_.push_back(deviceImagesObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::vector<ListDevicesImagesResult::DeviceImage> ListDevicesImagesResult::getDeviceImages()const
{
return deviceImages_;
}
std::string ListDevicesImagesResult::getMessage()const
{
return message_;
}
std::string ListDevicesImagesResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListDevicesImagesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListDevicesImagesResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListDevicesImagesResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ListDevicesImagesResult::getCode()const
{
return code_;
}
bool ListDevicesImagesResult::getSuccess()const
{
return success_;
}