Support for deploy.

This commit is contained in:
sdk-team
2023-02-17 12:30:27 +00:00
parent ecf1fc42a2
commit 53da02f63b
17 changed files with 1116 additions and 1 deletions

View File

@@ -0,0 +1,70 @@
/*
* 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_VIAPI_VIAPICLIENT_H_
#define ALIBABACLOUD_VIAPI_VIAPICLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "ViapiExport.h"
#include "model/CancelWaitingAsyncJobRequest.h"
#include "model/CancelWaitingAsyncJobResult.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/QueryAsyncJobListRequest.h"
#include "model/QueryAsyncJobListResult.h"
namespace AlibabaCloud
{
namespace Viapi
{
class ALIBABACLOUD_VIAPI_EXPORT ViapiClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::CancelWaitingAsyncJobResult> CancelWaitingAsyncJobOutcome;
typedef std::future<CancelWaitingAsyncJobOutcome> CancelWaitingAsyncJobOutcomeCallable;
typedef std::function<void(const ViapiClient*, const Model::CancelWaitingAsyncJobRequest&, const CancelWaitingAsyncJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelWaitingAsyncJobAsyncHandler;
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const ViapiClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::QueryAsyncJobListResult> QueryAsyncJobListOutcome;
typedef std::future<QueryAsyncJobListOutcome> QueryAsyncJobListOutcomeCallable;
typedef std::function<void(const ViapiClient*, const Model::QueryAsyncJobListRequest&, const QueryAsyncJobListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryAsyncJobListAsyncHandler;
ViapiClient(const Credentials &credentials, const ClientConfiguration &configuration);
ViapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
ViapiClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~ViapiClient();
CancelWaitingAsyncJobOutcome cancelWaitingAsyncJob(const Model::CancelWaitingAsyncJobRequest &request)const;
void cancelWaitingAsyncJobAsync(const Model::CancelWaitingAsyncJobRequest& request, const CancelWaitingAsyncJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CancelWaitingAsyncJobOutcomeCallable cancelWaitingAsyncJobCallable(const Model::CancelWaitingAsyncJobRequest& request) const;
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
QueryAsyncJobListOutcome queryAsyncJobList(const Model::QueryAsyncJobListRequest &request)const;
void queryAsyncJobListAsync(const Model::QueryAsyncJobListRequest& request, const QueryAsyncJobListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryAsyncJobListOutcomeCallable queryAsyncJobListCallable(const Model::QueryAsyncJobListRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_VIAPI_VIAPICLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* 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_VIAPI_VIAPIEXPORT_H_
#define ALIBABACLOUD_VIAPI_VIAPIEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_VIAPI_LIBRARY)
# define ALIBABACLOUD_VIAPI_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_VIAPI_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_VIAPI_EXPORT
#endif
#endif // !ALIBABACLOUD_VIAPI_VIAPIEXPORT_H_

View File

@@ -0,0 +1,45 @@
/*
* 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_VIAPI_MODEL_CANCELWAITINGASYNCJOBREQUEST_H_
#define ALIBABACLOUD_VIAPI_MODEL_CANCELWAITINGASYNCJOBREQUEST_H_
#include <alibabacloud/viapi/ViapiExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Viapi {
namespace Model {
class ALIBABACLOUD_VIAPI_EXPORT CancelWaitingAsyncJobRequest : public RpcServiceRequest {
public:
CancelWaitingAsyncJobRequest();
~CancelWaitingAsyncJobRequest();
std::string getJobId() const;
void setJobId(const std::string &jobId);
bool getAsync() const;
void setAsync(bool async);
private:
std::string jobId_;
bool async_;
};
} // namespace Model
} // namespace Viapi
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_VIAPI_MODEL_CANCELWAITINGASYNCJOBREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_VIAPI_MODEL_CANCELWAITINGASYNCJOBRESULT_H_
#define ALIBABACLOUD_VIAPI_MODEL_CANCELWAITINGASYNCJOBRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/viapi/ViapiExport.h>
namespace AlibabaCloud
{
namespace Viapi
{
namespace Model
{
class ALIBABACLOUD_VIAPI_EXPORT CancelWaitingAsyncJobResult : public ServiceResult
{
public:
CancelWaitingAsyncJobResult();
explicit CancelWaitingAsyncJobResult(const std::string &payload);
~CancelWaitingAsyncJobResult();
std::string getHttpCode()const;
std::string getMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string httpCode_;
std::string message_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_VIAPI_MODEL_CANCELWAITINGASYNCJOBRESULT_H_

View File

@@ -0,0 +1,45 @@
/*
* 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_VIAPI_MODEL_GETASYNCJOBRESULTREQUEST_H_
#define ALIBABACLOUD_VIAPI_MODEL_GETASYNCJOBRESULTREQUEST_H_
#include <alibabacloud/viapi/ViapiExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Viapi {
namespace Model {
class ALIBABACLOUD_VIAPI_EXPORT GetAsyncJobResultRequest : public RpcServiceRequest {
public:
GetAsyncJobResultRequest();
~GetAsyncJobResultRequest();
std::string getJobId() const;
void setJobId(const std::string &jobId);
bool getAsync() const;
void setAsync(bool async);
private:
std::string jobId_;
bool async_;
};
} // namespace Model
} // namespace Viapi
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_VIAPI_MODEL_GETASYNCJOBRESULTREQUEST_H_

View File

@@ -0,0 +1,59 @@
/*
* 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_VIAPI_MODEL_GETASYNCJOBRESULTRESULT_H_
#define ALIBABACLOUD_VIAPI_MODEL_GETASYNCJOBRESULTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/viapi/ViapiExport.h>
namespace AlibabaCloud
{
namespace Viapi
{
namespace Model
{
class ALIBABACLOUD_VIAPI_EXPORT GetAsyncJobResultResult : public ServiceResult
{
public:
struct Data
{
std::string status;
std::string errorCode;
std::string errorMessage;
std::string jobId;
std::string result;
};
GetAsyncJobResultResult();
explicit GetAsyncJobResultResult(const std::string &payload);
~GetAsyncJobResultResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_VIAPI_MODEL_GETASYNCJOBRESULTRESULT_H_

View File

@@ -0,0 +1,63 @@
/*
* 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_VIAPI_MODEL_QUERYASYNCJOBLISTREQUEST_H_
#define ALIBABACLOUD_VIAPI_MODEL_QUERYASYNCJOBLISTREQUEST_H_
#include <alibabacloud/viapi/ViapiExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Viapi {
namespace Model {
class ALIBABACLOUD_VIAPI_EXPORT QueryAsyncJobListRequest : public RpcServiceRequest {
public:
QueryAsyncJobListRequest();
~QueryAsyncJobListRequest();
std::string getStartTime() const;
void setStartTime(const std::string &startTime);
std::string getPageNum() const;
void setPageNum(const std::string &pageNum);
std::string getJobId() const;
void setJobId(const std::string &jobId);
std::string getPopApiName() const;
void setPopApiName(const std::string &popApiName);
std::string getPageSize() const;
void setPageSize(const std::string &pageSize);
std::string getPopProduct() const;
void setPopProduct(const std::string &popProduct);
std::string getEndTime() const;
void setEndTime(const std::string &endTime);
std::string getStatus() const;
void setStatus(const std::string &status);
private:
std::string startTime_;
std::string pageNum_;
std::string jobId_;
std::string popApiName_;
std::string pageSize_;
std::string popProduct_;
std::string endTime_;
std::string status_;
};
} // namespace Model
} // namespace Viapi
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_VIAPI_MODEL_QUERYASYNCJOBLISTREQUEST_H_

View File

@@ -0,0 +1,76 @@
/*
* 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_VIAPI_MODEL_QUERYASYNCJOBLISTRESULT_H_
#define ALIBABACLOUD_VIAPI_MODEL_QUERYASYNCJOBLISTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/viapi/ViapiExport.h>
namespace AlibabaCloud
{
namespace Viapi
{
namespace Model
{
class ALIBABACLOUD_VIAPI_EXPORT QueryAsyncJobListResult : public ServiceResult
{
public:
struct Data
{
struct ResultItem
{
std::string status;
std::string gmtCreate;
std::string endTime;
std::string callerParentId;
std::string popApiName;
std::string popProduct;
std::string startTime;
std::string jobId;
};
int pageSize;
int totalPage;
int currentPage;
int totalRecord;
std::vector<ResultItem> result;
};
QueryAsyncJobListResult();
explicit QueryAsyncJobListResult(const std::string &payload);
~QueryAsyncJobListResult();
std::string getHttpCode()const;
std::string getMessage()const;
Data getData()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string httpCode_;
std::string message_;
Data data_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_VIAPI_MODEL_QUERYASYNCJOBLISTRESULT_H_