Open API publish.
This commit is contained in:
139
vcs/src/model/AddDeviceRequest.cc
Normal file
139
vcs/src/model/AddDeviceRequest.cc
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* 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/AddDeviceRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::AddDeviceRequest;
|
||||
|
||||
AddDeviceRequest::AddDeviceRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "AddDevice")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddDeviceRequest::~AddDeviceRequest()
|
||||
{}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceSite()const
|
||||
{
|
||||
return deviceSite_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceSite(const std::string& deviceSite)
|
||||
{
|
||||
deviceSite_ = deviceSite;
|
||||
setBodyParameter("DeviceSite", deviceSite);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceDirection()const
|
||||
{
|
||||
return deviceDirection_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceDirection(const std::string& deviceDirection)
|
||||
{
|
||||
deviceDirection_ = deviceDirection;
|
||||
setBodyParameter("DeviceDirection", deviceDirection);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceRate()const
|
||||
{
|
||||
return deviceRate_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceRate(const std::string& deviceRate)
|
||||
{
|
||||
deviceRate_ = deviceRate;
|
||||
setBodyParameter("DeviceRate", deviceRate);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceAddress()const
|
||||
{
|
||||
return deviceAddress_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceAddress(const std::string& deviceAddress)
|
||||
{
|
||||
deviceAddress_ = deviceAddress;
|
||||
setBodyParameter("DeviceAddress", deviceAddress);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceType()const
|
||||
{
|
||||
return deviceType_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceType(const std::string& deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setBodyParameter("DeviceType", deviceType);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceResolution()const
|
||||
{
|
||||
return deviceResolution_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceResolution(const std::string& deviceResolution)
|
||||
{
|
||||
deviceResolution_ = deviceResolution;
|
||||
setBodyParameter("DeviceResolution", deviceResolution);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getVendor()const
|
||||
{
|
||||
return vendor_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setVendor(const std::string& vendor)
|
||||
{
|
||||
vendor_ = vendor;
|
||||
setBodyParameter("Vendor", vendor);
|
||||
}
|
||||
|
||||
std::string AddDeviceRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void AddDeviceRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setBodyParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
65
vcs/src/model/AddDeviceResult.cc
Normal file
65
vcs/src/model/AddDeviceResult.cc
Normal 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/AddDeviceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
AddDeviceResult::AddDeviceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddDeviceResult::AddDeviceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddDeviceResult::~AddDeviceResult()
|
||||
{}
|
||||
|
||||
void AddDeviceResult::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["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AddDeviceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string AddDeviceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string AddDeviceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
73
vcs/src/model/CreateCorpRequest.cc
Normal file
73
vcs/src/model/CreateCorpRequest.cc
Normal 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/CreateCorpRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::CreateCorpRequest;
|
||||
|
||||
CreateCorpRequest::CreateCorpRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "CreateCorp")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCorpRequest::~CreateCorpRequest()
|
||||
{}
|
||||
|
||||
std::string CreateCorpRequest::getParentCorpId()const
|
||||
{
|
||||
return parentCorpId_;
|
||||
}
|
||||
|
||||
void CreateCorpRequest::setParentCorpId(const std::string& parentCorpId)
|
||||
{
|
||||
parentCorpId_ = parentCorpId;
|
||||
setBodyParameter("ParentCorpId", parentCorpId);
|
||||
}
|
||||
|
||||
std::string CreateCorpRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateCorpRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setBodyParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateCorpRequest::getAppName()const
|
||||
{
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void CreateCorpRequest::setAppName(const std::string& appName)
|
||||
{
|
||||
appName_ = appName;
|
||||
setBodyParameter("AppName", appName);
|
||||
}
|
||||
|
||||
std::string CreateCorpRequest::getCorpName()const
|
||||
{
|
||||
return corpName_;
|
||||
}
|
||||
|
||||
void CreateCorpRequest::setCorpName(const std::string& corpName)
|
||||
{
|
||||
corpName_ = corpName;
|
||||
setBodyParameter("CorpName", corpName);
|
||||
}
|
||||
|
||||
65
vcs/src/model/CreateCorpResult.cc
Normal file
65
vcs/src/model/CreateCorpResult.cc
Normal 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/CreateCorpResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
CreateCorpResult::CreateCorpResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCorpResult::CreateCorpResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCorpResult::~CreateCorpResult()
|
||||
{}
|
||||
|
||||
void CreateCorpResult::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["CorpId"].isNull())
|
||||
corpId_ = value["CorpId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCorpResult::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
std::string CreateCorpResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CreateCorpResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
51
vcs/src/model/DeleteDeviceRequest.cc
Normal file
51
vcs/src/model/DeleteDeviceRequest.cc
Normal 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/DeleteDeviceRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::DeleteDeviceRequest;
|
||||
|
||||
DeleteDeviceRequest::DeleteDeviceRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "DeleteDevice")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteDeviceRequest::~DeleteDeviceRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDeviceRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
65
vcs/src/model/DeleteDeviceResult.cc
Normal file
65
vcs/src/model/DeleteDeviceResult.cc
Normal 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/DeleteDeviceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
DeleteDeviceResult::DeleteDeviceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDeviceResult::DeleteDeviceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDeviceResult::~DeleteDeviceResult()
|
||||
{}
|
||||
|
||||
void DeleteDeviceResult::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["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteDeviceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DeleteDeviceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string DeleteDeviceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
62
vcs/src/model/GetDeviceLiveUrlRequest.cc
Normal file
62
vcs/src/model/GetDeviceLiveUrlRequest.cc
Normal 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/GetDeviceLiveUrlRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::GetDeviceLiveUrlRequest;
|
||||
|
||||
GetDeviceLiveUrlRequest::GetDeviceLiveUrlRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "GetDeviceLiveUrl")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDeviceLiveUrlRequest::~GetDeviceLiveUrlRequest()
|
||||
{}
|
||||
|
||||
std::string GetDeviceLiveUrlRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void GetDeviceLiveUrlRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string GetDeviceLiveUrlRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void GetDeviceLiveUrlRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
long GetDeviceLiveUrlRequest::getDeviceId()const
|
||||
{
|
||||
return deviceId_;
|
||||
}
|
||||
|
||||
void GetDeviceLiveUrlRequest::setDeviceId(long deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setBodyParameter("DeviceId", std::to_string(deviceId));
|
||||
}
|
||||
|
||||
65
vcs/src/model/GetDeviceLiveUrlResult.cc
Normal file
65
vcs/src/model/GetDeviceLiveUrlResult.cc
Normal 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/GetDeviceLiveUrlResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
GetDeviceLiveUrlResult::GetDeviceLiveUrlResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDeviceLiveUrlResult::GetDeviceLiveUrlResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDeviceLiveUrlResult::~GetDeviceLiveUrlResult()
|
||||
{}
|
||||
|
||||
void GetDeviceLiveUrlResult::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["Url"].isNull())
|
||||
url_ = value["Url"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetDeviceLiveUrlResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetDeviceLiveUrlResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
std::string GetDeviceLiveUrlResult::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
40
vcs/src/model/GetInventoryRequest.cc
Normal file
40
vcs/src/model/GetInventoryRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/GetInventoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::GetInventoryRequest;
|
||||
|
||||
GetInventoryRequest::GetInventoryRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "GetInventory")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetInventoryRequest::~GetInventoryRequest()
|
||||
{}
|
||||
|
||||
std::string GetInventoryRequest::getCommodityCode()const
|
||||
{
|
||||
return commodityCode_;
|
||||
}
|
||||
|
||||
void GetInventoryRequest::setCommodityCode(const std::string& commodityCode)
|
||||
{
|
||||
commodityCode_ = commodityCode;
|
||||
setBodyParameter("CommodityCode", commodityCode);
|
||||
}
|
||||
|
||||
77
vcs/src/model/GetInventoryResult.cc
Normal file
77
vcs/src/model/GetInventoryResult.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/GetInventoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
GetInventoryResult::GetInventoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetInventoryResult::GetInventoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetInventoryResult::~GetInventoryResult()
|
||||
{}
|
||||
|
||||
void GetInventoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allResultObjectNode = dataNode["ResultObject"]["ResultObjectItem"];
|
||||
for (auto dataNodeResultObjectResultObjectItem : allResultObjectNode)
|
||||
{
|
||||
Data::ResultObjectItem resultObjectItemObject;
|
||||
if(!dataNodeResultObjectResultObjectItem["BuyerId"].isNull())
|
||||
resultObjectItemObject.buyerId = dataNodeResultObjectResultObjectItem["BuyerId"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["CommodityCode"].isNull())
|
||||
resultObjectItemObject.commodityCode = dataNodeResultObjectResultObjectItem["CommodityCode"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["CurrentInventory"].isNull())
|
||||
resultObjectItemObject.currentInventory = dataNodeResultObjectResultObjectItem["CurrentInventory"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["ValidEndTime"].isNull())
|
||||
resultObjectItemObject.validEndTime = dataNodeResultObjectResultObjectItem["ValidEndTime"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["ValidStartTime"].isNull())
|
||||
resultObjectItemObject.validStartTime = dataNodeResultObjectResultObjectItem["ValidStartTime"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["InstanceId"].isNull())
|
||||
resultObjectItemObject.instanceId = dataNodeResultObjectResultObjectItem["InstanceId"].asString();
|
||||
if(!dataNodeResultObjectResultObjectItem["InventoryId"].isNull())
|
||||
resultObjectItemObject.inventoryId = dataNodeResultObjectResultObjectItem["InventoryId"].asString();
|
||||
data_.resultObject.push_back(resultObjectItemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
GetInventoryResult::Data GetInventoryResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
bool GetInventoryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
51
vcs/src/model/ListCorpsRequest.cc
Normal file
51
vcs/src/model/ListCorpsRequest.cc
Normal 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/ListCorpsRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::ListCorpsRequest;
|
||||
|
||||
ListCorpsRequest::ListCorpsRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "ListCorps")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListCorpsRequest::~ListCorpsRequest()
|
||||
{}
|
||||
|
||||
int ListCorpsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListCorpsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int ListCorpsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListCorpsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
92
vcs/src/model/ListCorpsResult.cc
Normal file
92
vcs/src/model/ListCorpsResult.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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/ListCorpsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
ListCorpsResult::ListCorpsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCorpsResult::ListCorpsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCorpsResult::~ListCorpsResult()
|
||||
{}
|
||||
|
||||
void ListCorpsResult::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["PageNumber"].isNull())
|
||||
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
|
||||
if(!dataNode["TotalPage"].isNull())
|
||||
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
|
||||
auto allRecordsNode = dataNode["Records"]["Record"];
|
||||
for (auto dataNodeRecordsRecord : allRecordsNode)
|
||||
{
|
||||
Data::Record recordObject;
|
||||
if(!dataNodeRecordsRecord["CorpId"].isNull())
|
||||
recordObject.corpId = dataNodeRecordsRecord["CorpId"].asString();
|
||||
if(!dataNodeRecordsRecord["CorpName"].isNull())
|
||||
recordObject.corpName = dataNodeRecordsRecord["CorpName"].asString();
|
||||
if(!dataNodeRecordsRecord["Description"].isNull())
|
||||
recordObject.description = dataNodeRecordsRecord["Description"].asString();
|
||||
if(!dataNodeRecordsRecord["CreateDate"].isNull())
|
||||
recordObject.createDate = dataNodeRecordsRecord["CreateDate"].asString();
|
||||
if(!dataNodeRecordsRecord["ParentCorpId"].isNull())
|
||||
recordObject.parentCorpId = dataNodeRecordsRecord["ParentCorpId"].asString();
|
||||
if(!dataNodeRecordsRecord["AppName"].isNull())
|
||||
recordObject.appName = dataNodeRecordsRecord["AppName"].asString();
|
||||
if(!dataNodeRecordsRecord["DeviceCount"].isNull())
|
||||
recordObject.deviceCount = std::stoi(dataNodeRecordsRecord["DeviceCount"].asString());
|
||||
data_.records.push_back(recordObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListCorpsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListCorpsResult::Data ListCorpsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListCorpsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
84
vcs/src/model/ListDevicesRequest.cc
Normal file
84
vcs/src/model/ListDevicesRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/ListDevicesRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::ListDevicesRequest;
|
||||
|
||||
ListDevicesRequest::ListDevicesRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "ListDevices")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListDevicesRequest::~ListDevicesRequest()
|
||||
{}
|
||||
|
||||
std::string ListDevicesRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void ListDevicesRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string ListDevicesRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void ListDevicesRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
int ListDevicesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListDevicesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int ListDevicesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListDevicesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListDevicesRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void ListDevicesRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setBodyParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
116
vcs/src/model/ListDevicesResult.cc
Normal file
116
vcs/src/model/ListDevicesResult.cc
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* 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/ListDevicesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
ListDevicesResult::ListDevicesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDevicesResult::ListDevicesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDevicesResult::~ListDevicesResult()
|
||||
{}
|
||||
|
||||
void ListDevicesResult::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["PageNumber"].isNull())
|
||||
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
|
||||
if(!dataNode["TotalPage"].isNull())
|
||||
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
|
||||
auto allRecordsNode = dataNode["Records"]["Record"];
|
||||
for (auto dataNodeRecordsRecord : allRecordsNode)
|
||||
{
|
||||
Data::Record recordObject;
|
||||
if(!dataNodeRecordsRecord["AccessProtocolType"].isNull())
|
||||
recordObject.accessProtocolType = dataNodeRecordsRecord["AccessProtocolType"].asString();
|
||||
if(!dataNodeRecordsRecord["BitRate"].isNull())
|
||||
recordObject.bitRate = dataNodeRecordsRecord["BitRate"].asString();
|
||||
if(!dataNodeRecordsRecord["CoverImageUrl"].isNull())
|
||||
recordObject.coverImageUrl = dataNodeRecordsRecord["CoverImageUrl"].asString();
|
||||
if(!dataNodeRecordsRecord["GBid"].isNull())
|
||||
recordObject.gBid = dataNodeRecordsRecord["GBid"].asString();
|
||||
if(!dataNodeRecordsRecord["DeviceAddress"].isNull())
|
||||
recordObject.deviceAddress = dataNodeRecordsRecord["DeviceAddress"].asString();
|
||||
if(!dataNodeRecordsRecord["DeviceDirection"].isNull())
|
||||
recordObject.deviceDirection = dataNodeRecordsRecord["DeviceDirection"].asString();
|
||||
if(!dataNodeRecordsRecord["DeviceSite"].isNull())
|
||||
recordObject.deviceSite = dataNodeRecordsRecord["DeviceSite"].asString();
|
||||
if(!dataNodeRecordsRecord["Latitude"].isNull())
|
||||
recordObject.latitude = dataNodeRecordsRecord["Latitude"].asString();
|
||||
if(!dataNodeRecordsRecord["Longitude"].isNull())
|
||||
recordObject.longitude = dataNodeRecordsRecord["Longitude"].asString();
|
||||
if(!dataNodeRecordsRecord["DeviceName"].isNull())
|
||||
recordObject.deviceName = dataNodeRecordsRecord["DeviceName"].asString();
|
||||
if(!dataNodeRecordsRecord["Resolution"].isNull())
|
||||
recordObject.resolution = dataNodeRecordsRecord["Resolution"].asString();
|
||||
if(!dataNodeRecordsRecord["SipGBId"].isNull())
|
||||
recordObject.sipGBId = dataNodeRecordsRecord["SipGBId"].asString();
|
||||
if(!dataNodeRecordsRecord["SipPassword"].isNull())
|
||||
recordObject.sipPassword = dataNodeRecordsRecord["SipPassword"].asString();
|
||||
if(!dataNodeRecordsRecord["SipServerIp"].isNull())
|
||||
recordObject.sipServerIp = dataNodeRecordsRecord["SipServerIp"].asString();
|
||||
if(!dataNodeRecordsRecord["SipServerPort"].isNull())
|
||||
recordObject.sipServerPort = dataNodeRecordsRecord["SipServerPort"].asString();
|
||||
if(!dataNodeRecordsRecord["Status"].isNull())
|
||||
recordObject.status = std::stoi(dataNodeRecordsRecord["Status"].asString());
|
||||
if(!dataNodeRecordsRecord["DeviceType"].isNull())
|
||||
recordObject.deviceType = dataNodeRecordsRecord["DeviceType"].asString();
|
||||
if(!dataNodeRecordsRecord["Vendor"].isNull())
|
||||
recordObject.vendor = dataNodeRecordsRecord["Vendor"].asString();
|
||||
if(!dataNodeRecordsRecord["CreateTime"].isNull())
|
||||
recordObject.createTime = dataNodeRecordsRecord["CreateTime"].asString();
|
||||
data_.records.push_back(recordObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListDevicesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListDevicesResult::Data ListDevicesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListDevicesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
62
vcs/src/model/RecognizeImageRequest.cc
Normal file
62
vcs/src/model/RecognizeImageRequest.cc
Normal 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/RecognizeImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::RecognizeImageRequest;
|
||||
|
||||
RecognizeImageRequest::RecognizeImageRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "RecognizeImage")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeImageRequest::~RecognizeImageRequest()
|
||||
{}
|
||||
|
||||
std::string RecognizeImageRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void RecognizeImageRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string RecognizeImageRequest::getPicContent()const
|
||||
{
|
||||
return picContent_;
|
||||
}
|
||||
|
||||
void RecognizeImageRequest::setPicContent(const std::string& picContent)
|
||||
{
|
||||
picContent_ = picContent;
|
||||
setBodyParameter("PicContent", picContent);
|
||||
}
|
||||
|
||||
std::string RecognizeImageRequest::getPicFormat()const
|
||||
{
|
||||
return picFormat_;
|
||||
}
|
||||
|
||||
void RecognizeImageRequest::setPicFormat(const std::string& picFormat)
|
||||
{
|
||||
picFormat_ = picFormat;
|
||||
setBodyParameter("PicFormat", picFormat);
|
||||
}
|
||||
|
||||
112
vcs/src/model/RecognizeImageResult.cc
Normal file
112
vcs/src/model/RecognizeImageResult.cc
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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/RecognizeImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
RecognizeImageResult::RecognizeImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeImageResult::RecognizeImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeImageResult::~RecognizeImageResult()
|
||||
{}
|
||||
|
||||
void RecognizeImageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allBodyListNode = dataNode["BodyList"]["Body"];
|
||||
for (auto dataNodeBodyListBody : allBodyListNode)
|
||||
{
|
||||
Data::Body bodyObject;
|
||||
if(!dataNodeBodyListBody["Feature"].isNull())
|
||||
bodyObject.feature = dataNodeBodyListBody["Feature"].asString();
|
||||
if(!dataNodeBodyListBody["FileName"].isNull())
|
||||
bodyObject.fileName = dataNodeBodyListBody["FileName"].asString();
|
||||
if(!dataNodeBodyListBody["ImageBaseSixFour"].isNull())
|
||||
bodyObject.imageBaseSixFour = dataNodeBodyListBody["ImageBaseSixFour"].asString();
|
||||
if(!dataNodeBodyListBody["LeftTopX"].isNull())
|
||||
bodyObject.leftTopX = dataNodeBodyListBody["LeftTopX"].asString();
|
||||
if(!dataNodeBodyListBody["LeftTopY"].isNull())
|
||||
bodyObject.leftTopY = dataNodeBodyListBody["LeftTopY"].asString();
|
||||
if(!dataNodeBodyListBody["LocalFeature"].isNull())
|
||||
bodyObject.localFeature = dataNodeBodyListBody["LocalFeature"].asString();
|
||||
if(!dataNodeBodyListBody["RespiratorColor"].isNull())
|
||||
bodyObject.respiratorColor = dataNodeBodyListBody["RespiratorColor"].asString();
|
||||
if(!dataNodeBodyListBody["RightBottomX"].isNull())
|
||||
bodyObject.rightBottomX = dataNodeBodyListBody["RightBottomX"].asString();
|
||||
if(!dataNodeBodyListBody["RightBottomY"].isNull())
|
||||
bodyObject.rightBottomY = dataNodeBodyListBody["RightBottomY"].asString();
|
||||
data_.bodyList.push_back(bodyObject);
|
||||
}
|
||||
auto allFaceListNode = dataNode["FaceList"]["Face"];
|
||||
for (auto dataNodeFaceListFace : allFaceListNode)
|
||||
{
|
||||
Data::Face faceObject;
|
||||
if(!dataNodeFaceListFace["Feature"].isNull())
|
||||
faceObject.feature = dataNodeFaceListFace["Feature"].asString();
|
||||
if(!dataNodeFaceListFace["FileName"].isNull())
|
||||
faceObject.fileName = dataNodeFaceListFace["FileName"].asString();
|
||||
if(!dataNodeFaceListFace["ImageBaseSixFour"].isNull())
|
||||
faceObject.imageBaseSixFour = dataNodeFaceListFace["ImageBaseSixFour"].asString();
|
||||
if(!dataNodeFaceListFace["LeftTopX"].isNull())
|
||||
faceObject.leftTopX = dataNodeFaceListFace["LeftTopX"].asString();
|
||||
if(!dataNodeFaceListFace["LeftTopY"].isNull())
|
||||
faceObject.leftTopY = dataNodeFaceListFace["LeftTopY"].asString();
|
||||
if(!dataNodeFaceListFace["LocalFeature"].isNull())
|
||||
faceObject.localFeature = dataNodeFaceListFace["LocalFeature"].asString();
|
||||
if(!dataNodeFaceListFace["RespiratorColor"].isNull())
|
||||
faceObject.respiratorColor = dataNodeFaceListFace["RespiratorColor"].asString();
|
||||
if(!dataNodeFaceListFace["RightBottomX"].isNull())
|
||||
faceObject.rightBottomX = dataNodeFaceListFace["RightBottomX"].asString();
|
||||
if(!dataNodeFaceListFace["RightBottomY"].isNull())
|
||||
faceObject.rightBottomY = dataNodeFaceListFace["RightBottomY"].asString();
|
||||
data_.faceList.push_back(faceObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeImageResult::Data RecognizeImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
106
vcs/src/model/SearchFaceRequest.cc
Normal file
106
vcs/src/model/SearchFaceRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/SearchFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::SearchFaceRequest;
|
||||
|
||||
SearchFaceRequest::SearchFaceRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "SearchFace")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SearchFaceRequest::~SearchFaceRequest()
|
||||
{}
|
||||
|
||||
std::string SearchFaceRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string SearchFaceRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
long SearchFaceRequest::getStartTimeStamp()const
|
||||
{
|
||||
return startTimeStamp_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setStartTimeStamp(long startTimeStamp)
|
||||
{
|
||||
startTimeStamp_ = startTimeStamp;
|
||||
setBodyParameter("StartTimeStamp", std::to_string(startTimeStamp));
|
||||
}
|
||||
|
||||
long SearchFaceRequest::getEndTimeStamp()const
|
||||
{
|
||||
return endTimeStamp_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setEndTimeStamp(long endTimeStamp)
|
||||
{
|
||||
endTimeStamp_ = endTimeStamp;
|
||||
setBodyParameter("EndTimeStamp", std::to_string(endTimeStamp));
|
||||
}
|
||||
|
||||
int SearchFaceRequest::getPageNo()const
|
||||
{
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setPageNo(int pageNo)
|
||||
{
|
||||
pageNo_ = pageNo;
|
||||
setBodyParameter("PageNo", std::to_string(pageNo));
|
||||
}
|
||||
|
||||
int SearchFaceRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string SearchFaceRequest::getOptionList()const
|
||||
{
|
||||
return optionList_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setOptionList(const std::string& optionList)
|
||||
{
|
||||
optionList_ = optionList;
|
||||
setBodyParameter("OptionList", optionList);
|
||||
}
|
||||
|
||||
94
vcs/src/model/SearchFaceResult.cc
Normal file
94
vcs/src/model/SearchFaceResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/SearchFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
SearchFaceResult::SearchFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SearchFaceResult::SearchFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SearchFaceResult::~SearchFaceResult()
|
||||
{}
|
||||
|
||||
void SearchFaceResult::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["PageNo"].isNull())
|
||||
data_.pageNo = std::stoi(dataNode["PageNo"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
|
||||
if(!dataNode["TotalPage"].isNull())
|
||||
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
|
||||
auto allRecordsNode = dataNode["Records"]["Record"];
|
||||
for (auto dataNodeRecordsRecord : allRecordsNode)
|
||||
{
|
||||
Data::Record recordObject;
|
||||
if(!dataNodeRecordsRecord["GbId"].isNull())
|
||||
recordObject.gbId = dataNodeRecordsRecord["GbId"].asString();
|
||||
if(!dataNodeRecordsRecord["ImageUrl"].isNull())
|
||||
recordObject.imageUrl = dataNodeRecordsRecord["ImageUrl"].asString();
|
||||
if(!dataNodeRecordsRecord["LeftTopX"].isNull())
|
||||
recordObject.leftTopX = std::stoi(dataNodeRecordsRecord["LeftTopX"].asString());
|
||||
if(!dataNodeRecordsRecord["LeftTopY"].isNull())
|
||||
recordObject.leftTopY = std::stoi(dataNodeRecordsRecord["LeftTopY"].asString());
|
||||
if(!dataNodeRecordsRecord["RightBottomX"].isNull())
|
||||
recordObject.rightBottomX = std::stoi(dataNodeRecordsRecord["RightBottomX"].asString());
|
||||
if(!dataNodeRecordsRecord["RightBottomY"].isNull())
|
||||
recordObject.rightBottomY = std::stoi(dataNodeRecordsRecord["RightBottomY"].asString());
|
||||
if(!dataNodeRecordsRecord["Score"].isNull())
|
||||
recordObject.score = std::stoi(dataNodeRecordsRecord["Score"].asString());
|
||||
if(!dataNodeRecordsRecord["TargetImageUrl"].isNull())
|
||||
recordObject.targetImageUrl = dataNodeRecordsRecord["TargetImageUrl"].asString();
|
||||
data_.records.push_back(recordObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SearchFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
SearchFaceResult::Data SearchFaceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SearchFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
84
vcs/src/model/UpdateCorpRequest.cc
Normal file
84
vcs/src/model/UpdateCorpRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/UpdateCorpRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::UpdateCorpRequest;
|
||||
|
||||
UpdateCorpRequest::UpdateCorpRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "UpdateCorp")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateCorpRequest::~UpdateCorpRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCorpRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void UpdateCorpRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string UpdateCorpRequest::getParentCorpId()const
|
||||
{
|
||||
return parentCorpId_;
|
||||
}
|
||||
|
||||
void UpdateCorpRequest::setParentCorpId(const std::string& parentCorpId)
|
||||
{
|
||||
parentCorpId_ = parentCorpId;
|
||||
setBodyParameter("ParentCorpId", parentCorpId);
|
||||
}
|
||||
|
||||
std::string UpdateCorpRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateCorpRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setBodyParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string UpdateCorpRequest::getAppName()const
|
||||
{
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void UpdateCorpRequest::setAppName(const std::string& appName)
|
||||
{
|
||||
appName_ = appName;
|
||||
setBodyParameter("AppName", appName);
|
||||
}
|
||||
|
||||
std::string UpdateCorpRequest::getCorpName()const
|
||||
{
|
||||
return corpName_;
|
||||
}
|
||||
|
||||
void UpdateCorpRequest::setCorpName(const std::string& corpName)
|
||||
{
|
||||
corpName_ = corpName;
|
||||
setBodyParameter("CorpName", corpName);
|
||||
}
|
||||
|
||||
65
vcs/src/model/UpdateCorpResult.cc
Normal file
65
vcs/src/model/UpdateCorpResult.cc
Normal 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/UpdateCorpResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
UpdateCorpResult::UpdateCorpResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCorpResult::UpdateCorpResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCorpResult::~UpdateCorpResult()
|
||||
{}
|
||||
|
||||
void UpdateCorpResult::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["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateCorpResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string UpdateCorpResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string UpdateCorpResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
139
vcs/src/model/UpdateDeviceRequest.cc
Normal file
139
vcs/src/model/UpdateDeviceRequest.cc
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* 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/UpdateDeviceRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::UpdateDeviceRequest;
|
||||
|
||||
UpdateDeviceRequest::UpdateDeviceRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "UpdateDevice")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateDeviceRequest::~UpdateDeviceRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceSite()const
|
||||
{
|
||||
return deviceSite_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceSite(const std::string& deviceSite)
|
||||
{
|
||||
deviceSite_ = deviceSite;
|
||||
setBodyParameter("DeviceSite", deviceSite);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getGbId()const
|
||||
{
|
||||
return gbId_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setGbId(const std::string& gbId)
|
||||
{
|
||||
gbId_ = gbId;
|
||||
setBodyParameter("GbId", gbId);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceDirection()const
|
||||
{
|
||||
return deviceDirection_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceDirection(const std::string& deviceDirection)
|
||||
{
|
||||
deviceDirection_ = deviceDirection;
|
||||
setBodyParameter("DeviceDirection", deviceDirection);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceRate()const
|
||||
{
|
||||
return deviceRate_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceRate(const std::string& deviceRate)
|
||||
{
|
||||
deviceRate_ = deviceRate;
|
||||
setBodyParameter("DeviceRate", deviceRate);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceAddress()const
|
||||
{
|
||||
return deviceAddress_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceAddress(const std::string& deviceAddress)
|
||||
{
|
||||
deviceAddress_ = deviceAddress;
|
||||
setBodyParameter("DeviceAddress", deviceAddress);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceType()const
|
||||
{
|
||||
return deviceType_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceType(const std::string& deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setBodyParameter("DeviceType", deviceType);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceResolution()const
|
||||
{
|
||||
return deviceResolution_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceResolution(const std::string& deviceResolution)
|
||||
{
|
||||
deviceResolution_ = deviceResolution;
|
||||
setBodyParameter("DeviceResolution", deviceResolution);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getVendor()const
|
||||
{
|
||||
return vendor_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setVendor(const std::string& vendor)
|
||||
{
|
||||
vendor_ = vendor;
|
||||
setBodyParameter("Vendor", vendor);
|
||||
}
|
||||
|
||||
std::string UpdateDeviceRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void UpdateDeviceRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setBodyParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
65
vcs/src/model/UpdateDeviceResult.cc
Normal file
65
vcs/src/model/UpdateDeviceResult.cc
Normal 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/UpdateDeviceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
UpdateDeviceResult::UpdateDeviceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateDeviceResult::UpdateDeviceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateDeviceResult::~UpdateDeviceResult()
|
||||
{}
|
||||
|
||||
void UpdateDeviceResult::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["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateDeviceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string UpdateDeviceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string UpdateDeviceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user