Public V430.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-06-21 Version: 1.36.795
|
||||
- Public V430.
|
||||
|
||||
2021-06-21 Version: 1.36.794
|
||||
- Generated 2019-11-20 for `Ga`.
|
||||
|
||||
|
||||
@@ -21,10 +21,6 @@ set(rsimganalys_public_header
|
||||
include/alibabacloud/rsimganalys/RsimganalysExport.h )
|
||||
|
||||
set(rsimganalys_public_header_model
|
||||
include/alibabacloud/rsimganalys/model/AccessAppkeyRequest.h
|
||||
include/alibabacloud/rsimganalys/model/AccessAppkeyResult.h
|
||||
include/alibabacloud/rsimganalys/model/AccessTokenRequest.h
|
||||
include/alibabacloud/rsimganalys/model/AccessTokenResult.h
|
||||
include/alibabacloud/rsimganalys/model/CreateImageRequest.h
|
||||
include/alibabacloud/rsimganalys/model/CreateImageResult.h
|
||||
include/alibabacloud/rsimganalys/model/CreateTaskRequest.h
|
||||
@@ -44,10 +40,6 @@ set(rsimganalys_public_header_model
|
||||
|
||||
set(rsimganalys_src
|
||||
src/RsimganalysClient.cc
|
||||
src/model/AccessAppkeyRequest.cc
|
||||
src/model/AccessAppkeyResult.cc
|
||||
src/model/AccessTokenRequest.cc
|
||||
src/model/AccessTokenResult.cc
|
||||
src/model/CreateImageRequest.cc
|
||||
src/model/CreateImageResult.cc
|
||||
src/model/CreateTaskRequest.cc
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "RsimganalysExport.h"
|
||||
#include "model/AccessAppkeyRequest.h"
|
||||
#include "model/AccessAppkeyResult.h"
|
||||
#include "model/AccessTokenRequest.h"
|
||||
#include "model/AccessTokenResult.h"
|
||||
#include "model/CreateImageRequest.h"
|
||||
#include "model/CreateImageResult.h"
|
||||
#include "model/CreateTaskRequest.h"
|
||||
@@ -51,12 +47,6 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT RsimganalysClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::AccessAppkeyResult> AccessAppkeyOutcome;
|
||||
typedef std::future<AccessAppkeyOutcome> AccessAppkeyOutcomeCallable;
|
||||
typedef std::function<void(const RsimganalysClient*, const Model::AccessAppkeyRequest&, const AccessAppkeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AccessAppkeyAsyncHandler;
|
||||
typedef Outcome<Error, Model::AccessTokenResult> AccessTokenOutcome;
|
||||
typedef std::future<AccessTokenOutcome> AccessTokenOutcomeCallable;
|
||||
typedef std::function<void(const RsimganalysClient*, const Model::AccessTokenRequest&, const AccessTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AccessTokenAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateImageResult> CreateImageOutcome;
|
||||
typedef std::future<CreateImageOutcome> CreateImageOutcomeCallable;
|
||||
typedef std::function<void(const RsimganalysClient*, const Model::CreateImageRequest&, const CreateImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateImageAsyncHandler;
|
||||
@@ -86,12 +76,6 @@ namespace AlibabaCloud
|
||||
RsimganalysClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
RsimganalysClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~RsimganalysClient();
|
||||
AccessAppkeyOutcome accessAppkey(const Model::AccessAppkeyRequest &request)const;
|
||||
void accessAppkeyAsync(const Model::AccessAppkeyRequest& request, const AccessAppkeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AccessAppkeyOutcomeCallable accessAppkeyCallable(const Model::AccessAppkeyRequest& request) const;
|
||||
AccessTokenOutcome accessToken(const Model::AccessTokenRequest &request)const;
|
||||
void accessTokenAsync(const Model::AccessTokenRequest& request, const AccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AccessTokenOutcomeCallable accessTokenCallable(const Model::AccessTokenRequest& request) const;
|
||||
CreateImageOutcome createImage(const Model::CreateImageRequest &request)const;
|
||||
void createImageAsync(const Model::CreateImageRequest& request, const CreateImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateImageOutcomeCallable createImageCallable(const Model::CreateImageRequest& request) const;
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_
|
||||
#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/rsimganalys/RsimganalysExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Rsimganalys
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessAppkeyRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AccessAppkeyRequest();
|
||||
~AccessAppkeyRequest();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_
|
||||
#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/rsimganalys/RsimganalysExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Rsimganalys
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessAppkeyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AccessAppkeyResult();
|
||||
explicit AccessAppkeyResult(const std::string &payload);
|
||||
~AccessAppkeyResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/rsimganalys/RsimganalysExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Rsimganalys
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AccessTokenRequest();
|
||||
~AccessTokenRequest();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_
|
||||
#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/rsimganalys/RsimganalysExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Rsimganalys
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AccessTokenResult();
|
||||
explicit AccessTokenResult(const std::string &payload);
|
||||
~AccessTokenResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_
|
||||
@@ -32,22 +32,6 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT CreateImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string description;
|
||||
std::string gmtModified;
|
||||
int runStatus;
|
||||
std::string downloadPath;
|
||||
long fileTime;
|
||||
std::string statusCode;
|
||||
std::string statusMessage;
|
||||
std::string imageName;
|
||||
std::string gmtCreate;
|
||||
std::string aliyunPK;
|
||||
int imageId;
|
||||
std::string jobId;
|
||||
std::string urlUploadPath;
|
||||
};
|
||||
|
||||
|
||||
CreateImageResult();
|
||||
@@ -55,7 +39,7 @@ namespace AlibabaCloud
|
||||
~CreateImageResult();
|
||||
std::string getUserResolution()const;
|
||||
std::string getImageId()const;
|
||||
Data getData()const;
|
||||
std::vector<std::string> getItems()const;
|
||||
std::string getResultMessage()const;
|
||||
int getResultCode()const;
|
||||
int getPublishStatus()const;
|
||||
@@ -65,7 +49,7 @@ namespace AlibabaCloud
|
||||
private:
|
||||
std::string userResolution_;
|
||||
std::string imageId_;
|
||||
Data data_;
|
||||
std::vector<std::string> items_;
|
||||
std::string resultMessage_;
|
||||
int resultCode_;
|
||||
int publishStatus_;
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace AlibabaCloud
|
||||
void setAppkey(const std::string& appkey);
|
||||
std::string getDstImageId()const;
|
||||
void setDstImageId(const std::string& dstImageId);
|
||||
std::string getJobName()const;
|
||||
void setJobName(const std::string& jobName);
|
||||
|
||||
private:
|
||||
float confidence_;
|
||||
@@ -64,6 +66,7 @@ namespace AlibabaCloud
|
||||
std::string srcImageId_;
|
||||
std::string appkey_;
|
||||
std::string dstImageId_;
|
||||
std::string jobName_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,12 +37,9 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getJobId()const;
|
||||
void setJobId(const std::string& jobId);
|
||||
std::string getAppkey()const;
|
||||
void setAppkey(const std::string& appkey);
|
||||
|
||||
private:
|
||||
std::string jobId_;
|
||||
std::string appkey_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace AlibabaCloud
|
||||
std::string appkey;
|
||||
int runStatus;
|
||||
long fileTime;
|
||||
std::string publicResult;
|
||||
std::string pixelSize;
|
||||
std::string resolution;
|
||||
int publishStatus;
|
||||
@@ -51,7 +52,6 @@ namespace AlibabaCloud
|
||||
GetImageResult();
|
||||
explicit GetImageResult(const std::string &payload);
|
||||
~GetImageResult();
|
||||
std::string getDownloadPath()const;
|
||||
Data getData()const;
|
||||
std::string getResultMessage()const;
|
||||
std::string getResultCode()const;
|
||||
@@ -59,7 +59,6 @@ namespace AlibabaCloud
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string downloadPath_;
|
||||
Data data_;
|
||||
std::string resultMessage_;
|
||||
std::string resultCode_;
|
||||
|
||||
@@ -35,11 +35,29 @@ namespace AlibabaCloud
|
||||
ListTasksRequest();
|
||||
~ListTasksRequest();
|
||||
|
||||
std::string getSubmitTime()const;
|
||||
void setSubmitTime(const std::string& submitTime);
|
||||
int getRunStatus()const;
|
||||
void setRunStatus(int runStatus);
|
||||
int getProductType()const;
|
||||
void setProductType(int productType);
|
||||
int getPageNo()const;
|
||||
void setPageNo(int pageNo);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getAppkey()const;
|
||||
void setAppkey(const std::string& appkey);
|
||||
std::string getJobName()const;
|
||||
void setJobName(const std::string& jobName);
|
||||
|
||||
private:
|
||||
std::string submitTime_;
|
||||
int runStatus_;
|
||||
int productType_;
|
||||
int pageNo_;
|
||||
int pageSize_;
|
||||
std::string appkey_;
|
||||
std::string jobName_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,43 +32,48 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_RSIMGANALYS_EXPORT ListTasksResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Contents
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
int progress;
|
||||
long createTime;
|
||||
std::string request;
|
||||
std::string _namespace;
|
||||
int statusCode;
|
||||
std::string statusMessage;
|
||||
std::string response;
|
||||
std::string version;
|
||||
long lastUpdateTime;
|
||||
std::string userId;
|
||||
std::string appkey;
|
||||
int enableZoneIdentification;
|
||||
std::string jobId;
|
||||
int publishStatus;
|
||||
struct Contents
|
||||
{
|
||||
std::string status;
|
||||
int progress;
|
||||
long createTime;
|
||||
std::string request;
|
||||
std::string jobName;
|
||||
std::string _namespace;
|
||||
int statusCode;
|
||||
std::string statusMessage;
|
||||
std::string response;
|
||||
std::string jobType;
|
||||
long lastUpdateTime;
|
||||
std::string version;
|
||||
std::string userId;
|
||||
std::string appkey;
|
||||
std::string jobMessage;
|
||||
int enableZoneIdentification;
|
||||
std::string jobId;
|
||||
int publishStatus;
|
||||
};
|
||||
int pages;
|
||||
int pageSize;
|
||||
std::vector<Contents> content;
|
||||
int total;
|
||||
int pageNo;
|
||||
};
|
||||
|
||||
|
||||
ListTasksResult();
|
||||
explicit ListTasksResult(const std::string &payload);
|
||||
~ListTasksResult();
|
||||
int getTotalCount()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
std::vector<Contents> getData()const;
|
||||
Data getData()const;
|
||||
std::string getResultMessage()const;
|
||||
int getResultCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int totalCount_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
std::vector<Contents> data_;
|
||||
Data data_;
|
||||
std::string resultMessage_;
|
||||
int resultCode_;
|
||||
|
||||
|
||||
@@ -31,98 +31,26 @@ RsimganalysClient::RsimganalysClient(const Credentials &credentials, const Clien
|
||||
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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys");
|
||||
}
|
||||
|
||||
RsimganalysClient::RsimganalysClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys");
|
||||
}
|
||||
|
||||
RsimganalysClient::RsimganalysClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys");
|
||||
}
|
||||
|
||||
RsimganalysClient::~RsimganalysClient()
|
||||
{}
|
||||
|
||||
RsimganalysClient::AccessAppkeyOutcome RsimganalysClient::accessAppkey(const AccessAppkeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AccessAppkeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AccessAppkeyOutcome(AccessAppkeyResult(outcome.result()));
|
||||
else
|
||||
return AccessAppkeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void RsimganalysClient::accessAppkeyAsync(const AccessAppkeyRequest& request, const AccessAppkeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, accessAppkey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
RsimganalysClient::AccessAppkeyOutcomeCallable RsimganalysClient::accessAppkeyCallable(const AccessAppkeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AccessAppkeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->accessAppkey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RsimganalysClient::AccessTokenOutcome RsimganalysClient::accessToken(const AccessTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AccessTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AccessTokenOutcome(AccessTokenResult(outcome.result()));
|
||||
else
|
||||
return AccessTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void RsimganalysClient::accessTokenAsync(const AccessTokenRequest& request, const AccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, accessToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
RsimganalysClient::AccessTokenOutcomeCallable RsimganalysClient::accessTokenCallable(const AccessTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AccessTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->accessToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RsimganalysClient::CreateImageOutcome RsimganalysClient::createImage(const CreateImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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/rsimganalys/model/AccessAppkeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Rsimganalys::Model::AccessAppkeyRequest;
|
||||
|
||||
AccessAppkeyRequest::AccessAppkeyRequest() :
|
||||
RpcServiceRequest("rsimganalys", "2019-08-01", "AccessAppkey")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AccessAppkeyRequest::~AccessAppkeyRequest()
|
||||
{}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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/rsimganalys/model/AccessAppkeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Rsimganalys;
|
||||
using namespace AlibabaCloud::Rsimganalys::Model;
|
||||
|
||||
AccessAppkeyResult::AccessAppkeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AccessAppkeyResult::AccessAppkeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AccessAppkeyResult::~AccessAppkeyResult()
|
||||
{}
|
||||
|
||||
void AccessAppkeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AccessAppkeyResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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/rsimganalys/model/AccessTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::Rsimganalys::Model::AccessTokenRequest;
|
||||
|
||||
AccessTokenRequest::AccessTokenRequest() :
|
||||
RpcServiceRequest("rsimganalys", "2019-08-01", "AccessToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AccessTokenRequest::~AccessTokenRequest()
|
||||
{}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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/rsimganalys/model/AccessTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Rsimganalys;
|
||||
using namespace AlibabaCloud::Rsimganalys::Model;
|
||||
|
||||
AccessTokenResult::AccessTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AccessTokenResult::AccessTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AccessTokenResult::~AccessTokenResult()
|
||||
{}
|
||||
|
||||
void AccessTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AccessTokenResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -39,39 +39,15 @@ void CreateImageResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["AliyunPK"].isNull())
|
||||
data_.aliyunPK = dataNode["AliyunPK"].asString();
|
||||
if(!dataNode["Description"].isNull())
|
||||
data_.description = dataNode["Description"].asString();
|
||||
if(!dataNode["DownloadPath"].isNull())
|
||||
data_.downloadPath = dataNode["DownloadPath"].asString();
|
||||
if(!dataNode["GmtCreate"].isNull())
|
||||
data_.gmtCreate = dataNode["GmtCreate"].asString();
|
||||
if(!dataNode["GmtModified"].isNull())
|
||||
data_.gmtModified = dataNode["GmtModified"].asString();
|
||||
if(!dataNode["ImageId"].isNull())
|
||||
data_.imageId = std::stoi(dataNode["ImageId"].asString());
|
||||
if(!dataNode["JobId"].isNull())
|
||||
data_.jobId = dataNode["JobId"].asString();
|
||||
if(!dataNode["ImageName"].isNull())
|
||||
data_.imageName = dataNode["ImageName"].asString();
|
||||
if(!dataNode["RunStatus"].isNull())
|
||||
data_.runStatus = std::stoi(dataNode["RunStatus"].asString());
|
||||
if(!dataNode["UrlUploadPath"].isNull())
|
||||
data_.urlUploadPath = dataNode["UrlUploadPath"].asString();
|
||||
if(!dataNode["FileTime"].isNull())
|
||||
data_.fileTime = std::stol(dataNode["FileTime"].asString());
|
||||
if(!dataNode["StatusCode"].isNull())
|
||||
data_.statusCode = dataNode["StatusCode"].asString();
|
||||
if(!dataNode["StatusMessage"].isNull())
|
||||
data_.statusMessage = dataNode["StatusMessage"].asString();
|
||||
auto allItems = value["Items"]["Contents"];
|
||||
for (const auto &item : allItems)
|
||||
items_.push_back(item.asString());
|
||||
if(!value["ResultCode"].isNull())
|
||||
resultCode_ = std::stoi(value["ResultCode"].asString());
|
||||
if(!value["ImageId"].isNull())
|
||||
imageId_ = value["ImageId"].asString();
|
||||
if(!value["ResultMessage"].isNull())
|
||||
resultMessage_ = value["ResultMessage"].asString();
|
||||
if(!value["ImageId"].isNull())
|
||||
imageId_ = value["ImageId"].asString();
|
||||
if(!value["UserResolution"].isNull())
|
||||
userResolution_ = value["UserResolution"].asString();
|
||||
if(!value["PublishStatus"].isNull())
|
||||
@@ -89,9 +65,9 @@ std::string CreateImageResult::getImageId()const
|
||||
return imageId_;
|
||||
}
|
||||
|
||||
CreateImageResult::Data CreateImageResult::getData()const
|
||||
std::vector<std::string> CreateImageResult::getItems()const
|
||||
{
|
||||
return data_;
|
||||
return items_;
|
||||
}
|
||||
|
||||
std::string CreateImageResult::getResultMessage()const
|
||||
|
||||
@@ -126,3 +126,14 @@ void CreateTaskRequest::setDstImageId(const std::string& dstImageId)
|
||||
setParameter("DstImageId", dstImageId);
|
||||
}
|
||||
|
||||
std::string CreateTaskRequest::getJobName()const
|
||||
{
|
||||
return jobName_;
|
||||
}
|
||||
|
||||
void CreateTaskRequest::setJobName(const std::string& jobName)
|
||||
{
|
||||
jobName_ = jobName;
|
||||
setParameter("JobName", jobName);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,14 +38,3 @@ void DeleteTaskRequest::setJobId(const std::string& jobId)
|
||||
setParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
std::string DeleteTaskRequest::getAppkey()const
|
||||
{
|
||||
return appkey_;
|
||||
}
|
||||
|
||||
void DeleteTaskRequest::setAppkey(const std::string& appkey)
|
||||
{
|
||||
appkey_ = appkey;
|
||||
setParameter("Appkey", appkey);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,20 +62,15 @@ void GetImageResult::parse(const std::string &payload)
|
||||
data_.pixelSize = dataNode["PixelSize"].asString();
|
||||
if(!dataNode["PublishStatus"].isNull())
|
||||
data_.publishStatus = std::stoi(dataNode["PublishStatus"].asString());
|
||||
if(!dataNode["PublicResult"].isNull())
|
||||
data_.publicResult = dataNode["PublicResult"].asString();
|
||||
if(!value["ResultCode"].isNull())
|
||||
resultCode_ = value["ResultCode"].asString();
|
||||
if(!value["ResultMessage"].isNull())
|
||||
resultMessage_ = value["ResultMessage"].asString();
|
||||
if(!value["DownloadPath"].isNull())
|
||||
downloadPath_ = value["DownloadPath"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetImageResult::getDownloadPath()const
|
||||
{
|
||||
return downloadPath_;
|
||||
}
|
||||
|
||||
GetImageResult::Data GetImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
|
||||
@@ -27,6 +27,61 @@ ListTasksRequest::ListTasksRequest() :
|
||||
ListTasksRequest::~ListTasksRequest()
|
||||
{}
|
||||
|
||||
std::string ListTasksRequest::getSubmitTime()const
|
||||
{
|
||||
return submitTime_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setSubmitTime(const std::string& submitTime)
|
||||
{
|
||||
submitTime_ = submitTime;
|
||||
setParameter("SubmitTime", submitTime);
|
||||
}
|
||||
|
||||
int ListTasksRequest::getRunStatus()const
|
||||
{
|
||||
return runStatus_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setRunStatus(int runStatus)
|
||||
{
|
||||
runStatus_ = runStatus;
|
||||
setParameter("RunStatus", std::to_string(runStatus));
|
||||
}
|
||||
|
||||
int ListTasksRequest::getProductType()const
|
||||
{
|
||||
return productType_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setProductType(int productType)
|
||||
{
|
||||
productType_ = productType;
|
||||
setParameter("ProductType", std::to_string(productType));
|
||||
}
|
||||
|
||||
int ListTasksRequest::getPageNo()const
|
||||
{
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setPageNo(int pageNo)
|
||||
{
|
||||
pageNo_ = pageNo;
|
||||
setParameter("PageNo", std::to_string(pageNo));
|
||||
}
|
||||
|
||||
int ListTasksRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListTasksRequest::getAppkey()const
|
||||
{
|
||||
return appkey_;
|
||||
@@ -38,3 +93,14 @@ void ListTasksRequest::setAppkey(const std::string& appkey)
|
||||
setParameter("Appkey", appkey);
|
||||
}
|
||||
|
||||
std::string ListTasksRequest::getJobName()const
|
||||
{
|
||||
return jobName_;
|
||||
}
|
||||
|
||||
void ListTasksRequest::setJobName(const std::string& jobName)
|
||||
{
|
||||
jobName_ = jobName;
|
||||
setParameter("JobName", jobName);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,71 +39,65 @@ void ListTasksResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataNode = value["Data"]["Contents"];
|
||||
for (auto valueDataContents : allDataNode)
|
||||
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["Total"].isNull())
|
||||
data_.total = std::stoi(dataNode["Total"].asString());
|
||||
if(!dataNode["Pages"].isNull())
|
||||
data_.pages = std::stoi(dataNode["Pages"].asString());
|
||||
auto allContentNode = dataNode["Content"]["Contents"];
|
||||
for (auto dataNodeContentContents : allContentNode)
|
||||
{
|
||||
Contents dataObject;
|
||||
if(!valueDataContents["Appkey"].isNull())
|
||||
dataObject.appkey = valueDataContents["Appkey"].asString();
|
||||
if(!valueDataContents["UserId"].isNull())
|
||||
dataObject.userId = valueDataContents["UserId"].asString();
|
||||
if(!valueDataContents["JobId"].isNull())
|
||||
dataObject.jobId = valueDataContents["JobId"].asString();
|
||||
if(!valueDataContents["Status"].isNull())
|
||||
dataObject.status = valueDataContents["Status"].asString();
|
||||
if(!valueDataContents["Request"].isNull())
|
||||
dataObject.request = valueDataContents["Request"].asString();
|
||||
if(!valueDataContents["Progress"].isNull())
|
||||
dataObject.progress = std::stoi(valueDataContents["Progress"].asString());
|
||||
if(!valueDataContents["Namespace"].isNull())
|
||||
dataObject._namespace = valueDataContents["Namespace"].asString();
|
||||
if(!valueDataContents["Version"].isNull())
|
||||
dataObject.version = valueDataContents["Version"].asString();
|
||||
if(!valueDataContents["CreateTime"].isNull())
|
||||
dataObject.createTime = std::stol(valueDataContents["CreateTime"].asString());
|
||||
if(!valueDataContents["LastUpdateTime"].isNull())
|
||||
dataObject.lastUpdateTime = std::stol(valueDataContents["LastUpdateTime"].asString());
|
||||
if(!valueDataContents["Response"].isNull())
|
||||
dataObject.response = valueDataContents["Response"].asString();
|
||||
if(!valueDataContents["StatusMessage"].isNull())
|
||||
dataObject.statusMessage = valueDataContents["StatusMessage"].asString();
|
||||
if(!valueDataContents["StatusCode"].isNull())
|
||||
dataObject.statusCode = std::stoi(valueDataContents["StatusCode"].asString());
|
||||
if(!valueDataContents["EnableZoneIdentification"].isNull())
|
||||
dataObject.enableZoneIdentification = std::stoi(valueDataContents["EnableZoneIdentification"].asString());
|
||||
if(!valueDataContents["PublishStatus"].isNull())
|
||||
dataObject.publishStatus = std::stoi(valueDataContents["PublishStatus"].asString());
|
||||
data_.push_back(dataObject);
|
||||
Data::Contents contentsObject;
|
||||
if(!dataNodeContentContents["Appkey"].isNull())
|
||||
contentsObject.appkey = dataNodeContentContents["Appkey"].asString();
|
||||
if(!dataNodeContentContents["CreateTime"].isNull())
|
||||
contentsObject.createTime = std::stol(dataNodeContentContents["CreateTime"].asString());
|
||||
if(!dataNodeContentContents["EnableZoneIdentification"].isNull())
|
||||
contentsObject.enableZoneIdentification = std::stoi(dataNodeContentContents["EnableZoneIdentification"].asString());
|
||||
if(!dataNodeContentContents["JobId"].isNull())
|
||||
contentsObject.jobId = dataNodeContentContents["JobId"].asString();
|
||||
if(!dataNodeContentContents["LastUpdateTime"].isNull())
|
||||
contentsObject.lastUpdateTime = std::stol(dataNodeContentContents["LastUpdateTime"].asString());
|
||||
if(!dataNodeContentContents["Namespace"].isNull())
|
||||
contentsObject._namespace = dataNodeContentContents["Namespace"].asString();
|
||||
if(!dataNodeContentContents["Progress"].isNull())
|
||||
contentsObject.progress = std::stoi(dataNodeContentContents["Progress"].asString());
|
||||
if(!dataNodeContentContents["PublishStatus"].isNull())
|
||||
contentsObject.publishStatus = std::stoi(dataNodeContentContents["PublishStatus"].asString());
|
||||
if(!dataNodeContentContents["Request"].isNull())
|
||||
contentsObject.request = dataNodeContentContents["Request"].asString();
|
||||
if(!dataNodeContentContents["Response"].isNull())
|
||||
contentsObject.response = dataNodeContentContents["Response"].asString();
|
||||
if(!dataNodeContentContents["Status"].isNull())
|
||||
contentsObject.status = dataNodeContentContents["Status"].asString();
|
||||
if(!dataNodeContentContents["StatusCode"].isNull())
|
||||
contentsObject.statusCode = std::stoi(dataNodeContentContents["StatusCode"].asString());
|
||||
if(!dataNodeContentContents["StatusMessage"].isNull())
|
||||
contentsObject.statusMessage = dataNodeContentContents["StatusMessage"].asString();
|
||||
if(!dataNodeContentContents["UserId"].isNull())
|
||||
contentsObject.userId = dataNodeContentContents["UserId"].asString();
|
||||
if(!dataNodeContentContents["Version"].isNull())
|
||||
contentsObject.version = dataNodeContentContents["Version"].asString();
|
||||
if(!dataNodeContentContents["JobType"].isNull())
|
||||
contentsObject.jobType = dataNodeContentContents["JobType"].asString();
|
||||
if(!dataNodeContentContents["JobMessage"].isNull())
|
||||
contentsObject.jobMessage = dataNodeContentContents["JobMessage"].asString();
|
||||
if(!dataNodeContentContents["JobName"].isNull())
|
||||
contentsObject.jobName = dataNodeContentContents["JobName"].asString();
|
||||
data_.content.push_back(contentsObject);
|
||||
}
|
||||
if(!value["ResultCode"].isNull())
|
||||
resultCode_ = std::stoi(value["ResultCode"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["ResultMessage"].isNull())
|
||||
resultMessage_ = value["ResultMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
int ListTasksResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListTasksResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListTasksResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListTasksResult::Contents> ListTasksResult::getData()const
|
||||
ListTasksResult::Data ListTasksResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user