Add source picture url for Monitor.

This commit is contained in:
sdk-team
2020-08-03 17:40:57 +08:00
parent 60539f067e
commit 48a3320ae9
27 changed files with 1678 additions and 1 deletions

View File

@@ -447,6 +447,42 @@ VcsClient::GetBodyOptionsOutcomeCallable VcsClient::getBodyOptionsCallable(const
return task->get_future();
}
VcsClient::GetDeviceConfigOutcome VcsClient::getDeviceConfig(const GetDeviceConfigRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetDeviceConfigOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetDeviceConfigOutcome(GetDeviceConfigResult(outcome.result()));
else
return GetDeviceConfigOutcome(outcome.error());
}
void VcsClient::getDeviceConfigAsync(const GetDeviceConfigRequest& request, const GetDeviceConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getDeviceConfig(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::GetDeviceConfigOutcomeCallable VcsClient::getDeviceConfigCallable(const GetDeviceConfigRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetDeviceConfigOutcome()>>(
[this, request]()
{
return this->getDeviceConfig(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::GetDeviceLiveUrlOutcome VcsClient::getDeviceLiveUrl(const GetDeviceLiveUrlRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -735,6 +771,42 @@ VcsClient::GetVideoSummaryTaskResultOutcomeCallable VcsClient::getVideoSummaryTa
return task->get_future();
}
VcsClient::InvokeMotorModelOutcome VcsClient::invokeMotorModel(const InvokeMotorModelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InvokeMotorModelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InvokeMotorModelOutcome(InvokeMotorModelResult(outcome.result()));
else
return InvokeMotorModelOutcome(outcome.error());
}
void VcsClient::invokeMotorModelAsync(const InvokeMotorModelRequest& request, const InvokeMotorModelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, invokeMotorModel(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::InvokeMotorModelOutcomeCallable VcsClient::invokeMotorModelCallable(const InvokeMotorModelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InvokeMotorModelOutcome()>>(
[this, request]()
{
return this->invokeMotorModel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListBodyAlgorithmResultsOutcome VcsClient::listBodyAlgorithmResults(const ListBodyAlgorithmResultsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1095,6 +1167,78 @@ VcsClient::RecognizeImageOutcomeCallable VcsClient::recognizeImageCallable(const
return task->get_future();
}
VcsClient::RegisterDeviceOutcome VcsClient::registerDevice(const RegisterDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RegisterDeviceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RegisterDeviceOutcome(RegisterDeviceResult(outcome.result()));
else
return RegisterDeviceOutcome(outcome.error());
}
void VcsClient::registerDeviceAsync(const RegisterDeviceRequest& request, const RegisterDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, registerDevice(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::RegisterDeviceOutcomeCallable VcsClient::registerDeviceCallable(const RegisterDeviceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RegisterDeviceOutcome()>>(
[this, request]()
{
return this->registerDevice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ReportDeviceCapacityOutcome VcsClient::reportDeviceCapacity(const ReportDeviceCapacityRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReportDeviceCapacityOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReportDeviceCapacityOutcome(ReportDeviceCapacityResult(outcome.result()));
else
return ReportDeviceCapacityOutcome(outcome.error());
}
void VcsClient::reportDeviceCapacityAsync(const ReportDeviceCapacityRequest& request, const ReportDeviceCapacityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, reportDeviceCapacity(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ReportDeviceCapacityOutcomeCallable VcsClient::reportDeviceCapacityCallable(const ReportDeviceCapacityRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReportDeviceCapacityOutcome()>>(
[this, request]()
{
return this->reportDeviceCapacity(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::SaveVideoSummaryTaskVideoOutcome VcsClient::saveVideoSummaryTaskVideo(const SaveVideoSummaryTaskVideoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1239,6 +1383,42 @@ VcsClient::StopMonitorOutcomeCallable VcsClient::stopMonitorCallable(const StopM
return task->get_future();
}
VcsClient::SyncDeviceTimeOutcome VcsClient::syncDeviceTime(const SyncDeviceTimeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SyncDeviceTimeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SyncDeviceTimeOutcome(SyncDeviceTimeResult(outcome.result()));
else
return SyncDeviceTimeOutcome(outcome.error());
}
void VcsClient::syncDeviceTimeAsync(const SyncDeviceTimeRequest& request, const SyncDeviceTimeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, syncDeviceTime(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::SyncDeviceTimeOutcomeCallable VcsClient::syncDeviceTimeCallable(const SyncDeviceTimeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SyncDeviceTimeOutcome()>>(
[this, request]()
{
return this->syncDeviceTime(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::UpdateCorpOutcome VcsClient::updateCorp(const UpdateCorpRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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/vcs/model/GetDeviceConfigRequest.h>
using AlibabaCloud::Vcs::Model::GetDeviceConfigRequest;
GetDeviceConfigRequest::GetDeviceConfigRequest() :
RpcServiceRequest("vcs", "2020-05-15", "GetDeviceConfig")
{
setMethod(HttpRequest::Method::Post);
}
GetDeviceConfigRequest::~GetDeviceConfigRequest()
{}
std::string GetDeviceConfigRequest::getDeviceTimeStamp()const
{
return deviceTimeStamp_;
}
void GetDeviceConfigRequest::setDeviceTimeStamp(const std::string& deviceTimeStamp)
{
deviceTimeStamp_ = deviceTimeStamp;
setBodyParameter("DeviceTimeStamp", deviceTimeStamp);
}
std::string GetDeviceConfigRequest::getDeviceSn()const
{
return deviceSn_;
}
void GetDeviceConfigRequest::setDeviceSn(const std::string& deviceSn)
{
deviceSn_ = deviceSn;
setBodyParameter("DeviceSn", deviceSn);
}

View File

@@ -0,0 +1,187 @@
/*
* 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/vcs/model/GetDeviceConfigResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
GetDeviceConfigResult::GetDeviceConfigResult() :
ServiceResult()
{}
GetDeviceConfigResult::GetDeviceConfigResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDeviceConfigResult::~GetDeviceConfigResult()
{}
void GetDeviceConfigResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allOSDListNode = value["OSDList"]["OSDListItem"];
for (auto valueOSDListOSDListItem : allOSDListNode)
{
OSDListItem oSDListObject;
if(!valueOSDListOSDListItem["Text"].isNull())
oSDListObject.text = valueOSDListOSDListItem["Text"].asString();
if(!valueOSDListOSDListItem["LeftTopX"].isNull())
oSDListObject.leftTopX = valueOSDListOSDListItem["LeftTopX"].asString();
if(!valueOSDListOSDListItem["LeftTopY"].isNull())
oSDListObject.leftTopY = valueOSDListOSDListItem["LeftTopY"].asString();
oSDList_.push_back(oSDListObject);
}
if(!value["AudioEnable"].isNull())
audioEnable_ = value["AudioEnable"].asString() == "true";
if(!value["AudioFormat"].isNull())
audioFormat_ = value["AudioFormat"].asString();
if(!value["BitRate"].isNull())
bitRate_ = value["BitRate"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["DeviceAddress"].isNull())
deviceAddress_ = value["DeviceAddress"].asString();
if(!value["DeviceName"].isNull())
deviceName_ = value["DeviceName"].asString();
if(!value["EncodeFormat"].isNull())
encodeFormat_ = value["EncodeFormat"].asString();
if(!value["FrameRate"].isNull())
frameRate_ = value["FrameRate"].asString();
if(!value["GovLength"].isNull())
govLength_ = std::stoi(value["GovLength"].asString());
if(!value["Latitude"].isNull())
latitude_ = value["Latitude"].asString();
if(!value["Longitude"].isNull())
longitude_ = value["Longitude"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["OSDTimeEnable"].isNull())
oSDTimeEnable_ = value["OSDTimeEnable"].asString();
if(!value["OSDTimeType"].isNull())
oSDTimeType_ = value["OSDTimeType"].asString();
if(!value["OSDTimeX"].isNull())
oSDTimeX_ = value["OSDTimeX"].asString();
if(!value["OSDTimeY"].isNull())
oSDTimeY_ = value["OSDTimeY"].asString();
if(!value["Resolution"].isNull())
resolution_ = value["Resolution"].asString();
if(!value["RetryInterval"].isNull())
retryInterval_ = value["RetryInterval"].asString();
}
std::string GetDeviceConfigResult::getFrameRate()const
{
return frameRate_;
}
std::string GetDeviceConfigResult::getEncodeFormat()const
{
return encodeFormat_;
}
std::string GetDeviceConfigResult::getMessage()const
{
return message_;
}
std::string GetDeviceConfigResult::getLatitude()const
{
return latitude_;
}
std::string GetDeviceConfigResult::getCode()const
{
return code_;
}
std::string GetDeviceConfigResult::getLongitude()const
{
return longitude_;
}
std::vector<GetDeviceConfigResult::OSDListItem> GetDeviceConfigResult::getOSDList()const
{
return oSDList_;
}
std::string GetDeviceConfigResult::getOSDTimeY()const
{
return oSDTimeY_;
}
std::string GetDeviceConfigResult::getOSDTimeEnable()const
{
return oSDTimeEnable_;
}
std::string GetDeviceConfigResult::getDeviceAddress()const
{
return deviceAddress_;
}
std::string GetDeviceConfigResult::getOSDTimeX()const
{
return oSDTimeX_;
}
int GetDeviceConfigResult::getGovLength()const
{
return govLength_;
}
std::string GetDeviceConfigResult::getRetryInterval()const
{
return retryInterval_;
}
std::string GetDeviceConfigResult::getAudioFormat()const
{
return audioFormat_;
}
std::string GetDeviceConfigResult::getBitRate()const
{
return bitRate_;
}
bool GetDeviceConfigResult::getAudioEnable()const
{
return audioEnable_;
}
std::string GetDeviceConfigResult::getDeviceName()const
{
return deviceName_;
}
std::string GetDeviceConfigResult::getOSDTimeType()const
{
return oSDTimeType_;
}
std::string GetDeviceConfigResult::getResolution()const
{
return resolution_;
}

View File

@@ -64,6 +64,8 @@ void GetMonitorResultResult::parse(const std::string &payload)
recordsItemObject.shotTime = dataNodeRecordsRecordsItem["ShotTime"].asString();
if(!dataNodeRecordsRecordsItem["MonitorPicUrl"].isNull())
recordsItemObject.monitorPicUrl = dataNodeRecordsRecordsItem["MonitorPicUrl"].asString();
if(!dataNodeRecordsRecordsItem["TargetPicUrl"].isNull())
recordsItemObject.targetPicUrl = dataNodeRecordsRecordsItem["TargetPicUrl"].asString();
data_.records.push_back(recordsItemObject);
}
if(!value["Code"].isNull())

View File

@@ -0,0 +1,62 @@
/*
* 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/vcs/model/InvokeMotorModelRequest.h>
using AlibabaCloud::Vcs::Model::InvokeMotorModelRequest;
InvokeMotorModelRequest::InvokeMotorModelRequest() :
RpcServiceRequest("vcs", "2020-05-15", "InvokeMotorModel")
{
setMethod(HttpRequest::Method::Post);
}
InvokeMotorModelRequest::~InvokeMotorModelRequest()
{}
std::string InvokeMotorModelRequest::getPicPath()const
{
return picPath_;
}
void InvokeMotorModelRequest::setPicPath(const std::string& picPath)
{
picPath_ = picPath;
setBodyParameter("PicPath", picPath);
}
std::string InvokeMotorModelRequest::getCorpId()const
{
return corpId_;
}
void InvokeMotorModelRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string InvokeMotorModelRequest::getPicId()const
{
return picId_;
}
void InvokeMotorModelRequest::setPicId(const std::string& picId)
{
picId_ = picId;
setBodyParameter("PicId", picId);
}

View File

@@ -0,0 +1,66 @@
/*
* 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/vcs/model/InvokeMotorModelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
InvokeMotorModelResult::InvokeMotorModelResult() :
ServiceResult()
{}
InvokeMotorModelResult::InvokeMotorModelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InvokeMotorModelResult::~InvokeMotorModelResult()
{}
void InvokeMotorModelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["StructList"].isNull())
data_.structList = dataNode["StructList"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string InvokeMotorModelResult::getMessage()const
{
return message_;
}
InvokeMotorModelResult::Data InvokeMotorModelResult::getData()const
{
return data_;
}
std::string InvokeMotorModelResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/vcs/model/RegisterDeviceRequest.h>
using AlibabaCloud::Vcs::Model::RegisterDeviceRequest;
RegisterDeviceRequest::RegisterDeviceRequest() :
RpcServiceRequest("vcs", "2020-05-15", "RegisterDevice")
{
setMethod(HttpRequest::Method::Post);
}
RegisterDeviceRequest::~RegisterDeviceRequest()
{}
std::string RegisterDeviceRequest::getDeviceTimeStamp()const
{
return deviceTimeStamp_;
}
void RegisterDeviceRequest::setDeviceTimeStamp(const std::string& deviceTimeStamp)
{
deviceTimeStamp_ = deviceTimeStamp;
setBodyParameter("DeviceTimeStamp", deviceTimeStamp);
}
std::string RegisterDeviceRequest::getDeviceId()const
{
return deviceId_;
}
void RegisterDeviceRequest::setDeviceId(const std::string& deviceId)
{
deviceId_ = deviceId;
setBodyParameter("DeviceId", deviceId);
}
std::string RegisterDeviceRequest::getServerId()const
{
return serverId_;
}
void RegisterDeviceRequest::setServerId(const std::string& serverId)
{
serverId_ = serverId;
setBodyParameter("ServerId", serverId);
}
std::string RegisterDeviceRequest::getDeviceSerialNumber()const
{
return deviceSerialNumber_;
}
void RegisterDeviceRequest::setDeviceSerialNumber(const std::string& deviceSerialNumber)
{
deviceSerialNumber_ = deviceSerialNumber;
setBodyParameter("DeviceSerialNumber", deviceSerialNumber);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/vcs/model/RegisterDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
RegisterDeviceResult::RegisterDeviceResult() :
ServiceResult()
{}
RegisterDeviceResult::RegisterDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RegisterDeviceResult::~RegisterDeviceResult()
{}
void RegisterDeviceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["RetryInterval"].isNull())
retryInterval_ = value["RetryInterval"].asString();
}
std::string RegisterDeviceResult::getMessage()const
{
return message_;
}
std::string RegisterDeviceResult::getRetryInterval()const
{
return retryInterval_;
}
std::string RegisterDeviceResult::getCode()const
{
return code_;
}

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/vcs/model/ReportDeviceCapacityRequest.h>
using AlibabaCloud::Vcs::Model::ReportDeviceCapacityRequest;
ReportDeviceCapacityRequest::ReportDeviceCapacityRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ReportDeviceCapacity")
{
setMethod(HttpRequest::Method::Post);
}
ReportDeviceCapacityRequest::~ReportDeviceCapacityRequest()
{}
std::vector<ReportDeviceCapacityRequest::StreamCapacities> ReportDeviceCapacityRequest::getStreamCapacities()const
{
return streamCapacities_;
}
void ReportDeviceCapacityRequest::setStreamCapacities(const std::vector<StreamCapacities>& streamCapacities)
{
streamCapacities_ = streamCapacities;
for(int dep1 = 0; dep1!= streamCapacities.size(); dep1++) {
auto streamCapacitiesObj = streamCapacities.at(dep1);
std::string streamCapacitiesObjStr = "StreamCapacities." + std::to_string(dep1 + 1);
setParameter(streamCapacitiesObjStr + ".BitrateRange", streamCapacitiesObj.bitrateRange);
setParameter(streamCapacitiesObjStr + ".MaxStream", streamCapacitiesObj.maxStream);
setParameter(streamCapacitiesObjStr + ".EncodeFormat", streamCapacitiesObj.encodeFormat);
setParameter(streamCapacitiesObjStr + ".MaxFrameRate", streamCapacitiesObj.maxFrameRate);
setParameter(streamCapacitiesObjStr + ".Resolution", streamCapacitiesObj.resolution);
}
}
std::string ReportDeviceCapacityRequest::getLatitude()const
{
return latitude_;
}
void ReportDeviceCapacityRequest::setLatitude(const std::string& latitude)
{
latitude_ = latitude;
setBodyParameter("Latitude", latitude);
}
std::string ReportDeviceCapacityRequest::getPresetNum()const
{
return presetNum_;
}
void ReportDeviceCapacityRequest::setPresetNum(const std::string& presetNum)
{
presetNum_ = presetNum;
setBodyParameter("PresetNum", presetNum);
}
std::string ReportDeviceCapacityRequest::getDeviceSn()const
{
return deviceSn_;
}
void ReportDeviceCapacityRequest::setDeviceSn(const std::string& deviceSn)
{
deviceSn_ = deviceSn;
setBodyParameter("DeviceSn", deviceSn);
}
std::string ReportDeviceCapacityRequest::getAudioFormat()const
{
return audioFormat_;
}
void ReportDeviceCapacityRequest::setAudioFormat(const std::string& audioFormat)
{
audioFormat_ = audioFormat;
setBodyParameter("AudioFormat", audioFormat);
}
std::string ReportDeviceCapacityRequest::getPTZCapacity()const
{
return pTZCapacity_;
}
void ReportDeviceCapacityRequest::setPTZCapacity(const std::string& pTZCapacity)
{
pTZCapacity_ = pTZCapacity;
setBodyParameter("PTZCapacity", pTZCapacity);
}
std::string ReportDeviceCapacityRequest::getLongitude()const
{
return longitude_;
}
void ReportDeviceCapacityRequest::setLongitude(const std::string& longitude)
{
longitude_ = longitude;
setBodyParameter("Longitude", longitude);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/vcs/model/ReportDeviceCapacityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ReportDeviceCapacityResult::ReportDeviceCapacityResult() :
ServiceResult()
{}
ReportDeviceCapacityResult::ReportDeviceCapacityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ReportDeviceCapacityResult::~ReportDeviceCapacityResult()
{}
void ReportDeviceCapacityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["RetryInterval"].isNull())
retryInterval_ = value["RetryInterval"].asString();
}
std::string ReportDeviceCapacityResult::getMessage()const
{
return message_;
}
std::string ReportDeviceCapacityResult::getRetryInterval()const
{
return retryInterval_;
}
std::string ReportDeviceCapacityResult::getCode()const
{
return code_;
}

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/vcs/model/SyncDeviceTimeRequest.h>
using AlibabaCloud::Vcs::Model::SyncDeviceTimeRequest;
SyncDeviceTimeRequest::SyncDeviceTimeRequest() :
RpcServiceRequest("vcs", "2020-05-15", "SyncDeviceTime")
{
setMethod(HttpRequest::Method::Post);
}
SyncDeviceTimeRequest::~SyncDeviceTimeRequest()
{}
std::string SyncDeviceTimeRequest::getDeviceTimeStamp()const
{
return deviceTimeStamp_;
}
void SyncDeviceTimeRequest::setDeviceTimeStamp(const std::string& deviceTimeStamp)
{
deviceTimeStamp_ = deviceTimeStamp;
setBodyParameter("DeviceTimeStamp", deviceTimeStamp);
}
std::string SyncDeviceTimeRequest::getDeviceSn()const
{
return deviceSn_;
}
void SyncDeviceTimeRequest::setDeviceSn(const std::string& deviceSn)
{
deviceSn_ = deviceSn;
setBodyParameter("DeviceSn", deviceSn);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/vcs/model/SyncDeviceTimeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
SyncDeviceTimeResult::SyncDeviceTimeResult() :
ServiceResult()
{}
SyncDeviceTimeResult::SyncDeviceTimeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SyncDeviceTimeResult::~SyncDeviceTimeResult()
{}
void SyncDeviceTimeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["NTPServer"].isNull())
nTPServer_ = value["NTPServer"].asString();
if(!value["RetryInterval"].isNull())
retryInterval_ = value["RetryInterval"].asString();
if(!value["SyncInterval"].isNull())
syncInterval_ = value["SyncInterval"].asString();
if(!value["TimeStamp"].isNull())
timeStamp_ = value["TimeStamp"].asString();
}
std::string SyncDeviceTimeResult::getSyncInterval()const
{
return syncInterval_;
}
std::string SyncDeviceTimeResult::getMessage()const
{
return message_;
}
std::string SyncDeviceTimeResult::getNTPServer()const
{
return nTPServer_;
}
std::string SyncDeviceTimeResult::getRetryInterval()const
{
return retryInterval_;
}
std::string SyncDeviceTimeResult::getCode()const
{
return code_;
}
std::string SyncDeviceTimeResult::getTimeStamp()const
{
return timeStamp_;
}