PullActionData add parameters.

This commit is contained in:
sdk-team
2020-08-20 16:14:12 +08:00
parent 5255330d62
commit 53ac431b11
11 changed files with 119 additions and 6 deletions

View File

@@ -35,12 +35,15 @@ namespace AlibabaCloud
DescribeCursorRequest();
~DescribeCursorRequest();
int getPartitionIndex()const;
void setPartitionIndex(int partitionIndex);
long getStoreId()const;
void setStoreId(long storeId);
std::string getTime()const;
void setTime(const std::string& time);
private:
int partitionIndex_;
long storeId_;
std::string time_;

View File

@@ -37,17 +37,25 @@ namespace AlibabaCloud
DescribeCursorResult();
explicit DescribeCursorResult(const std::string &payload);
~DescribeCursorResult();
std::string getMessage()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::string getErrorMessage()const;
std::string getCursor()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string cursor_;
std::string code_;
bool success_;
};

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
PullActionDataRequest();
~PullActionDataRequest();
int getPartitionIndex()const;
void setPartitionIndex(int partitionIndex);
long getStoreId()const;
void setStoreId(long storeId);
long getEndMessageId()const;
@@ -45,6 +47,7 @@ namespace AlibabaCloud
void setStartMessageId(long startMessageId);
private:
int partitionIndex_;
long storeId_;
long endMessageId_;
int limit_;

View File

@@ -75,19 +75,29 @@ namespace AlibabaCloud
PullActionDataResult();
explicit PullActionDataResult(const std::string &payload);
~PullActionDataResult();
std::string getMessage()const;
std::vector<Action> getActions()const;
long getNextMessageId()const;
int getPartitionIndex()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<Action> actions_;
long nextMessageId_;
int partitionIndex_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string code_;
bool success_;
};

View File

@@ -31,21 +31,21 @@ ReidClient::ReidClient(const Credentials &credentials, const ClientConfiguration
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.3");
}
ReidClient::ReidClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.3");
}
ReidClient::ReidClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.3");
}
ReidClient::~ReidClient()

View File

@@ -27,6 +27,17 @@ DescribeCursorRequest::DescribeCursorRequest() :
DescribeCursorRequest::~DescribeCursorRequest()
{}
int DescribeCursorRequest::getPartitionIndex()const
{
return partitionIndex_;
}
void DescribeCursorRequest::setPartitionIndex(int partitionIndex)
{
partitionIndex_ = partitionIndex;
setBodyParameter("PartitionIndex", std::to_string(partitionIndex));
}
long DescribeCursorRequest::getStoreId()const
{
return storeId_;

View File

@@ -45,16 +45,39 @@ void DescribeCursorResult::parse(const std::string &payload)
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Cursor"].isNull())
cursor_ = value["Cursor"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::string DescribeCursorResult::getMessage()const
{
return message_;
}
std::string DescribeCursorResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string DescribeCursorResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeCursorResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string DescribeCursorResult::getErrorMessage()const
{
return errorMessage_;
@@ -65,6 +88,11 @@ std::string DescribeCursorResult::getCursor()const
return cursor_;
}
std::string DescribeCursorResult::getCode()const
{
return code_;
}
bool DescribeCursorResult::getSuccess()const
{
return success_;

View File

@@ -27,6 +27,17 @@ PullActionDataRequest::PullActionDataRequest() :
PullActionDataRequest::~PullActionDataRequest()
{}
int PullActionDataRequest::getPartitionIndex()const
{
return partitionIndex_;
}
void PullActionDataRequest::setPartitionIndex(int partitionIndex)
{
partitionIndex_ = partitionIndex;
setBodyParameter("PartitionIndex", std::to_string(partitionIndex));
}
long PullActionDataRequest::getStoreId()const
{
return storeId_;

View File

@@ -77,14 +77,14 @@ void PullActionDataResult::parse(const std::string &payload)
actionsObject.locationId = std::stol(valueActionsAction["LocationId"].asString());
if(!valueActionsAction["StayPeriod"].isNull())
actionsObject.stayPeriod = std::stoi(valueActionsAction["StayPeriod"].asString());
if(!valueActionsAction["FacePointNumber"].isNull())
actionsObject.facePointNumber = std::stoi(valueActionsAction["FacePointNumber"].asString());
if(!valueActionsAction["Score"].isNull())
actionsObject.score = std::stof(valueActionsAction["Score"].asString());
if(!valueActionsAction["SpecialType"].isNull())
actionsObject.specialType = valueActionsAction["SpecialType"].asString();
if(!valueActionsAction["ImageObjectKey"].isNull())
actionsObject.imageObjectKey = valueActionsAction["ImageObjectKey"].asString();
if(!valueActionsAction["FacePointNumber"].isNull())
actionsObject.facePointNumber = std::stoi(valueActionsAction["FacePointNumber"].asString());
auto objectPositionInImageNode = value["ObjectPositionInImage"];
if(!objectPositionInImageNode["Bottom"].isNull())
actionsObject.objectPositionInImage.bottom = std::stof(objectPositionInImageNode["Bottom"].asString());
@@ -105,13 +105,28 @@ void PullActionDataResult::parse(const std::string &payload)
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["PartitionIndex"].isNull())
partitionIndex_ = std::stoi(value["PartitionIndex"].asString());
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["NextMessageId"].isNull())
nextMessageId_ = std::stol(value["NextMessageId"].asString());
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::string PullActionDataResult::getMessage()const
{
return message_;
}
std::vector<PullActionDataResult::Action> PullActionDataResult::getActions()const
{
return actions_;
@@ -122,16 +137,36 @@ long PullActionDataResult::getNextMessageId()const
return nextMessageId_;
}
int PullActionDataResult::getPartitionIndex()const
{
return partitionIndex_;
}
std::string PullActionDataResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string PullActionDataResult::getErrorCode()const
{
return errorCode_;
}
std::string PullActionDataResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string PullActionDataResult::getErrorMessage()const
{
return errorMessage_;
}
std::string PullActionDataResult::getCode()const
{
return code_;
}
bool PullActionDataResult::getSuccess()const
{
return success_;