Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a74578464 | ||
|
|
a744629799 |
@@ -1,3 +1,9 @@
|
||||
2019-09-23 Version 1.36.142
|
||||
- Add param, DescribePrice supprot ReservedInstance.
|
||||
|
||||
2019-09-19 Version 1.36.141
|
||||
- Supported Video Abstract for IMM.
|
||||
|
||||
2019-09-19 Version 1.36.140
|
||||
- Generated 2018-01-20 for `Iot`.
|
||||
|
||||
|
||||
@@ -541,6 +541,8 @@ set(ecs_public_header_model
|
||||
include/alibabacloud/ecs/model/RevokeSecurityGroupResult.h
|
||||
include/alibabacloud/ecs/model/RevokeSecurityGroupEgressRequest.h
|
||||
include/alibabacloud/ecs/model/RevokeSecurityGroupEgressResult.h
|
||||
include/alibabacloud/ecs/model/RunCommandRequest.h
|
||||
include/alibabacloud/ecs/model/RunCommandResult.h
|
||||
include/alibabacloud/ecs/model/RunInstancesRequest.h
|
||||
include/alibabacloud/ecs/model/RunInstancesResult.h
|
||||
include/alibabacloud/ecs/model/StartInstanceRequest.h
|
||||
@@ -1088,6 +1090,8 @@ set(ecs_src
|
||||
src/model/RevokeSecurityGroupResult.cc
|
||||
src/model/RevokeSecurityGroupEgressRequest.cc
|
||||
src/model/RevokeSecurityGroupEgressResult.cc
|
||||
src/model/RunCommandRequest.cc
|
||||
src/model/RunCommandResult.cc
|
||||
src/model/RunInstancesRequest.cc
|
||||
src/model/RunInstancesResult.cc
|
||||
src/model/StartInstanceRequest.cc
|
||||
|
||||
@@ -542,6 +542,8 @@
|
||||
#include "model/RevokeSecurityGroupResult.h"
|
||||
#include "model/RevokeSecurityGroupEgressRequest.h"
|
||||
#include "model/RevokeSecurityGroupEgressResult.h"
|
||||
#include "model/RunCommandRequest.h"
|
||||
#include "model/RunCommandResult.h"
|
||||
#include "model/RunInstancesRequest.h"
|
||||
#include "model/RunInstancesResult.h"
|
||||
#include "model/StartInstanceRequest.h"
|
||||
@@ -1355,6 +1357,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::RevokeSecurityGroupEgressResult> RevokeSecurityGroupEgressOutcome;
|
||||
typedef std::future<RevokeSecurityGroupEgressOutcome> RevokeSecurityGroupEgressOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::RevokeSecurityGroupEgressRequest&, const RevokeSecurityGroupEgressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RevokeSecurityGroupEgressAsyncHandler;
|
||||
typedef Outcome<Error, Model::RunCommandResult> RunCommandOutcome;
|
||||
typedef std::future<RunCommandOutcome> RunCommandOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::RunCommandRequest&, const RunCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RunCommandAsyncHandler;
|
||||
typedef Outcome<Error, Model::RunInstancesResult> RunInstancesOutcome;
|
||||
typedef std::future<RunInstancesOutcome> RunInstancesOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::RunInstancesRequest&, const RunInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RunInstancesAsyncHandler;
|
||||
@@ -2176,6 +2181,9 @@ namespace AlibabaCloud
|
||||
RevokeSecurityGroupEgressOutcome revokeSecurityGroupEgress(const Model::RevokeSecurityGroupEgressRequest &request)const;
|
||||
void revokeSecurityGroupEgressAsync(const Model::RevokeSecurityGroupEgressRequest& request, const RevokeSecurityGroupEgressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RevokeSecurityGroupEgressOutcomeCallable revokeSecurityGroupEgressCallable(const Model::RevokeSecurityGroupEgressRequest& request) const;
|
||||
RunCommandOutcome runCommand(const Model::RunCommandRequest &request)const;
|
||||
void runCommandAsync(const Model::RunCommandRequest& request, const RunCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RunCommandOutcomeCallable runCommandCallable(const Model::RunCommandRequest& request) const;
|
||||
RunInstancesOutcome runInstances(const Model::RunInstancesRequest &request)const;
|
||||
void runInstancesAsync(const Model::RunInstancesRequest& request, const RunInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RunInstancesOutcomeCallable runInstancesCallable(const Model::RunInstancesRequest& request) const;
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace AlibabaCloud
|
||||
void setPageNumber(long pageNumber);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getContentEncoding()const;
|
||||
void setContentEncoding(const std::string& contentEncoding);
|
||||
long getPageSize()const;
|
||||
void setPageSize(long pageSize);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
@@ -65,6 +67,7 @@ namespace AlibabaCloud
|
||||
std::string commandId_;
|
||||
long pageNumber_;
|
||||
std::string regionId_;
|
||||
std::string contentEncoding_;
|
||||
long pageSize_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace AlibabaCloud
|
||||
void setPageNumber(long pageNumber);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getContentEncoding()const;
|
||||
void setContentEncoding(const std::string& contentEncoding);
|
||||
long getPageSize()const;
|
||||
void setPageSize(long pageSize);
|
||||
std::string getInvokeId()const;
|
||||
@@ -70,6 +72,7 @@ namespace AlibabaCloud
|
||||
std::string commandId_;
|
||||
long pageNumber_;
|
||||
std::string regionId_;
|
||||
std::string contentEncoding_;
|
||||
long pageSize_;
|
||||
std::string invokeId_;
|
||||
bool timed_;
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace AlibabaCloud
|
||||
void setInternetChargeType(const std::string& internetChargeType);
|
||||
std::string getInstanceNetworkType()const;
|
||||
void setInstanceNetworkType(const std::string& instanceNetworkType);
|
||||
int getInstanceAmount()const;
|
||||
void setInstanceAmount(int instanceAmount);
|
||||
std::string getDataDisk3PerformanceLevel()const;
|
||||
void setDataDisk3PerformanceLevel(const std::string& dataDisk3PerformanceLevel);
|
||||
std::string getImageId()const;
|
||||
@@ -65,6 +67,8 @@ namespace AlibabaCloud
|
||||
void setInternetMaxBandwidthOut(int internetMaxBandwidthOut);
|
||||
std::string getSystemDiskCategory()const;
|
||||
void setSystemDiskCategory(const std::string& systemDiskCategory);
|
||||
std::string getPlatform()const;
|
||||
void setPlatform(const std::string& platform);
|
||||
std::string getSystemDiskPerformanceLevel()const;
|
||||
void setSystemDiskPerformanceLevel(const std::string& systemDiskPerformanceLevel);
|
||||
std::string getDataDisk4Category()const;
|
||||
@@ -73,6 +77,8 @@ namespace AlibabaCloud
|
||||
void setDataDisk4PerformanceLevel(const std::string& dataDisk4PerformanceLevel);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getScope()const;
|
||||
void setScope(const std::string& scope);
|
||||
std::string getInstanceType()const;
|
||||
void setInstanceType(const std::string& instanceType);
|
||||
std::string getDataDisk2Category()const;
|
||||
@@ -95,6 +101,8 @@ namespace AlibabaCloud
|
||||
void setDataDisk2PerformanceLevel(const std::string& dataDisk2PerformanceLevel);
|
||||
int getSystemDiskSize()const;
|
||||
void setSystemDiskSize(int systemDiskSize);
|
||||
std::string getOfferingType()const;
|
||||
void setOfferingType(const std::string& offeringType);
|
||||
|
||||
private:
|
||||
int dataDisk3Size_;
|
||||
@@ -107,15 +115,18 @@ namespace AlibabaCloud
|
||||
long ownerId_;
|
||||
std::string internetChargeType_;
|
||||
std::string instanceNetworkType_;
|
||||
int instanceAmount_;
|
||||
std::string dataDisk3PerformanceLevel_;
|
||||
std::string imageId_;
|
||||
std::string ioOptimized_;
|
||||
int internetMaxBandwidthOut_;
|
||||
std::string systemDiskCategory_;
|
||||
std::string platform_;
|
||||
std::string systemDiskPerformanceLevel_;
|
||||
std::string dataDisk4Category_;
|
||||
std::string dataDisk4PerformanceLevel_;
|
||||
std::string regionId_;
|
||||
std::string scope_;
|
||||
std::string instanceType_;
|
||||
std::string dataDisk2Category_;
|
||||
int dataDisk1Size_;
|
||||
@@ -127,6 +138,7 @@ namespace AlibabaCloud
|
||||
std::string dataDisk1Category_;
|
||||
std::string dataDisk2PerformanceLevel_;
|
||||
int systemDiskSize_;
|
||||
std::string offeringType_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace AlibabaCloud
|
||||
float tradePrice;
|
||||
};
|
||||
float originalPrice;
|
||||
float reservedInstanceHourPrice;
|
||||
float discountPrice;
|
||||
std::string currency;
|
||||
std::vector<ResourcePriceModel> detailInfos;
|
||||
|
||||
99
ecs/include/alibabacloud/ecs/model/RunCommandRequest.h
Normal file
99
ecs/include/alibabacloud/ecs/model/RunCommandRequest.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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_ECS_MODEL_RUNCOMMANDREQUEST_H_
|
||||
#define ALIBABACLOUD_ECS_MODEL_RUNCOMMANDREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ecs/EcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ecs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ECS_EXPORT RunCommandRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RunCommandRequest();
|
||||
~RunCommandRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getWorkingDir()const;
|
||||
void setWorkingDir(const std::string& workingDir);
|
||||
std::string getDescription()const;
|
||||
void setDescription(const std::string& description);
|
||||
std::string getType()const;
|
||||
void setType(const std::string& type);
|
||||
std::string getCommandContent()const;
|
||||
void setCommandContent(const std::string& commandContent);
|
||||
long getTimeout()const;
|
||||
void setTimeout(long timeout);
|
||||
std::string getFrequency()const;
|
||||
void setFrequency(const std::string& frequency);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getContentEncoding()const;
|
||||
void setContentEncoding(const std::string& contentEncoding);
|
||||
bool getKeepCommand()const;
|
||||
void setKeepCommand(bool keepCommand);
|
||||
bool getTimed()const;
|
||||
void setTimed(bool timed);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getOwnerAccount()const;
|
||||
void setOwnerAccount(const std::string& ownerAccount);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::vector<std::string> getInstanceId()const;
|
||||
void setInstanceId(const std::vector<std::string>& instanceId);
|
||||
std::string getName()const;
|
||||
void setName(const std::string& name);
|
||||
std::map<std::string, std::string> getParameters()const;
|
||||
void setParameters(const std::map<std::string, std::string>& parameters);
|
||||
bool getEnableParameter()const;
|
||||
void setEnableParameter(bool enableParameter);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string workingDir_;
|
||||
std::string description_;
|
||||
std::string type_;
|
||||
std::string commandContent_;
|
||||
long timeout_;
|
||||
std::string frequency_;
|
||||
std::string regionId_;
|
||||
std::string contentEncoding_;
|
||||
bool keepCommand_;
|
||||
bool timed_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::vector<std::string> instanceId_;
|
||||
std::string name_;
|
||||
std::map<std::string, std::string> parameters_;
|
||||
bool enableParameter_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ECS_MODEL_RUNCOMMANDREQUEST_H_
|
||||
53
ecs/include/alibabacloud/ecs/model/RunCommandResult.h
Normal file
53
ecs/include/alibabacloud/ecs/model/RunCommandResult.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_ECS_MODEL_RUNCOMMANDRESULT_H_
|
||||
#define ALIBABACLOUD_ECS_MODEL_RUNCOMMANDRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ecs/EcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ecs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ECS_EXPORT RunCommandResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RunCommandResult();
|
||||
explicit RunCommandResult(const std::string &payload);
|
||||
~RunCommandResult();
|
||||
std::string getCommandId()const;
|
||||
std::string getInvokeId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string commandId_;
|
||||
std::string invokeId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ECS_MODEL_RUNCOMMANDRESULT_H_
|
||||
@@ -9411,6 +9411,42 @@ EcsClient::RevokeSecurityGroupEgressOutcomeCallable EcsClient::revokeSecurityGro
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::RunCommandOutcome EcsClient::runCommand(const RunCommandRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RunCommandOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RunCommandOutcome(RunCommandResult(outcome.result()));
|
||||
else
|
||||
return RunCommandOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EcsClient::runCommandAsync(const RunCommandRequest& request, const RunCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, runCommand(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EcsClient::RunCommandOutcomeCallable EcsClient::runCommandCallable(const RunCommandRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RunCommandOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->runCommand(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::RunInstancesOutcome EcsClient::runInstances(const RunInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -91,6 +91,17 @@ void DescribeCommandsRequest::setRegionId(const std::string& regionId)
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeCommandsRequest::getContentEncoding()const
|
||||
{
|
||||
return contentEncoding_;
|
||||
}
|
||||
|
||||
void DescribeCommandsRequest::setContentEncoding(const std::string& contentEncoding)
|
||||
{
|
||||
contentEncoding_ = contentEncoding;
|
||||
setCoreParameter("ContentEncoding", contentEncoding);
|
||||
}
|
||||
|
||||
long DescribeCommandsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
|
||||
@@ -80,6 +80,17 @@ void DescribeInvocationsRequest::setRegionId(const std::string& regionId)
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeInvocationsRequest::getContentEncoding()const
|
||||
{
|
||||
return contentEncoding_;
|
||||
}
|
||||
|
||||
void DescribeInvocationsRequest::setContentEncoding(const std::string& contentEncoding)
|
||||
{
|
||||
contentEncoding_ = contentEncoding;
|
||||
setCoreParameter("ContentEncoding", contentEncoding);
|
||||
}
|
||||
|
||||
long DescribeInvocationsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
|
||||
@@ -135,6 +135,17 @@ void DescribePriceRequest::setInstanceNetworkType(const std::string& instanceNet
|
||||
setCoreParameter("InstanceNetworkType", instanceNetworkType);
|
||||
}
|
||||
|
||||
int DescribePriceRequest::getInstanceAmount()const
|
||||
{
|
||||
return instanceAmount_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setInstanceAmount(int instanceAmount)
|
||||
{
|
||||
instanceAmount_ = instanceAmount;
|
||||
setCoreParameter("InstanceAmount", std::to_string(instanceAmount));
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getDataDisk3PerformanceLevel()const
|
||||
{
|
||||
return dataDisk3PerformanceLevel_;
|
||||
@@ -190,6 +201,17 @@ void DescribePriceRequest::setSystemDiskCategory(const std::string& systemDiskCa
|
||||
setCoreParameter("SystemDiskCategory", systemDiskCategory);
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getPlatform()const
|
||||
{
|
||||
return platform_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setPlatform(const std::string& platform)
|
||||
{
|
||||
platform_ = platform;
|
||||
setCoreParameter("Platform", platform);
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getSystemDiskPerformanceLevel()const
|
||||
{
|
||||
return systemDiskPerformanceLevel_;
|
||||
@@ -234,6 +256,17 @@ void DescribePriceRequest::setRegionId(const std::string& regionId)
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getScope()const
|
||||
{
|
||||
return scope_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setScope(const std::string& scope)
|
||||
{
|
||||
scope_ = scope;
|
||||
setCoreParameter("Scope", scope);
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getInstanceType()const
|
||||
{
|
||||
return instanceType_;
|
||||
@@ -355,3 +388,14 @@ void DescribePriceRequest::setSystemDiskSize(int systemDiskSize)
|
||||
setCoreParameter("SystemDiskSize", std::to_string(systemDiskSize));
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getOfferingType()const
|
||||
{
|
||||
return offeringType_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setOfferingType(const std::string& offeringType)
|
||||
{
|
||||
offeringType_ = offeringType;
|
||||
setCoreParameter("OfferingType", offeringType);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ void DescribePriceResult::parse(const std::string &payload)
|
||||
priceInfo_.price.discountPrice = std::stof(priceNode["DiscountPrice"].asString());
|
||||
if(!priceNode["TradePrice"].isNull())
|
||||
priceInfo_.price.tradePrice = std::stof(priceNode["TradePrice"].asString());
|
||||
if(!priceNode["ReservedInstanceHourPrice"].isNull())
|
||||
priceInfo_.price.reservedInstanceHourPrice = std::stof(priceNode["ReservedInstanceHourPrice"].asString());
|
||||
if(!priceNode["Currency"].isNull())
|
||||
priceInfo_.price.currency = priceNode["Currency"].asString();
|
||||
auto allDetailInfosNode = priceNode["DetailInfos"]["ResourcePriceModel"];
|
||||
|
||||
226
ecs/src/model/RunCommandRequest.cc
Normal file
226
ecs/src/model/RunCommandRequest.cc
Normal file
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* 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/ecs/model/RunCommandRequest.h>
|
||||
|
||||
using AlibabaCloud::Ecs::Model::RunCommandRequest;
|
||||
|
||||
RunCommandRequest::RunCommandRequest() :
|
||||
RpcServiceRequest("ecs", "2014-05-26", "RunCommand")
|
||||
{}
|
||||
|
||||
RunCommandRequest::~RunCommandRequest()
|
||||
{}
|
||||
|
||||
long RunCommandRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getWorkingDir()const
|
||||
{
|
||||
return workingDir_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setWorkingDir(const std::string& workingDir)
|
||||
{
|
||||
workingDir_ = workingDir;
|
||||
setCoreParameter("WorkingDir", workingDir);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setCoreParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getCommandContent()const
|
||||
{
|
||||
return commandContent_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setCommandContent(const std::string& commandContent)
|
||||
{
|
||||
commandContent_ = commandContent;
|
||||
setCoreParameter("CommandContent", commandContent);
|
||||
}
|
||||
|
||||
long RunCommandRequest::getTimeout()const
|
||||
{
|
||||
return timeout_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setTimeout(long timeout)
|
||||
{
|
||||
timeout_ = timeout;
|
||||
setCoreParameter("Timeout", std::to_string(timeout));
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getFrequency()const
|
||||
{
|
||||
return frequency_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setFrequency(const std::string& frequency)
|
||||
{
|
||||
frequency_ = frequency;
|
||||
setCoreParameter("Frequency", frequency);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getContentEncoding()const
|
||||
{
|
||||
return contentEncoding_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setContentEncoding(const std::string& contentEncoding)
|
||||
{
|
||||
contentEncoding_ = contentEncoding;
|
||||
setCoreParameter("ContentEncoding", contentEncoding);
|
||||
}
|
||||
|
||||
bool RunCommandRequest::getKeepCommand()const
|
||||
{
|
||||
return keepCommand_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setKeepCommand(bool keepCommand)
|
||||
{
|
||||
keepCommand_ = keepCommand;
|
||||
setCoreParameter("KeepCommand", keepCommand ? "true" : "false");
|
||||
}
|
||||
|
||||
bool RunCommandRequest::getTimed()const
|
||||
{
|
||||
return timed_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setTimed(bool timed)
|
||||
{
|
||||
timed_ = timed;
|
||||
setCoreParameter("Timed", timed ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setCoreParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long RunCommandRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setCoreParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::vector<std::string> RunCommandRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setInstanceId(const std::vector<std::string>& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
for(int i = 0; i!= instanceId.size(); i++)
|
||||
setCoreParameter("InstanceId."+ std::to_string(i), instanceId.at(i));
|
||||
}
|
||||
|
||||
std::string RunCommandRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> RunCommandRequest::getParameters()const
|
||||
{
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setParameters(const std::map<std::string, std::string>& parameters)
|
||||
{
|
||||
parameters_ = parameters;
|
||||
setJsonParameters("Parameters", parameters);
|
||||
}
|
||||
|
||||
bool RunCommandRequest::getEnableParameter()const
|
||||
{
|
||||
return enableParameter_;
|
||||
}
|
||||
|
||||
void RunCommandRequest::setEnableParameter(bool enableParameter)
|
||||
{
|
||||
enableParameter_ = enableParameter;
|
||||
setCoreParameter("EnableParameter", enableParameter ? "true" : "false");
|
||||
}
|
||||
|
||||
58
ecs/src/model/RunCommandResult.cc
Normal file
58
ecs/src/model/RunCommandResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/ecs/model/RunCommandResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ecs;
|
||||
using namespace AlibabaCloud::Ecs::Model;
|
||||
|
||||
RunCommandResult::RunCommandResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RunCommandResult::RunCommandResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RunCommandResult::~RunCommandResult()
|
||||
{}
|
||||
|
||||
void RunCommandResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CommandId"].isNull())
|
||||
commandId_ = value["CommandId"].asString();
|
||||
if(!value["InvokeId"].isNull())
|
||||
invokeId_ = value["InvokeId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RunCommandResult::getCommandId()const
|
||||
{
|
||||
return commandId_;
|
||||
}
|
||||
|
||||
std::string RunCommandResult::getInvokeId()const
|
||||
{
|
||||
return invokeId_;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct Frames
|
||||
{
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
std::string addressLine;
|
||||
std::string country;
|
||||
std::string city;
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
@@ -121,11 +130,14 @@ namespace AlibabaCloud
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string facesModifyTime;
|
||||
@@ -137,6 +149,7 @@ namespace AlibabaCloud
|
||||
std::string sourcePosition;
|
||||
std::vector<Frames::FacesItem> faces;
|
||||
std::vector<Frames::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
|
||||
@@ -35,14 +35,38 @@ namespace AlibabaCloud
|
||||
FindImagesRequest();
|
||||
~FindImagesRequest();
|
||||
|
||||
std::string getGender()const;
|
||||
void setGender(const std::string& gender);
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getExternalId()const;
|
||||
void setExternalId(const std::string& externalId);
|
||||
std::string getFacesModifyTimeRange()const;
|
||||
void setFacesModifyTimeRange(const std::string& facesModifyTimeRange);
|
||||
std::string getOCRContentsMatch()const;
|
||||
void setOCRContentsMatch(const std::string& oCRContentsMatch);
|
||||
int getLimit()const;
|
||||
void setLimit(int limit);
|
||||
std::string getRemarksDPrefix()const;
|
||||
void setRemarksDPrefix(const std::string& remarksDPrefix);
|
||||
std::string getSourceType()const;
|
||||
void setSourceType(const std::string& sourceType);
|
||||
std::string getOrder()const;
|
||||
void setOrder(const std::string& order);
|
||||
std::string getGroupId()const;
|
||||
void setGroupId(const std::string& groupId);
|
||||
std::string getOrderBy()const;
|
||||
void setOrderBy(const std::string& orderBy);
|
||||
std::string getTagNames()const;
|
||||
void setTagNames(const std::string& tagNames);
|
||||
std::string getMarker()const;
|
||||
void setMarker(const std::string& marker);
|
||||
std::string getRemarksCPrefix()const;
|
||||
void setRemarksCPrefix(const std::string& remarksCPrefix);
|
||||
std::string getModifyTimeRange()const;
|
||||
void setModifyTimeRange(const std::string& modifyTimeRange);
|
||||
std::string getAddressLineContentsMatch()const;
|
||||
void setAddressLineContentsMatch(const std::string& addressLineContentsMatch);
|
||||
std::string getGender()const;
|
||||
void setGender(const std::string& gender);
|
||||
std::string getImageSizeRange()const;
|
||||
void setImageSizeRange(const std::string& imageSizeRange);
|
||||
std::string getRemarksBPrefix()const;
|
||||
@@ -53,71 +77,50 @@ namespace AlibabaCloud
|
||||
void setLocationBoundary(const std::string& locationBoundary);
|
||||
std::string getImageTimeRange()const;
|
||||
void setImageTimeRange(const std::string& imageTimeRange);
|
||||
std::string getOCRContentsMatch()const;
|
||||
void setOCRContentsMatch(const std::string& oCRContentsMatch);
|
||||
int getLimit()const;
|
||||
void setLimit(int limit);
|
||||
std::string getRemarksDPrefix()const;
|
||||
void setRemarksDPrefix(const std::string& remarksDPrefix);
|
||||
std::string getTagsModifyTimeRange()const;
|
||||
void setTagsModifyTimeRange(const std::string& tagsModifyTimeRange);
|
||||
std::string getSourceType()const;
|
||||
void setSourceType(const std::string& sourceType);
|
||||
std::string getAgeRange()const;
|
||||
void setAgeRange(const std::string& ageRange);
|
||||
std::string getOrder()const;
|
||||
void setOrder(const std::string& order);
|
||||
std::string getRemarksAPrefix()const;
|
||||
void setRemarksAPrefix(const std::string& remarksAPrefix);
|
||||
std::string getGroupId()const;
|
||||
void setGroupId(const std::string& groupId);
|
||||
std::string getOrderBy()const;
|
||||
void setOrderBy(const std::string& orderBy);
|
||||
std::string getTagNames()const;
|
||||
void setTagNames(const std::string& tagNames);
|
||||
std::string getSourceUriPrefix()const;
|
||||
void setSourceUriPrefix(const std::string& sourceUriPrefix);
|
||||
std::string getEmotion()const;
|
||||
void setEmotion(const std::string& emotion);
|
||||
std::string getMarker()const;
|
||||
void setMarker(const std::string& marker);
|
||||
std::string getRemarksCPrefix()const;
|
||||
void setRemarksCPrefix(const std::string& remarksCPrefix);
|
||||
std::string getCreateTimeRange()const;
|
||||
void setCreateTimeRange(const std::string& createTimeRange);
|
||||
std::string getSetId()const;
|
||||
void setSetId(const std::string& setId);
|
||||
std::string getModifyTimeRange()const;
|
||||
void setModifyTimeRange(const std::string& modifyTimeRange);
|
||||
|
||||
private:
|
||||
std::string gender_;
|
||||
std::string project_;
|
||||
std::string externalId_;
|
||||
std::string facesModifyTimeRange_;
|
||||
std::string oCRContentsMatch_;
|
||||
int limit_;
|
||||
std::string remarksDPrefix_;
|
||||
std::string sourceType_;
|
||||
std::string order_;
|
||||
std::string groupId_;
|
||||
std::string orderBy_;
|
||||
std::string tagNames_;
|
||||
std::string marker_;
|
||||
std::string remarksCPrefix_;
|
||||
std::string modifyTimeRange_;
|
||||
std::string addressLineContentsMatch_;
|
||||
std::string gender_;
|
||||
std::string imageSizeRange_;
|
||||
std::string remarksBPrefix_;
|
||||
std::string accessKeyId_;
|
||||
std::string locationBoundary_;
|
||||
std::string imageTimeRange_;
|
||||
std::string oCRContentsMatch_;
|
||||
int limit_;
|
||||
std::string remarksDPrefix_;
|
||||
std::string tagsModifyTimeRange_;
|
||||
std::string sourceType_;
|
||||
std::string ageRange_;
|
||||
std::string order_;
|
||||
std::string remarksAPrefix_;
|
||||
std::string groupId_;
|
||||
std::string orderBy_;
|
||||
std::string tagNames_;
|
||||
std::string sourceUriPrefix_;
|
||||
std::string emotion_;
|
||||
std::string marker_;
|
||||
std::string remarksCPrefix_;
|
||||
std::string createTimeRange_;
|
||||
std::string setId_;
|
||||
std::string modifyTimeRange_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct ImagesItem
|
||||
{
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
std::string addressLine;
|
||||
std::string country;
|
||||
std::string city;
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
@@ -121,11 +130,14 @@ namespace AlibabaCloud
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string facesModifyTime;
|
||||
@@ -137,6 +149,7 @@ namespace AlibabaCloud
|
||||
std::string sourcePosition;
|
||||
std::vector<ImagesItem::FacesItem> faces;
|
||||
std::vector<ImagesItem::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
|
||||
@@ -32,6 +32,15 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_IMM_EXPORT GetImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
std::string addressLine;
|
||||
std::string country;
|
||||
std::string city;
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct FaceAttributes
|
||||
@@ -123,11 +132,14 @@ namespace AlibabaCloud
|
||||
explicit GetImageResult(const std::string &payload);
|
||||
~GetImageResult();
|
||||
std::string getModifyTime()const;
|
||||
Address getAddress()const;
|
||||
std::string getSourceType()const;
|
||||
std::string getSourceUri()const;
|
||||
std::string getFacesFailReason()const;
|
||||
std::string getRemarksA()const;
|
||||
std::string getAddressFailReason()const;
|
||||
std::string getRemarksB()const;
|
||||
std::string getAddressModifyTime()const;
|
||||
std::string getImageFormat()const;
|
||||
std::string getTagsFailReason()const;
|
||||
std::string getExif()const;
|
||||
@@ -139,6 +151,7 @@ namespace AlibabaCloud
|
||||
std::string getSourcePosition()const;
|
||||
std::vector<FacesItem> getFaces()const;
|
||||
std::vector<TagsItem> getTags()const;
|
||||
std::string getAddressStatus()const;
|
||||
std::string getFacesStatus()const;
|
||||
std::string getCreateTime()const;
|
||||
std::string getTagsModifyTime()const;
|
||||
@@ -163,11 +176,14 @@ namespace AlibabaCloud
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string modifyTime_;
|
||||
Address address_;
|
||||
std::string sourceType_;
|
||||
std::string sourceUri_;
|
||||
std::string facesFailReason_;
|
||||
std::string remarksA_;
|
||||
std::string addressFailReason_;
|
||||
std::string remarksB_;
|
||||
std::string addressModifyTime_;
|
||||
std::string imageFormat_;
|
||||
std::string tagsFailReason_;
|
||||
std::string exif_;
|
||||
@@ -179,6 +195,7 @@ namespace AlibabaCloud
|
||||
std::string sourcePosition_;
|
||||
std::vector<FacesItem> faces_;
|
||||
std::vector<TagsItem> tags_;
|
||||
std::string addressStatus_;
|
||||
std::string facesStatus_;
|
||||
std::string createTime_;
|
||||
std::string tagsModifyTime_;
|
||||
|
||||
@@ -34,6 +34,15 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct ImagesItem
|
||||
{
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
std::string addressLine;
|
||||
std::string country;
|
||||
std::string city;
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
@@ -121,11 +130,14 @@ namespace AlibabaCloud
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string facesModifyTime;
|
||||
@@ -137,6 +149,7 @@ namespace AlibabaCloud
|
||||
std::string sourcePosition;
|
||||
std::vector<ImagesItem::FacesItem> faces;
|
||||
std::vector<ImagesItem::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
|
||||
@@ -105,6 +105,12 @@ void FindImagesByTagNamesResult::parse(const std::string &payload)
|
||||
imagesObject.remarksC = valueImagesFrames["RemarksC"].asString();
|
||||
if(!valueImagesFrames["RemarksD"].isNull())
|
||||
imagesObject.remarksD = valueImagesFrames["RemarksD"].asString();
|
||||
if(!valueImagesFrames["AddressModifyTime"].isNull())
|
||||
imagesObject.addressModifyTime = valueImagesFrames["AddressModifyTime"].asString();
|
||||
if(!valueImagesFrames["AddressStatus"].isNull())
|
||||
imagesObject.addressStatus = valueImagesFrames["AddressStatus"].asString();
|
||||
if(!valueImagesFrames["AddressFailReason"].isNull())
|
||||
imagesObject.addressFailReason = valueImagesFrames["AddressFailReason"].asString();
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -235,6 +241,19 @@ void FindImagesByTagNamesResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
if(!addressNode["Country"].isNull())
|
||||
imagesObject.address.country = addressNode["Country"].asString();
|
||||
if(!addressNode["Province"].isNull())
|
||||
imagesObject.address.province = addressNode["Province"].asString();
|
||||
if(!addressNode["City"].isNull())
|
||||
imagesObject.address.city = addressNode["City"].asString();
|
||||
if(!addressNode["District"].isNull())
|
||||
imagesObject.address.district = addressNode["District"].asString();
|
||||
if(!addressNode["Township"].isNull())
|
||||
imagesObject.address.township = addressNode["Township"].asString();
|
||||
images_.push_back(imagesObject);
|
||||
}
|
||||
if(!value["SetId"].isNull())
|
||||
|
||||
@@ -25,17 +25,6 @@ FindImagesRequest::FindImagesRequest() :
|
||||
FindImagesRequest::~FindImagesRequest()
|
||||
{}
|
||||
|
||||
std::string FindImagesRequest::getGender()const
|
||||
{
|
||||
return gender_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setGender(const std::string& gender)
|
||||
{
|
||||
gender_ = gender;
|
||||
setCoreParameter("Gender", gender);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
@@ -69,6 +58,149 @@ void FindImagesRequest::setFacesModifyTimeRange(const std::string& facesModifyTi
|
||||
setCoreParameter("FacesModifyTimeRange", facesModifyTimeRange);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOCRContentsMatch()const
|
||||
{
|
||||
return oCRContentsMatch_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOCRContentsMatch(const std::string& oCRContentsMatch)
|
||||
{
|
||||
oCRContentsMatch_ = oCRContentsMatch;
|
||||
setCoreParameter("OCRContentsMatch", oCRContentsMatch);
|
||||
}
|
||||
|
||||
int FindImagesRequest::getLimit()const
|
||||
{
|
||||
return limit_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setLimit(int limit)
|
||||
{
|
||||
limit_ = limit;
|
||||
setCoreParameter("Limit", std::to_string(limit));
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getRemarksDPrefix()const
|
||||
{
|
||||
return remarksDPrefix_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setRemarksDPrefix(const std::string& remarksDPrefix)
|
||||
{
|
||||
remarksDPrefix_ = remarksDPrefix;
|
||||
setCoreParameter("RemarksDPrefix", remarksDPrefix);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getSourceType()const
|
||||
{
|
||||
return sourceType_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setSourceType(const std::string& sourceType)
|
||||
{
|
||||
sourceType_ = sourceType;
|
||||
setCoreParameter("SourceType", sourceType);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOrder()const
|
||||
{
|
||||
return order_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOrder(const std::string& order)
|
||||
{
|
||||
order_ = order;
|
||||
setCoreParameter("Order", order);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOrderBy(const std::string& orderBy)
|
||||
{
|
||||
orderBy_ = orderBy;
|
||||
setCoreParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getTagNames()const
|
||||
{
|
||||
return tagNames_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setTagNames(const std::string& tagNames)
|
||||
{
|
||||
tagNames_ = tagNames;
|
||||
setCoreParameter("TagNames", tagNames);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getMarker()const
|
||||
{
|
||||
return marker_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setMarker(const std::string& marker)
|
||||
{
|
||||
marker_ = marker;
|
||||
setCoreParameter("Marker", marker);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getRemarksCPrefix()const
|
||||
{
|
||||
return remarksCPrefix_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setRemarksCPrefix(const std::string& remarksCPrefix)
|
||||
{
|
||||
remarksCPrefix_ = remarksCPrefix;
|
||||
setCoreParameter("RemarksCPrefix", remarksCPrefix);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getModifyTimeRange()const
|
||||
{
|
||||
return modifyTimeRange_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setModifyTimeRange(const std::string& modifyTimeRange)
|
||||
{
|
||||
modifyTimeRange_ = modifyTimeRange;
|
||||
setCoreParameter("ModifyTimeRange", modifyTimeRange);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getAddressLineContentsMatch()const
|
||||
{
|
||||
return addressLineContentsMatch_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setAddressLineContentsMatch(const std::string& addressLineContentsMatch)
|
||||
{
|
||||
addressLineContentsMatch_ = addressLineContentsMatch;
|
||||
setCoreParameter("AddressLineContentsMatch", addressLineContentsMatch);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getGender()const
|
||||
{
|
||||
return gender_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setGender(const std::string& gender)
|
||||
{
|
||||
gender_ = gender;
|
||||
setCoreParameter("Gender", gender);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getImageSizeRange()const
|
||||
{
|
||||
return imageSizeRange_;
|
||||
@@ -124,39 +256,6 @@ void FindImagesRequest::setImageTimeRange(const std::string& imageTimeRange)
|
||||
setCoreParameter("ImageTimeRange", imageTimeRange);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOCRContentsMatch()const
|
||||
{
|
||||
return oCRContentsMatch_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOCRContentsMatch(const std::string& oCRContentsMatch)
|
||||
{
|
||||
oCRContentsMatch_ = oCRContentsMatch;
|
||||
setCoreParameter("OCRContentsMatch", oCRContentsMatch);
|
||||
}
|
||||
|
||||
int FindImagesRequest::getLimit()const
|
||||
{
|
||||
return limit_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setLimit(int limit)
|
||||
{
|
||||
limit_ = limit;
|
||||
setCoreParameter("Limit", std::to_string(limit));
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getRemarksDPrefix()const
|
||||
{
|
||||
return remarksDPrefix_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setRemarksDPrefix(const std::string& remarksDPrefix)
|
||||
{
|
||||
remarksDPrefix_ = remarksDPrefix;
|
||||
setCoreParameter("RemarksDPrefix", remarksDPrefix);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getTagsModifyTimeRange()const
|
||||
{
|
||||
return tagsModifyTimeRange_;
|
||||
@@ -168,17 +267,6 @@ void FindImagesRequest::setTagsModifyTimeRange(const std::string& tagsModifyTime
|
||||
setCoreParameter("TagsModifyTimeRange", tagsModifyTimeRange);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getSourceType()const
|
||||
{
|
||||
return sourceType_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setSourceType(const std::string& sourceType)
|
||||
{
|
||||
sourceType_ = sourceType;
|
||||
setCoreParameter("SourceType", sourceType);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getAgeRange()const
|
||||
{
|
||||
return ageRange_;
|
||||
@@ -190,17 +278,6 @@ void FindImagesRequest::setAgeRange(const std::string& ageRange)
|
||||
setCoreParameter("AgeRange", ageRange);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOrder()const
|
||||
{
|
||||
return order_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOrder(const std::string& order)
|
||||
{
|
||||
order_ = order;
|
||||
setCoreParameter("Order", order);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getRemarksAPrefix()const
|
||||
{
|
||||
return remarksAPrefix_;
|
||||
@@ -212,39 +289,6 @@ void FindImagesRequest::setRemarksAPrefix(const std::string& remarksAPrefix)
|
||||
setCoreParameter("RemarksAPrefix", remarksAPrefix);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setOrderBy(const std::string& orderBy)
|
||||
{
|
||||
orderBy_ = orderBy;
|
||||
setCoreParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getTagNames()const
|
||||
{
|
||||
return tagNames_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setTagNames(const std::string& tagNames)
|
||||
{
|
||||
tagNames_ = tagNames;
|
||||
setCoreParameter("TagNames", tagNames);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getSourceUriPrefix()const
|
||||
{
|
||||
return sourceUriPrefix_;
|
||||
@@ -267,28 +311,6 @@ void FindImagesRequest::setEmotion(const std::string& emotion)
|
||||
setCoreParameter("Emotion", emotion);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getMarker()const
|
||||
{
|
||||
return marker_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setMarker(const std::string& marker)
|
||||
{
|
||||
marker_ = marker;
|
||||
setCoreParameter("Marker", marker);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getRemarksCPrefix()const
|
||||
{
|
||||
return remarksCPrefix_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setRemarksCPrefix(const std::string& remarksCPrefix)
|
||||
{
|
||||
remarksCPrefix_ = remarksCPrefix;
|
||||
setCoreParameter("RemarksCPrefix", remarksCPrefix);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getCreateTimeRange()const
|
||||
{
|
||||
return createTimeRange_;
|
||||
@@ -311,14 +333,3 @@ void FindImagesRequest::setSetId(const std::string& setId)
|
||||
setCoreParameter("SetId", setId);
|
||||
}
|
||||
|
||||
std::string FindImagesRequest::getModifyTimeRange()const
|
||||
{
|
||||
return modifyTimeRange_;
|
||||
}
|
||||
|
||||
void FindImagesRequest::setModifyTimeRange(const std::string& modifyTimeRange)
|
||||
{
|
||||
modifyTimeRange_ = modifyTimeRange;
|
||||
setCoreParameter("ModifyTimeRange", modifyTimeRange);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,12 @@ void FindImagesResult::parse(const std::string &payload)
|
||||
imagesObject.remarksD = valueImagesImagesItem["RemarksD"].asString();
|
||||
if(!valueImagesImagesItem["ExternalId"].isNull())
|
||||
imagesObject.externalId = valueImagesImagesItem["ExternalId"].asString();
|
||||
if(!valueImagesImagesItem["AddressModifyTime"].isNull())
|
||||
imagesObject.addressModifyTime = valueImagesImagesItem["AddressModifyTime"].asString();
|
||||
if(!valueImagesImagesItem["AddressStatus"].isNull())
|
||||
imagesObject.addressStatus = valueImagesImagesItem["AddressStatus"].asString();
|
||||
if(!valueImagesImagesItem["AddressFailReason"].isNull())
|
||||
imagesObject.addressFailReason = valueImagesImagesItem["AddressFailReason"].asString();
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -235,6 +241,19 @@ void FindImagesResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
if(!addressNode["Country"].isNull())
|
||||
imagesObject.address.country = addressNode["Country"].asString();
|
||||
if(!addressNode["Province"].isNull())
|
||||
imagesObject.address.province = addressNode["Province"].asString();
|
||||
if(!addressNode["City"].isNull())
|
||||
imagesObject.address.city = addressNode["City"].asString();
|
||||
if(!addressNode["District"].isNull())
|
||||
imagesObject.address.district = addressNode["District"].asString();
|
||||
if(!addressNode["Township"].isNull())
|
||||
imagesObject.address.township = addressNode["Township"].asString();
|
||||
images_.push_back(imagesObject);
|
||||
}
|
||||
if(!value["SetId"].isNull())
|
||||
|
||||
@@ -167,6 +167,19 @@ void GetImageResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
celebrity_.push_back(celebrityObject);
|
||||
}
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
address_.addressLine = addressNode["AddressLine"].asString();
|
||||
if(!addressNode["Country"].isNull())
|
||||
address_.country = addressNode["Country"].asString();
|
||||
if(!addressNode["Province"].isNull())
|
||||
address_.province = addressNode["Province"].asString();
|
||||
if(!addressNode["City"].isNull())
|
||||
address_.city = addressNode["City"].asString();
|
||||
if(!addressNode["District"].isNull())
|
||||
address_.district = addressNode["District"].asString();
|
||||
if(!addressNode["Township"].isNull())
|
||||
address_.township = addressNode["Township"].asString();
|
||||
if(!value["SetId"].isNull())
|
||||
setId_ = value["SetId"].asString();
|
||||
if(!value["ImageUri"].isNull())
|
||||
@@ -231,6 +244,12 @@ void GetImageResult::parse(const std::string &payload)
|
||||
remarksD_ = value["RemarksD"].asString();
|
||||
if(!value["ExternalId"].isNull())
|
||||
externalId_ = value["ExternalId"].asString();
|
||||
if(!value["AddressModifyTime"].isNull())
|
||||
addressModifyTime_ = value["AddressModifyTime"].asString();
|
||||
if(!value["AddressStatus"].isNull())
|
||||
addressStatus_ = value["AddressStatus"].asString();
|
||||
if(!value["AddressFailReason"].isNull())
|
||||
addressFailReason_ = value["AddressFailReason"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -239,6 +258,11 @@ std::string GetImageResult::getModifyTime()const
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
GetImageResult::Address GetImageResult::getAddress()const
|
||||
{
|
||||
return address_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getSourceType()const
|
||||
{
|
||||
return sourceType_;
|
||||
@@ -259,11 +283,21 @@ std::string GetImageResult::getRemarksA()const
|
||||
return remarksA_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressFailReason()const
|
||||
{
|
||||
return addressFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksB()const
|
||||
{
|
||||
return remarksB_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressModifyTime()const
|
||||
{
|
||||
return addressModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageFormat()const
|
||||
{
|
||||
return imageFormat_;
|
||||
@@ -319,6 +353,11 @@ std::vector<GetImageResult::TagsItem> GetImageResult::getTags()const
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressStatus()const
|
||||
{
|
||||
return addressStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getFacesStatus()const
|
||||
{
|
||||
return facesStatus_;
|
||||
|
||||
@@ -105,6 +105,12 @@ void ListImagesResult::parse(const std::string &payload)
|
||||
imagesObject.remarksD = valueImagesImagesItem["RemarksD"].asString();
|
||||
if(!valueImagesImagesItem["ExternalId"].isNull())
|
||||
imagesObject.externalId = valueImagesImagesItem["ExternalId"].asString();
|
||||
if(!valueImagesImagesItem["AddressModifyTime"].isNull())
|
||||
imagesObject.addressModifyTime = valueImagesImagesItem["AddressModifyTime"].asString();
|
||||
if(!valueImagesImagesItem["AddressStatus"].isNull())
|
||||
imagesObject.addressStatus = valueImagesImagesItem["AddressStatus"].asString();
|
||||
if(!valueImagesImagesItem["AddressFailReason"].isNull())
|
||||
imagesObject.addressFailReason = valueImagesImagesItem["AddressFailReason"].asString();
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -235,6 +241,19 @@ void ListImagesResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
if(!addressNode["Country"].isNull())
|
||||
imagesObject.address.country = addressNode["Country"].asString();
|
||||
if(!addressNode["Province"].isNull())
|
||||
imagesObject.address.province = addressNode["Province"].asString();
|
||||
if(!addressNode["City"].isNull())
|
||||
imagesObject.address.city = addressNode["City"].asString();
|
||||
if(!addressNode["District"].isNull())
|
||||
imagesObject.address.district = addressNode["District"].asString();
|
||||
if(!addressNode["Township"].isNull())
|
||||
imagesObject.address.township = addressNode["Township"].asString();
|
||||
images_.push_back(imagesObject);
|
||||
}
|
||||
if(!value["SetId"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user