diff --git a/CHANGELOG.md b/CHANGELOG.md index e3f5854d7..60065e40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,102 @@ +# 3.1.99 2024-08-22 + +### HuaweiCloud SDK DRS + +- _API Version_ + - V5 +- _Features_ + - Support the APIs `UploadUserJdbcDriver`, `SyncUserJdbcDriver`, `ListUserJdbcDrivers`, `DeleteUserJdbcDriver` +- _Bug Fix_ + - None +- _Change_ + - **CreateJob** + - changes of request param + - `+ job.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.source_endpoint.db_type: enum value [mysql]` + - changes of response param + - `+ is_clone_job` + - `+ create_time` + - `+ name` + - `+ id` + - `+ status` + - `- job` + - **BatchCreateJobsAsync** + - changes of request param + - `+ jobs.policy_config.is_create_table_with_index` + - `+ jobs.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.source_endpoint.db_type: enum value [mysql]` + - **ListAsyncJobDetail** + - changes of response param + - `+ jobs.status: enum value [CREATING,CREATE_FAILED,CONFIGURATION,STARTJOBING,WAITING_FOR_START,START_JOB_FAILED,PAUSING,FULL_TRANSFER_STARTED,FULL_TRANSFER_FAILED,FULL_TRANSFER_COMPLETE,INCRE_TRANSFER_STARTED,INCRE_TRANSFER_FAILED,RELEASE_RESOURCE_STARTED,RELEASE_RESOURCE_FAILED,RELEASE_RESOURCE_COMPLETE,REBUILD_NODE_STARTED,REBUILD_NODE_FAILED,CHANGE_JOB_STARTED,CHANGE_JOB_FAILED,DELETED,CHILD_TRANSFER_STARTING,CHILD_TRANSFER_STARTED,CHILD_TRANSFER_COMPLETE,CHILD_TRANSFER_FAILED,RELEASE_CHILD_TRANSFER_STARTED,RELEASE_CHILD_TRANSFER_COMPLETE,NODE_UPGRADE_START,NODE_UPGRADE_COMPLETE,NODE_UPGRADE_FAILED]` + - `+ jobs.policy_config.is_create_table_with_index` + - `+ jobs.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.source_endpoint.db_type: enum value [mysql]` + - **UpdateBatchAsyncJobs** + - changes of request param + - `+ jobs.params.policy_config.is_create_table_with_index` + - `+ jobs.params.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.params.source_endpoint.db_type: enum value [mysql]` + - **ShowJobDetail** + - changes of response param + - `+ job.status: enum value [CREATING,CREATE_FAILED,CONFIGURATION,STARTJOBING,WAITING_FOR_START,START_JOB_FAILED,PAUSING,FULL_TRANSFER_STARTED,FULL_TRANSFER_FAILED,FULL_TRANSFER_COMPLETE,INCRE_TRANSFER_STARTED,INCRE_TRANSFER_FAILED,RELEASE_RESOURCE_STARTED,RELEASE_RESOURCE_FAILED,RELEASE_RESOURCE_COMPLETE,REBUILD_NODE_STARTED,REBUILD_NODE_FAILED,CHANGE_JOB_STARTED,CHANGE_JOB_FAILED,DELETED,CHILD_TRANSFER_STARTING,CHILD_TRANSFER_STARTED,CHILD_TRANSFER_COMPLETE,CHILD_TRANSFER_FAILED,RELEASE_CHILD_TRANSFER_STARTED,RELEASE_CHILD_TRANSFER_COMPLETE,NODE_UPGRADE_START,NODE_UPGRADE_COMPLETE,NODE_UPGRADE_FAILED]` + - `+ job.policy_config.is_create_table_with_index` + - `+ job.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.source_endpoint.db_type: enum value [mysql]` + - **UpdateJob** + - changes of request param + - `+ job.params.policy_config.is_create_table_with_index` + - `+ job.params.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.params.source_endpoint.db_type: enum value [mysql]` + - **ExecuteJobAction** + - changes of request param + - `+ job.action_params.is_only_init_task` + - `+ job.action_params.endpoints.db_type: enum value [mysql]` + - **BatchExecuteJobActions** + - changes of request param + - `+ jobs.action_params.is_only_init_task` + - `+ jobs.action_params.endpoints.db_type: enum value [mysql]` + +### HuaweiCloud SDK GaussDBforopenGauss + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateDbInstance** + - changes of request param + - `+ ha.instance_mode` + +### HuaweiCloud SDK KMS + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateDatakey** + - changes of request param + - `+ additional_authenticated_data` + - **CreateDatakeyWithoutPlaintext** + - changes of request param + - `+ additional_authenticated_data` + - **EncryptDatakey** + - changes of request param + - `+ additional_authenticated_data` + - **DecryptDatakey** + - changes of request param + - `+ additional_authenticated_data` + - **EncryptData** + - changes of request param + - `+ additional_authenticated_data` + - **DecryptData** + - changes of request param + - `+ additional_authenticated_data` + # 3.1.98 2024-08-15 ### HuaweiCloud SDK EIP diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 15c44bc05..3d6069907 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,102 @@ +# 3.1.99 2024-08-22 + +### HuaweiCloud SDK DRS + +- _接口版本_ + - V5 +- _新增特性_ + - 支持接口`UploadUserJdbcDriver`、`SyncUserJdbcDriver`、`ListUserJdbcDrivers`、`DeleteUserJdbcDriver` +- _解决问题_ + - 无 +- _特性变更_ + - **CreateJob** + - 请求参数变更 + - `+ job.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.source_endpoint.db_type: enum value [mysql]` + - 响应参数变更 + - `+ is_clone_job` + - `+ create_time` + - `+ name` + - `+ id` + - `+ status` + - `- job` + - **BatchCreateJobsAsync** + - 请求参数变更 + - `+ jobs.policy_config.is_create_table_with_index` + - `+ jobs.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.source_endpoint.db_type: enum value [mysql]` + - **ListAsyncJobDetail** + - 响应参数变更 + - `+ jobs.status: enum value [CREATING,CREATE_FAILED,CONFIGURATION,STARTJOBING,WAITING_FOR_START,START_JOB_FAILED,PAUSING,FULL_TRANSFER_STARTED,FULL_TRANSFER_FAILED,FULL_TRANSFER_COMPLETE,INCRE_TRANSFER_STARTED,INCRE_TRANSFER_FAILED,RELEASE_RESOURCE_STARTED,RELEASE_RESOURCE_FAILED,RELEASE_RESOURCE_COMPLETE,REBUILD_NODE_STARTED,REBUILD_NODE_FAILED,CHANGE_JOB_STARTED,CHANGE_JOB_FAILED,DELETED,CHILD_TRANSFER_STARTING,CHILD_TRANSFER_STARTED,CHILD_TRANSFER_COMPLETE,CHILD_TRANSFER_FAILED,RELEASE_CHILD_TRANSFER_STARTED,RELEASE_CHILD_TRANSFER_COMPLETE,NODE_UPGRADE_START,NODE_UPGRADE_COMPLETE,NODE_UPGRADE_FAILED]` + - `+ jobs.policy_config.is_create_table_with_index` + - `+ jobs.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.source_endpoint.db_type: enum value [mysql]` + - **UpdateBatchAsyncJobs** + - 请求参数变更 + - `+ jobs.params.policy_config.is_create_table_with_index` + - `+ jobs.params.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ jobs.params.source_endpoint.db_type: enum value [mysql]` + - **ShowJobDetail** + - 响应参数变更 + - `+ job.status: enum value [CREATING,CREATE_FAILED,CONFIGURATION,STARTJOBING,WAITING_FOR_START,START_JOB_FAILED,PAUSING,FULL_TRANSFER_STARTED,FULL_TRANSFER_FAILED,FULL_TRANSFER_COMPLETE,INCRE_TRANSFER_STARTED,INCRE_TRANSFER_FAILED,RELEASE_RESOURCE_STARTED,RELEASE_RESOURCE_FAILED,RELEASE_RESOURCE_COMPLETE,REBUILD_NODE_STARTED,REBUILD_NODE_FAILED,CHANGE_JOB_STARTED,CHANGE_JOB_FAILED,DELETED,CHILD_TRANSFER_STARTING,CHILD_TRANSFER_STARTED,CHILD_TRANSFER_COMPLETE,CHILD_TRANSFER_FAILED,RELEASE_CHILD_TRANSFER_STARTED,RELEASE_CHILD_TRANSFER_COMPLETE,NODE_UPGRADE_START,NODE_UPGRADE_COMPLETE,NODE_UPGRADE_FAILED]` + - `+ job.policy_config.is_create_table_with_index` + - `+ job.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.source_endpoint.db_type: enum value [mysql]` + - **UpdateJob** + - 请求参数变更 + - `+ job.params.policy_config.is_create_table_with_index` + - `+ job.params.base_info.engine_type: enum value [mysql-to-mysql]` + - `+ job.params.source_endpoint.db_type: enum value [mysql]` + - **ExecuteJobAction** + - 请求参数变更 + - `+ job.action_params.is_only_init_task` + - `+ job.action_params.endpoints.db_type: enum value [mysql]` + - **BatchExecuteJobActions** + - 请求参数变更 + - `+ jobs.action_params.is_only_init_task` + - `+ jobs.action_params.endpoints.db_type: enum value [mysql]` + +### HuaweiCloud SDK GaussDBforopenGauss + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateDbInstance** + - 请求参数变更 + - `+ ha.instance_mode` + +### HuaweiCloud SDK KMS + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateDatakey** + - 请求参数变更 + - `+ additional_authenticated_data` + - **CreateDatakeyWithoutPlaintext** + - 请求参数变更 + - `+ additional_authenticated_data` + - **EncryptDatakey** + - 请求参数变更 + - `+ additional_authenticated_data` + - **DecryptDatakey** + - 请求参数变更 + - `+ additional_authenticated_data` + - **EncryptData** + - 请求参数变更 + - `+ additional_authenticated_data` + - **DecryptData** + - 请求参数变更 + - `+ additional_authenticated_data` + # 3.1.98 2024-08-15 ### HuaweiCloud SDK EIP diff --git a/VERSION b/VERSION index f2b751799..07c9214ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.98 +3.1.99 diff --git a/drs/include/huaweicloud/drs/v5/DrsClient.h b/drs/include/huaweicloud/drs/v5/DrsClient.h index 2cc6a9e7f..2481b6128 100644 --- a/drs/include/huaweicloud/drs/v5/DrsClient.h +++ b/drs/include/huaweicloud/drs/v5/DrsClient.h @@ -55,6 +55,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -92,6 +95,8 @@ #include #include #include +#include +#include #include #include #include @@ -161,6 +166,8 @@ #include #include #include +#include +#include #include #include #include @@ -174,12 +181,16 @@ #include #include #include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include @@ -358,6 +369,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr deleteJob( DeleteJobRequest &request ); + // 删除驱动文件 + // + // 删除驱动文件。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteUserJdbcDriver( + DeleteUserJdbcDriverRequest &request + ); // 下载批量导入任务模板 // // 下载批量导入任务模板 @@ -496,6 +515,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listTags( ListTagsRequest &request ); + // 查询驱动文件列表 + // + // 查询驱动文件列表。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listUserJdbcDrivers( + ListUserJdbcDriversRequest &request + ); // 查询委托的权限列表 // // 根据源库类型,目标库类型,是否自建,获取委托所需要的权限 @@ -734,6 +761,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr syncJdbcDriver( SyncJdbcDriverRequest &request ); + // 同步驱动文件 + // + // 同步驱动文件。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr syncUserJdbcDriver( + SyncUserJdbcDriverRequest &request + ); // 更新指定ID批量异步任务详情 // // 更新租户指定ID批量异步任务详情。 @@ -801,6 +836,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr uploadJdbcDriver( UploadJdbcDriverRequest &request ); + // 上传驱动文件 + // + // 上传驱动文件。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr uploadUserJdbcDriver( + UploadUserJdbcDriverRequest &request + ); // 任务名称校验 // // 创建任务时对任务名称进行校验。 diff --git a/drs/include/huaweicloud/drs/v5/DrsMeta.h b/drs/include/huaweicloud/drs/v5/DrsMeta.h index 46f9be3b8..333211183 100644 --- a/drs/include/huaweicloud/drs/v5/DrsMeta.h +++ b/drs/include/huaweicloud/drs/v5/DrsMeta.h @@ -31,6 +31,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForCreateJob(); static HttpRequestDef genRequestDefForDeleteJdbcDriver(); static HttpRequestDef genRequestDefForDeleteJob(); + static HttpRequestDef genRequestDefForDeleteUserJdbcDriver(); static HttpRequestDef genRequestDefForDownloadBatchCreateTemplate(); static HttpRequestDef genRequestDefForDownloadDbObjectTemplate(); static HttpRequestDef genRequestDefForExecuteJobAction(); @@ -48,6 +49,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForListLinks(); static HttpRequestDef genRequestDefForListProjectTags(); static HttpRequestDef genRequestDefForListTags(); + static HttpRequestDef genRequestDefForListUserJdbcDrivers(); static HttpRequestDef genRequestDefForListsAgencyPermissions(); static HttpRequestDef genRequestDefForShowActions(); static HttpRequestDef genRequestDefForShowColumnInfoResult(); @@ -77,6 +79,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForShowUpdateObjectSavingStatus(); static HttpRequestDef genRequestDefForStopJobAction(); static HttpRequestDef genRequestDefForSyncJdbcDriver(); + static HttpRequestDef genRequestDefForSyncUserJdbcDriver(); static HttpRequestDef genRequestDefForUpdateBatchAsyncJobs(); static HttpRequestDef genRequestDefForUpdateComparePolicy(); static HttpRequestDef genRequestDefForUpdateDataProgress(); @@ -85,6 +88,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForUpdateStartPosition(); static HttpRequestDef genRequestDefForUploadDbObjectTemplate(); static HttpRequestDef genRequestDefForUploadJdbcDriver(); + static HttpRequestDef genRequestDefForUploadUserJdbcDriver(); static HttpRequestDef genRequestDefForValidateJobName(); }; diff --git a/drs/include/huaweicloud/drs/v5/model/ActionParams.h b/drs/include/huaweicloud/drs/v5/model/ActionParams.h index 64ce3c554..69b1fbc62 100644 --- a/drs/include/huaweicloud/drs/v5/model/ActionParams.h +++ b/drs/include/huaweicloud/drs/v5/model/ActionParams.h @@ -107,6 +107,15 @@ class HUAWEICLOUD_DRS_V5_EXPORT ActionParams void unsetisSyncReEdit(); void setIsSyncReEdit(bool value); + /// + /// 是否支持只初始化任务。仅支持白名单用户使用,需要提交工单申请才能使用。 + /// + + bool isIsOnlyInitTask() const; + bool isOnlyInitTaskIsSet() const; + void unsetisOnlyInitTask(); + void setIsOnlyInitTask(bool value); + /// /// 强制结束时取值为true。 /// @@ -150,6 +159,8 @@ class HUAWEICLOUD_DRS_V5_EXPORT ActionParams bool compareTaskParamIsSet_; bool isSyncReEdit_; bool isSyncReEditIsSet_; + bool isOnlyInitTask_; + bool isOnlyInitTaskIsSet_; bool forceDelete_; bool forceDeleteIsSet_; PublicIpConfig publicIpConfig_; diff --git a/drs/include/huaweicloud/drs/v5/model/CreateJobResp.h b/drs/include/huaweicloud/drs/v5/model/CreateJobResp.h deleted file mode 100644 index cfc079e86..000000000 --- a/drs/include/huaweicloud/drs/v5/model/CreateJobResp.h +++ /dev/null @@ -1,108 +0,0 @@ - -#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateJobResp_H_ -#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateJobResp_H_ - - -#include - -#include -#include -#include - -#include - -namespace HuaweiCloud { -namespace Sdk { -namespace Drs { -namespace V5 { -namespace Model { - -using namespace HuaweiCloud::Sdk::Core::Utils; -using namespace HuaweiCloud::Sdk::Core::Http; -/// -/// 创建任务响应体。 -/// -class HUAWEICLOUD_DRS_V5_EXPORT CreateJobResp - : public ModelBase -{ -public: - CreateJobResp(); - virtual ~CreateJobResp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - ///////////////////////////////////////////// - /// CreateJobResp members - - /// - /// 任务ID。 - /// - - std::string getId() const; - bool idIsSet() const; - void unsetid(); - void setId(const std::string& value); - - /// - /// 任务名称。 - /// - - std::string getName() const; - bool nameIsSet() const; - void unsetname(); - void setName(const std::string& value); - - /// - /// 任务状态。 - /// - - std::string getStatus() const; - bool statusIsSet() const; - void unsetstatus(); - void setStatus(const std::string& value); - - /// - /// 任务创建时间。 - /// - - std::string getCreateTime() const; - bool createTimeIsSet() const; - void unsetcreateTime(); - void setCreateTime(const std::string& value); - - /// - /// 是否为克隆任务。 - /// - - std::string getIsCloneJob() const; - bool isCloneJobIsSet() const; - void unsetisCloneJob(); - void setIsCloneJob(const std::string& value); - - -protected: - std::string id_; - bool idIsSet_; - std::string name_; - bool nameIsSet_; - std::string status_; - bool statusIsSet_; - std::string createTime_; - bool createTimeIsSet_; - std::string isCloneJob_; - bool isCloneJobIsSet_; - -}; - - -} -} -} -} -} - -#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateJobResp_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateJobResponse.h b/drs/include/huaweicloud/drs/v5/model/CreateJobResponse.h index 1611a950f..27847708a 100644 --- a/drs/include/huaweicloud/drs/v5/model/CreateJobResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CreateJobResponse.h @@ -9,7 +9,7 @@ #include #include -#include +#include namespace HuaweiCloud { namespace Sdk { @@ -39,18 +39,62 @@ class HUAWEICLOUD_DRS_V5_EXPORT CreateJobResponse /// CreateJobResponse members /// - /// + /// 任务ID。 /// - CreateJobResp getJob() const; - bool jobIsSet() const; - void unsetjob(); - void setJob(const CreateJobResp& value); + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 任务名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 任务状态。 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + /// + /// 任务创建时间。 + /// + + std::string getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(const std::string& value); + + /// + /// 是否为克隆任务。 + /// + + std::string getIsCloneJob() const; + bool isCloneJobIsSet() const; + void unsetisCloneJob(); + void setIsCloneJob(const std::string& value); protected: - CreateJobResp job_; - bool jobIsSet_; + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + std::string status_; + bool statusIsSet_; + std::string createTime_; + bool createTimeIsSet_; + std::string isCloneJob_; + bool isCloneJobIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteUserDriverReq.h b/drs/include/huaweicloud/drs/v5/model/DeleteUserDriverReq.h new file mode 100644 index 000000000..c5620f0da --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteUserDriverReq.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserDriverReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserDriverReq_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteUserDriverReq + : public ModelBase +{ +public: + DeleteUserDriverReq(); + virtual ~DeleteUserDriverReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteUserDriverReq members + + /// + /// 指定待删除的驱动文件类型。取值范围: - db2:DB2 for LUW - informix:Informix + /// + + std::string getDriverType() const; + bool driverTypeIsSet() const; + void unsetdriverType(); + void setDriverType(const std::string& value); + + /// + /// JDBC驱动文件列表,列表长度1-20,driver_name的长度5-64,结尾以.jar结尾。 + /// + + std::vector& getDriverNames(); + bool driverNamesIsSet() const; + void unsetdriverNames(); + void setDriverNames(const std::vector& value); + + +protected: + std::string driverType_; + bool driverTypeIsSet_; + std::vector driverNames_; + bool driverNamesIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserDriverReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverRequest.h b/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverRequest.h new file mode 100644 index 000000000..527900d95 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteUserJdbcDriverRequest + : public ModelBase +{ +public: + DeleteUserJdbcDriverRequest(); + virtual ~DeleteUserJdbcDriverRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteUserJdbcDriverRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + DeleteUserDriverReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const DeleteUserDriverReq& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + DeleteUserDriverReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteUserJdbcDriverRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverResponse.h b/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverResponse.h new file mode 100644 index 000000000..c3bceafb6 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteUserJdbcDriverResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteUserJdbcDriverResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteUserJdbcDriverResponse(); + virtual ~DeleteUserJdbcDriverResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteUserJdbcDriverResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteUserJdbcDriverResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/JobBaseInfo.h b/drs/include/huaweicloud/drs/v5/model/JobBaseInfo.h index 90b646343..11608b552 100644 --- a/drs/include/huaweicloud/drs/v5/model/JobBaseInfo.h +++ b/drs/include/huaweicloud/drs/v5/model/JobBaseInfo.h @@ -68,7 +68,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT JobBaseInfo void setMultiWrite(bool value); /// - /// 引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。 - redis-to-gaussredis:Redis同步到GeminiDB Redis,实时迁移场景使用。 - rediscluster-to-gaussredis:Redis集群同步到GeminiDB Redis,实时迁移场景使用。 + /// 引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。 - redis-to-gaussredis:Redis同步到GeminiDB Redis,实时迁移场景使用。 - rediscluster-to-gaussredis:Redis集群同步到GeminiDB Redis,实时迁移场景使用。 - mysql-to-mysql:MySQL同步到MySQL,实时同步场景使用。 /// std::string getEngineType() const; diff --git a/drs/include/huaweicloud/drs/v5/model/JobDetailResp.h b/drs/include/huaweicloud/drs/v5/model/JobDetailResp.h index e1af39f39..4d42e5c6f 100644 --- a/drs/include/huaweicloud/drs/v5/model/JobDetailResp.h +++ b/drs/include/huaweicloud/drs/v5/model/JobDetailResp.h @@ -71,7 +71,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT JobDetailResp void setId(const std::string& value); /// - /// 任务状态。 + /// 任务状态。 - CREATING:创建中 - CREATE_FAILED:创建失败 - CONFIGURATION:配置中 - STARTJOBING:启动中 - WAITING_FOR_START:等待启动中 - START_JOB_FAILED:启动失败 - PAUSING:已暂停 - FULL_TRANSFER_STARTED:全量开始,灾备场景下为初始化 - FULL_TRANSFER_FAILED:全量失败,灾备场景下为初始化失败 - FULL_TRANSFER_COMPLETE:全量完成,灾备场景下为初始化完成 - INCRE_TRANSFER_STARTED:增量开始,灾备场景下为灾备中 - INCRE_TRANSFER_FAILED:增量失败,灾备场景下为灾备异常 - RELEASE_RESOURCE_STARTED:结束任务中 - RELEASE_RESOURCE_FAILED:结束任务失败 - RELEASE_RESOURCE_COMPLETE:已结束 - REBUILD_NODE_STARTED:故障恢复中 - REBUILD_NODE_FAILED:故障恢复失败 - CHANGE_JOB_STARTED:任务变更中 - CHANGE_JOB_FAILED:任务变更失败 - DELETED:已删除 - CHILD_TRANSFER_STARTING:再编辑子任务启动中 - CHILD_TRANSFER_STARTED:再编辑子任务迁移中 - CHILD_TRANSFER_COMPLETE:再编辑子任务迁移完成 - CHILD_TRANSFER_FAILED:再编辑子任务迁移失败 - RELEASE_CHILD_TRANSFER_STARTED:再编辑子任务结束中 - RELEASE_CHILD_TRANSFER_COMPLETE:再编辑子任务已结束 - NODE_UPGRADE_START:升级开始 - NODE_UPGRADE_COMPLETE:升级完成 - NODE_UPGRADE_FAILED:升级失败 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/JobEndpointInfo.h b/drs/include/huaweicloud/drs/v5/model/JobEndpointInfo.h index 7e2905f58..9b337b7f5 100644 --- a/drs/include/huaweicloud/drs/v5/model/JobEndpointInfo.h +++ b/drs/include/huaweicloud/drs/v5/model/JobEndpointInfo.h @@ -45,7 +45,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT JobEndpointInfo /// JobEndpointInfo members /// - /// 数据库类型。取值: - oracle:Oracle。 - gaussdbv5:GaussDB分布式版。 - redis:Redis。 - rediscluster:Redis集群版。 - gaussredis: GeminiDB Redis。 + /// 数据库类型。取值: - oracle:Oracle。 - gaussdbv5:GaussDB分布式版。 - redis:Redis。 - rediscluster:Redis集群版。 - gaussredis: GeminiDB Redis。 - mysql:MySQL。 /// std::string getDbType() const; diff --git a/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversRequest.h b/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversRequest.h new file mode 100644 index 000000000..fed5c7a40 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversRequest.h @@ -0,0 +1,104 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListUserJdbcDriversRequest + : public ModelBase +{ +public: + ListUserJdbcDriversRequest(); + virtual ~ListUserJdbcDriversRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListUserJdbcDriversRequest members + + /// + /// 每页显示的条目数量。默认为10。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 偏移量,表示从此偏移量开始查询, offset 大于等于 0。默认为0。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 指定待查询的驱动文件类型。取值范围: - db2:DB2 for LUW - informix:Informix + /// + + std::string getDriverType() const; + bool driverTypeIsSet() const; + void unsetdriverType(); + void setDriverType(const std::string& value); + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + +protected: + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string driverType_; + bool driverTypeIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListUserJdbcDriversRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversResponse.h b/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversResponse.h new file mode 100644 index 000000000..9604a65b9 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListUserJdbcDriversResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListUserJdbcDriversResponse + : public ModelBase, public HttpResponse +{ +public: + ListUserJdbcDriversResponse(); + virtual ~ListUserJdbcDriversResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListUserJdbcDriversResponse members + + /// + /// 驱动文件总数。 + /// + + int32_t getCount() const; + bool countIsSet() const; + void unsetcount(); + void setCount(int32_t value); + + /// + /// 驱动文件列表。 + /// + + std::vector& getItems(); + bool itemsIsSet() const; + void unsetitems(); + void setItems(const std::vector& value); + + +protected: + int32_t count_; + bool countIsSet_; + std::vector items_; + bool itemsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListUserJdbcDriversResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/PolicyConfig.h b/drs/include/huaweicloud/drs/v5/model/PolicyConfig.h index b267d0c1d..2fc300731 100644 --- a/drs/include/huaweicloud/drs/v5/model/PolicyConfig.h +++ b/drs/include/huaweicloud/drs/v5/model/PolicyConfig.h @@ -119,6 +119,15 @@ class HUAWEICLOUD_DRS_V5_EXPORT PolicyConfig void unsetdmlTypes(); void setDmlTypes(const std::string& value); + /// + /// 索引与表结构是否同时建立。 + /// + + bool isIsCreateTableWithIndex() const; + bool isCreateTableWithIndexIsSet() const; + void unsetisCreateTableWithIndex(); + void setIsCreateTableWithIndex(bool value); + protected: std::string filterDdlPolicy_; @@ -139,6 +148,8 @@ class HUAWEICLOUD_DRS_V5_EXPORT PolicyConfig bool incrementReadModeIsSet_; std::string dmlTypes_; bool dmlTypesIsSet_; + bool isCreateTableWithIndex_; + bool isCreateTableWithIndexIsSet_; }; diff --git a/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverRequest.h b/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverRequest.h new file mode 100644 index 000000000..5c7e195ec --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT SyncUserJdbcDriverRequest + : public ModelBase +{ +public: + SyncUserJdbcDriverRequest(); + virtual ~SyncUserJdbcDriverRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SyncUserJdbcDriverRequest members + + /// + /// 任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + UpdateUserDriverReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UpdateUserDriverReq& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + UpdateUserDriverReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + SyncUserJdbcDriverRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverResponse.h b/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverResponse.h new file mode 100644 index 000000000..b3791f163 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/SyncUserJdbcDriverResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT SyncUserJdbcDriverResponse + : public ModelBase, public HttpResponse +{ +public: + SyncUserJdbcDriverResponse(); + virtual ~SyncUserJdbcDriverResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SyncUserJdbcDriverResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_SyncUserJdbcDriverResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UpdateUserDriverReq.h b/drs/include/huaweicloud/drs/v5/model/UpdateUserDriverReq.h new file mode 100644 index 000000000..fe0be9866 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UpdateUserDriverReq.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateUserDriverReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateUserDriverReq_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_DRS_V5_EXPORT UpdateUserDriverReq + : public ModelBase +{ +public: + UpdateUserDriverReq(); + virtual ~UpdateUserDriverReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateUserDriverReq members + + /// + /// JDBC驱动文件名称,name的长度5-64,结尾以.jar结尾。 + /// + + std::string getDriverName() const; + bool driverNameIsSet() const; + void unsetdriverName(); + void setDriverName(const std::string& value); + + /// + /// 指定待同步的驱动文件类型。取值范围: - db2:DB2 for LUW - informix:Informix + /// + + std::string getDriverType() const; + bool driverTypeIsSet() const; + void unsetdriverType(); + void setDriverType(const std::string& value); + + +protected: + std::string driverName_; + bool driverNameIsSet_; + std::string driverType_; + bool driverTypeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateUserDriverReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UploadJdbcDriverRequestBody.h b/drs/include/huaweicloud/drs/v5/model/UploadJdbcDriverRequestBody.h index 163d514ec..be9c5a604 100644 --- a/drs/include/huaweicloud/drs/v5/model/UploadJdbcDriverRequestBody.h +++ b/drs/include/huaweicloud/drs/v5/model/UploadJdbcDriverRequestBody.h @@ -39,7 +39,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT UploadJdbcDriverRequestBody /// UploadJdbcDriverRequestBody members /// - /// 驱动文件,驱动文件名称长度5-64,以jar结尾,name相同会替换远程驱动文件 + /// 驱动文件,驱动文件名称长度5-64,以jar结尾,文件名相同会替换远程驱动文件 /// HttpContent getFile() const; diff --git a/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequest.h b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequest.h new file mode 100644 index 000000000..eee1e272b --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT UploadUserJdbcDriverRequest + : public ModelBase +{ +public: + UploadUserJdbcDriverRequest(); + virtual ~UploadUserJdbcDriverRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UploadUserJdbcDriverRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 指定待上传的驱动文件类型。取值范围: - db2:DB2 for LUW - informix:Informix + /// + + std::string getDriverType() const; + bool driverTypeIsSet() const; + void unsetdriverType(); + void setDriverType(const std::string& value); + + /// + /// + /// + + UploadUserJdbcDriverRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UploadUserJdbcDriverRequestBody& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string driverType_; + bool driverTypeIsSet_; + UploadUserJdbcDriverRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UploadUserJdbcDriverRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequestBody.h b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequestBody.h new file mode 100644 index 000000000..52a07941d --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverRequestBody.h @@ -0,0 +1,64 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequestBody_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequestBody_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_DRS_V5_EXPORT UploadUserJdbcDriverRequestBody + : public ModelBase +{ +public: + UploadUserJdbcDriverRequestBody(); + virtual ~UploadUserJdbcDriverRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UploadUserJdbcDriverRequestBody members + + /// + /// 驱动文件,驱动文件名称长度5-64,以jar结尾,文件名相同会替换远程驱动文件。 + /// + + HttpContent getFile() const; + bool fileIsSet() const; + void unsetfile(); + void setFile(const HttpContent& value); + + +protected: + HttpContent file_; + bool fileIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverRequestBody_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverResponse.h b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverResponse.h new file mode 100644 index 000000000..ccd41ae2d --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UploadUserJdbcDriverResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT UploadUserJdbcDriverResponse + : public ModelBase, public HttpResponse +{ +public: + UploadUserJdbcDriverResponse(); + virtual ~UploadUserJdbcDriverResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UploadUserJdbcDriverResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UploadUserJdbcDriverResponse_H_ diff --git a/drs/src/v5/DrsClient.cpp b/drs/src/v5/DrsClient.cpp index 52fd9f2a1..72c46c729 100644 --- a/drs/src/v5/DrsClient.cpp +++ b/drs/src/v5/DrsClient.cpp @@ -817,6 +817,50 @@ std::shared_ptr DrsClient::deleteJob(DeleteJobRequest &reques return localVarResult; } +std::shared_ptr DrsClient::deleteUserJdbcDriver(DeleteUserJdbcDriverRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/drivers"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForDeleteUserJdbcDriver()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr DrsClient::downloadBatchCreateTemplate(DownloadBatchCreateTemplateRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/template"; @@ -1523,6 +1567,47 @@ std::shared_ptr DrsClient::listTags(ListTagsRequest &request) return localVarResult; } +std::shared_ptr DrsClient::listUserJdbcDrivers(ListUserJdbcDriversRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/drivers"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.driverTypeIsSet()) { + localVarQueryParams["driver_type"] = parameterToString(request.getDriverType()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForListUserJdbcDrivers()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::listsAgencyPermissions(ListsAgencyPermissionsRequest &request) { std::string localVarPath = "/v5/{project_id}/agency/permissions"; @@ -2680,6 +2765,51 @@ std::shared_ptr DrsClient::syncJdbcDriver(SyncJdbcDriver return localVarResult; } +std::shared_ptr DrsClient::syncUserJdbcDriver(SyncUserJdbcDriverRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/update-driver"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForSyncUserJdbcDriver()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr DrsClient::updateBatchAsyncJobs(UpdateBatchAsyncJobsRequest &request) { std::string localVarPath = "/v5/{project_id}/batch-async-jobs/{async_job_id}"; @@ -3018,6 +3148,41 @@ std::shared_ptr DrsClient::uploadJdbcDriver(UploadJdbc return localVarResult; } +std::shared_ptr DrsClient::uploadUserJdbcDriver(UploadUserJdbcDriverRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/driver"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("multipart/form-data", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.driverTypeIsSet()) { + localVarQueryParams["driver_type"] = parameterToString(request.getDriverType()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForUploadUserJdbcDriver()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::validateJobName(ValidateJobNameRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/name-validation"; diff --git a/drs/src/v5/DrsMeta.cpp b/drs/src/v5/DrsMeta.cpp index 7c9c564bb..f0ba1fb80 100644 --- a/drs/src/v5/DrsMeta.cpp +++ b/drs/src/v5/DrsMeta.cpp @@ -263,6 +263,20 @@ HttpRequestDef DrsMeta::genRequestDefForDeleteJob() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForDeleteUserJdbcDriver() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForDownloadBatchCreateTemplate() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -572,6 +586,25 @@ HttpRequestDef DrsMeta::genRequestDefForListTags() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForListUserJdbcDrivers() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("DriverType") + .withJsonTag("driver_type") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForListsAgencyPermissions() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("SourceType") @@ -1036,6 +1069,20 @@ HttpRequestDef DrsMeta::genRequestDefForSyncJdbcDriver() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForSyncUserJdbcDriver() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForUpdateBatchAsyncJobs() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -1153,6 +1200,24 @@ HttpRequestDef DrsMeta::genRequestDefForUploadJdbcDriver() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForUploadUserJdbcDriver() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DriverType") + .withJsonTag("driver_type") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + FieldDef formBodyParams; + reqDefBuilder.withRequestField(formBodyParams. + withName(""). + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForValidateJobName() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/drs/src/v5/model/ActionParams.cpp b/drs/src/v5/model/ActionParams.cpp index b91feed42..d17221066 100644 --- a/drs/src/v5/model/ActionParams.cpp +++ b/drs/src/v5/model/ActionParams.cpp @@ -23,6 +23,8 @@ ActionParams::ActionParams() compareTaskParamIsSet_ = false; isSyncReEdit_ = false; isSyncReEditIsSet_ = false; + isOnlyInitTask_ = false; + isOnlyInitTaskIsSet_ = false; forceDelete_ = false; forceDeleteIsSet_ = false; publicIpConfigIsSet_ = false; @@ -60,6 +62,9 @@ web::json::value ActionParams::toJson() const if(isSyncReEditIsSet_) { val[utility::conversions::to_string_t("is_sync_re_edit")] = ModelBase::toJson(isSyncReEdit_); } + if(isOnlyInitTaskIsSet_) { + val[utility::conversions::to_string_t("is_only_init_task")] = ModelBase::toJson(isOnlyInitTask_); + } if(forceDeleteIsSet_) { val[utility::conversions::to_string_t("force_delete")] = ModelBase::toJson(forceDelete_); } @@ -139,6 +144,15 @@ bool ActionParams::fromJson(const web::json::value& val) setIsSyncReEdit(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_only_init_task"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_only_init_task")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsOnlyInitTask(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("force_delete"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("force_delete")); if(!fieldValue.is_null()) @@ -317,6 +331,27 @@ void ActionParams::unsetisSyncReEdit() isSyncReEditIsSet_ = false; } +bool ActionParams::isIsOnlyInitTask() const +{ + return isOnlyInitTask_; +} + +void ActionParams::setIsOnlyInitTask(bool value) +{ + isOnlyInitTask_ = value; + isOnlyInitTaskIsSet_ = true; +} + +bool ActionParams::isOnlyInitTaskIsSet() const +{ + return isOnlyInitTaskIsSet_; +} + +void ActionParams::unsetisOnlyInitTask() +{ + isOnlyInitTaskIsSet_ = false; +} + bool ActionParams::isForceDelete() const { return forceDelete_; diff --git a/drs/src/v5/model/CreateJobResp.cpp b/drs/src/v5/model/CreateJobResp.cpp deleted file mode 100644 index a33c521a4..000000000 --- a/drs/src/v5/model/CreateJobResp.cpp +++ /dev/null @@ -1,219 +0,0 @@ - - -#include "huaweicloud/drs/v5/model/CreateJobResp.h" -namespace HuaweiCloud { -namespace Sdk { -namespace Drs { -namespace V5 { -namespace Model { - - - - -CreateJobResp::CreateJobResp() -{ - id_ = ""; - idIsSet_ = false; - name_ = ""; - nameIsSet_ = false; - status_ = ""; - statusIsSet_ = false; - createTime_ = ""; - createTimeIsSet_ = false; - isCloneJob_ = ""; - isCloneJobIsSet_ = false; -} - -CreateJobResp::~CreateJobResp() = default; - -void CreateJobResp::validate() -{ -} - -web::json::value CreateJobResp::toJson() const -{ - web::json::value val = web::json::value::object(); - - if(idIsSet_) { - val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); - } - if(nameIsSet_) { - val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); - } - if(statusIsSet_) { - val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); - } - if(createTimeIsSet_) { - val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); - } - if(isCloneJobIsSet_) { - val[utility::conversions::to_string_t("is_clone_job")] = ModelBase::toJson(isCloneJob_); - } - - return val; -} -bool CreateJobResp::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t("id"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setId(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("name"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setName(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("status"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setStatus(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("create_time"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setCreateTime(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("is_clone_job"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_clone_job")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setIsCloneJob(refVal); - } - } - return ok; -} - - -std::string CreateJobResp::getId() const -{ - return id_; -} - -void CreateJobResp::setId(const std::string& value) -{ - id_ = value; - idIsSet_ = true; -} - -bool CreateJobResp::idIsSet() const -{ - return idIsSet_; -} - -void CreateJobResp::unsetid() -{ - idIsSet_ = false; -} - -std::string CreateJobResp::getName() const -{ - return name_; -} - -void CreateJobResp::setName(const std::string& value) -{ - name_ = value; - nameIsSet_ = true; -} - -bool CreateJobResp::nameIsSet() const -{ - return nameIsSet_; -} - -void CreateJobResp::unsetname() -{ - nameIsSet_ = false; -} - -std::string CreateJobResp::getStatus() const -{ - return status_; -} - -void CreateJobResp::setStatus(const std::string& value) -{ - status_ = value; - statusIsSet_ = true; -} - -bool CreateJobResp::statusIsSet() const -{ - return statusIsSet_; -} - -void CreateJobResp::unsetstatus() -{ - statusIsSet_ = false; -} - -std::string CreateJobResp::getCreateTime() const -{ - return createTime_; -} - -void CreateJobResp::setCreateTime(const std::string& value) -{ - createTime_ = value; - createTimeIsSet_ = true; -} - -bool CreateJobResp::createTimeIsSet() const -{ - return createTimeIsSet_; -} - -void CreateJobResp::unsetcreateTime() -{ - createTimeIsSet_ = false; -} - -std::string CreateJobResp::getIsCloneJob() const -{ - return isCloneJob_; -} - -void CreateJobResp::setIsCloneJob(const std::string& value) -{ - isCloneJob_ = value; - isCloneJobIsSet_ = true; -} - -bool CreateJobResp::isCloneJobIsSet() const -{ - return isCloneJobIsSet_; -} - -void CreateJobResp::unsetisCloneJob() -{ - isCloneJobIsSet_ = false; -} - -} -} -} -} -} - - diff --git a/drs/src/v5/model/CreateJobResponse.cpp b/drs/src/v5/model/CreateJobResponse.cpp index ccaf39619..3e61a8977 100644 --- a/drs/src/v5/model/CreateJobResponse.cpp +++ b/drs/src/v5/model/CreateJobResponse.cpp @@ -12,7 +12,16 @@ namespace Model { CreateJobResponse::CreateJobResponse() { - jobIsSet_ = false; + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + createTime_ = ""; + createTimeIsSet_ = false; + isCloneJob_ = ""; + isCloneJobIsSet_ = false; } CreateJobResponse::~CreateJobResponse() = default; @@ -25,8 +34,20 @@ web::json::value CreateJobResponse::toJson() const { web::json::value val = web::json::value::object(); - if(jobIsSet_) { - val[utility::conversions::to_string_t("job")] = ModelBase::toJson(job_); + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(isCloneJobIsSet_) { + val[utility::conversions::to_string_t("is_clone_job")] = ModelBase::toJson(isCloneJob_); } return val; @@ -35,38 +56,158 @@ bool CreateJobResponse::fromJson(const web::json::value& val) { bool ok = true; - if(val.has_field(utility::conversions::to_string_t("job"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job")); + if(val.has_field(utility::conversions::to_string_t("id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); if(!fieldValue.is_null()) { - CreateJobResp refVal; + std::string refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setJob(refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_clone_job"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_clone_job")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCloneJob(refVal); } } return ok; } -CreateJobResp CreateJobResponse::getJob() const +std::string CreateJobResponse::getId() const +{ + return id_; +} + +void CreateJobResponse::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool CreateJobResponse::idIsSet() const +{ + return idIsSet_; +} + +void CreateJobResponse::unsetid() +{ + idIsSet_ = false; +} + +std::string CreateJobResponse::getName() const +{ + return name_; +} + +void CreateJobResponse::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool CreateJobResponse::nameIsSet() const +{ + return nameIsSet_; +} + +void CreateJobResponse::unsetname() +{ + nameIsSet_ = false; +} + +std::string CreateJobResponse::getStatus() const +{ + return status_; +} + +void CreateJobResponse::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool CreateJobResponse::statusIsSet() const +{ + return statusIsSet_; +} + +void CreateJobResponse::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string CreateJobResponse::getCreateTime() const +{ + return createTime_; +} + +void CreateJobResponse::setCreateTime(const std::string& value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool CreateJobResponse::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void CreateJobResponse::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string CreateJobResponse::getIsCloneJob() const { - return job_; + return isCloneJob_; } -void CreateJobResponse::setJob(const CreateJobResp& value) +void CreateJobResponse::setIsCloneJob(const std::string& value) { - job_ = value; - jobIsSet_ = true; + isCloneJob_ = value; + isCloneJobIsSet_ = true; } -bool CreateJobResponse::jobIsSet() const +bool CreateJobResponse::isCloneJobIsSet() const { - return jobIsSet_; + return isCloneJobIsSet_; } -void CreateJobResponse::unsetjob() +void CreateJobResponse::unsetisCloneJob() { - jobIsSet_ = false; + isCloneJobIsSet_ = false; } } diff --git a/drs/src/v5/model/DeleteUserDriverReq.cpp b/drs/src/v5/model/DeleteUserDriverReq.cpp new file mode 100644 index 000000000..a0822c7fa --- /dev/null +++ b/drs/src/v5/model/DeleteUserDriverReq.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/DeleteUserDriverReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteUserDriverReq::DeleteUserDriverReq() +{ + driverType_ = ""; + driverTypeIsSet_ = false; + driverNamesIsSet_ = false; +} + +DeleteUserDriverReq::~DeleteUserDriverReq() = default; + +void DeleteUserDriverReq::validate() +{ +} + +web::json::value DeleteUserDriverReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(driverTypeIsSet_) { + val[utility::conversions::to_string_t("driver_type")] = ModelBase::toJson(driverType_); + } + if(driverNamesIsSet_) { + val[utility::conversions::to_string_t("driver_names")] = ModelBase::toJson(driverNames_); + } + + return val; +} +bool DeleteUserDriverReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("driver_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("driver_names"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_names")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverNames(refVal); + } + } + return ok; +} + + +std::string DeleteUserDriverReq::getDriverType() const +{ + return driverType_; +} + +void DeleteUserDriverReq::setDriverType(const std::string& value) +{ + driverType_ = value; + driverTypeIsSet_ = true; +} + +bool DeleteUserDriverReq::driverTypeIsSet() const +{ + return driverTypeIsSet_; +} + +void DeleteUserDriverReq::unsetdriverType() +{ + driverTypeIsSet_ = false; +} + +std::vector& DeleteUserDriverReq::getDriverNames() +{ + return driverNames_; +} + +void DeleteUserDriverReq::setDriverNames(const std::vector& value) +{ + driverNames_ = value; + driverNamesIsSet_ = true; +} + +bool DeleteUserDriverReq::driverNamesIsSet() const +{ + return driverNamesIsSet_; +} + +void DeleteUserDriverReq::unsetdriverNames() +{ + driverNamesIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteUserJdbcDriverRequest.cpp b/drs/src/v5/model/DeleteUserJdbcDriverRequest.cpp new file mode 100644 index 000000000..39448a6e2 --- /dev/null +++ b/drs/src/v5/model/DeleteUserJdbcDriverRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/DeleteUserJdbcDriverRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteUserJdbcDriverRequest::DeleteUserJdbcDriverRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +DeleteUserJdbcDriverRequest::~DeleteUserJdbcDriverRequest() = default; + +void DeleteUserJdbcDriverRequest::validate() +{ +} + +web::json::value DeleteUserJdbcDriverRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteUserJdbcDriverRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + DeleteUserDriverReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string DeleteUserJdbcDriverRequest::getXLanguage() const +{ + return xLanguage_; +} + +void DeleteUserJdbcDriverRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool DeleteUserJdbcDriverRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void DeleteUserJdbcDriverRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +DeleteUserDriverReq DeleteUserJdbcDriverRequest::getBody() const +{ + return body_; +} + +void DeleteUserJdbcDriverRequest::setBody(const DeleteUserDriverReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteUserJdbcDriverRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteUserJdbcDriverRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteUserJdbcDriverResponse.cpp b/drs/src/v5/model/DeleteUserJdbcDriverResponse.cpp new file mode 100644 index 000000000..4dd42ea07 --- /dev/null +++ b/drs/src/v5/model/DeleteUserJdbcDriverResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/DeleteUserJdbcDriverResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteUserJdbcDriverResponse::DeleteUserJdbcDriverResponse() +{ + bodyIsSet_ = false; +} + +DeleteUserJdbcDriverResponse::~DeleteUserJdbcDriverResponse() = default; + +void DeleteUserJdbcDriverResponse::validate() +{ +} + +web::json::value DeleteUserJdbcDriverResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteUserJdbcDriverResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object DeleteUserJdbcDriverResponse::getBody() const +{ + return body_; +} + +void DeleteUserJdbcDriverResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteUserJdbcDriverResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteUserJdbcDriverResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListUserJdbcDriversRequest.cpp b/drs/src/v5/model/ListUserJdbcDriversRequest.cpp new file mode 100644 index 000000000..54877e621 --- /dev/null +++ b/drs/src/v5/model/ListUserJdbcDriversRequest.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/drs/v5/model/ListUserJdbcDriversRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListUserJdbcDriversRequest::ListUserJdbcDriversRequest() +{ + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + driverType_ = ""; + driverTypeIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; +} + +ListUserJdbcDriversRequest::~ListUserJdbcDriversRequest() = default; + +void ListUserJdbcDriversRequest::validate() +{ +} + +web::json::value ListUserJdbcDriversRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(driverTypeIsSet_) { + val[utility::conversions::to_string_t("driver_type")] = ModelBase::toJson(driverType_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + + return val; +} +bool ListUserJdbcDriversRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("driver_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + return ok; +} + + +int32_t ListUserJdbcDriversRequest::getLimit() const +{ + return limit_; +} + +void ListUserJdbcDriversRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListUserJdbcDriversRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListUserJdbcDriversRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListUserJdbcDriversRequest::getOffset() const +{ + return offset_; +} + +void ListUserJdbcDriversRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListUserJdbcDriversRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListUserJdbcDriversRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListUserJdbcDriversRequest::getDriverType() const +{ + return driverType_; +} + +void ListUserJdbcDriversRequest::setDriverType(const std::string& value) +{ + driverType_ = value; + driverTypeIsSet_ = true; +} + +bool ListUserJdbcDriversRequest::driverTypeIsSet() const +{ + return driverTypeIsSet_; +} + +void ListUserJdbcDriversRequest::unsetdriverType() +{ + driverTypeIsSet_ = false; +} + +std::string ListUserJdbcDriversRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListUserJdbcDriversRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListUserJdbcDriversRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListUserJdbcDriversRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListUserJdbcDriversResponse.cpp b/drs/src/v5/model/ListUserJdbcDriversResponse.cpp new file mode 100644 index 000000000..d7ef6a0f8 --- /dev/null +++ b/drs/src/v5/model/ListUserJdbcDriversResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/ListUserJdbcDriversResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListUserJdbcDriversResponse::ListUserJdbcDriversResponse() +{ + count_ = 0; + countIsSet_ = false; + itemsIsSet_ = false; +} + +ListUserJdbcDriversResponse::~ListUserJdbcDriversResponse() = default; + +void ListUserJdbcDriversResponse::validate() +{ +} + +web::json::value ListUserJdbcDriversResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(countIsSet_) { + val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_); + } + if(itemsIsSet_) { + val[utility::conversions::to_string_t("items")] = ModelBase::toJson(items_); + } + + return val; +} +bool ListUserJdbcDriversResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("items"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("items")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setItems(refVal); + } + } + return ok; +} + + +int32_t ListUserJdbcDriversResponse::getCount() const +{ + return count_; +} + +void ListUserJdbcDriversResponse::setCount(int32_t value) +{ + count_ = value; + countIsSet_ = true; +} + +bool ListUserJdbcDriversResponse::countIsSet() const +{ + return countIsSet_; +} + +void ListUserJdbcDriversResponse::unsetcount() +{ + countIsSet_ = false; +} + +std::vector& ListUserJdbcDriversResponse::getItems() +{ + return items_; +} + +void ListUserJdbcDriversResponse::setItems(const std::vector& value) +{ + items_ = value; + itemsIsSet_ = true; +} + +bool ListUserJdbcDriversResponse::itemsIsSet() const +{ + return itemsIsSet_; +} + +void ListUserJdbcDriversResponse::unsetitems() +{ + itemsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/PolicyConfig.cpp b/drs/src/v5/model/PolicyConfig.cpp index 5f930479d..dfb4f0af0 100644 --- a/drs/src/v5/model/PolicyConfig.cpp +++ b/drs/src/v5/model/PolicyConfig.cpp @@ -30,6 +30,8 @@ PolicyConfig::PolicyConfig() incrementReadModeIsSet_ = false; dmlTypes_ = ""; dmlTypesIsSet_ = false; + isCreateTableWithIndex_ = false; + isCreateTableWithIndexIsSet_ = false; } PolicyConfig::~PolicyConfig() = default; @@ -69,6 +71,9 @@ web::json::value PolicyConfig::toJson() const if(dmlTypesIsSet_) { val[utility::conversions::to_string_t("dml_types")] = ModelBase::toJson(dmlTypes_); } + if(isCreateTableWithIndexIsSet_) { + val[utility::conversions::to_string_t("is_create_table_with_index")] = ModelBase::toJson(isCreateTableWithIndex_); + } return val; } @@ -157,6 +162,15 @@ bool PolicyConfig::fromJson(const web::json::value& val) setDmlTypes(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_create_table_with_index"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_create_table_with_index")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCreateTableWithIndex(refVal); + } + } return ok; } @@ -350,6 +364,27 @@ void PolicyConfig::unsetdmlTypes() dmlTypesIsSet_ = false; } +bool PolicyConfig::isIsCreateTableWithIndex() const +{ + return isCreateTableWithIndex_; +} + +void PolicyConfig::setIsCreateTableWithIndex(bool value) +{ + isCreateTableWithIndex_ = value; + isCreateTableWithIndexIsSet_ = true; +} + +bool PolicyConfig::isCreateTableWithIndexIsSet() const +{ + return isCreateTableWithIndexIsSet_; +} + +void PolicyConfig::unsetisCreateTableWithIndex() +{ + isCreateTableWithIndexIsSet_ = false; +} + } } } diff --git a/drs/src/v5/model/SyncUserJdbcDriverRequest.cpp b/drs/src/v5/model/SyncUserJdbcDriverRequest.cpp new file mode 100644 index 000000000..31841441f --- /dev/null +++ b/drs/src/v5/model/SyncUserJdbcDriverRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/SyncUserJdbcDriverRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +SyncUserJdbcDriverRequest::SyncUserJdbcDriverRequest() +{ + jobId_ = ""; + jobIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +SyncUserJdbcDriverRequest::~SyncUserJdbcDriverRequest() = default; + +void SyncUserJdbcDriverRequest::validate() +{ +} + +web::json::value SyncUserJdbcDriverRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool SyncUserJdbcDriverRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + UpdateUserDriverReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string SyncUserJdbcDriverRequest::getJobId() const +{ + return jobId_; +} + +void SyncUserJdbcDriverRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool SyncUserJdbcDriverRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void SyncUserJdbcDriverRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string SyncUserJdbcDriverRequest::getXLanguage() const +{ + return xLanguage_; +} + +void SyncUserJdbcDriverRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool SyncUserJdbcDriverRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void SyncUserJdbcDriverRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +UpdateUserDriverReq SyncUserJdbcDriverRequest::getBody() const +{ + return body_; +} + +void SyncUserJdbcDriverRequest::setBody(const UpdateUserDriverReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool SyncUserJdbcDriverRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void SyncUserJdbcDriverRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/SyncUserJdbcDriverResponse.cpp b/drs/src/v5/model/SyncUserJdbcDriverResponse.cpp new file mode 100644 index 000000000..e65122b6d --- /dev/null +++ b/drs/src/v5/model/SyncUserJdbcDriverResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/SyncUserJdbcDriverResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +SyncUserJdbcDriverResponse::SyncUserJdbcDriverResponse() +{ + bodyIsSet_ = false; +} + +SyncUserJdbcDriverResponse::~SyncUserJdbcDriverResponse() = default; + +void SyncUserJdbcDriverResponse::validate() +{ +} + +web::json::value SyncUserJdbcDriverResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool SyncUserJdbcDriverResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object SyncUserJdbcDriverResponse::getBody() const +{ + return body_; +} + +void SyncUserJdbcDriverResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool SyncUserJdbcDriverResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void SyncUserJdbcDriverResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UpdateUserDriverReq.cpp b/drs/src/v5/model/UpdateUserDriverReq.cpp new file mode 100644 index 000000000..cf7aaa316 --- /dev/null +++ b/drs/src/v5/model/UpdateUserDriverReq.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/drs/v5/model/UpdateUserDriverReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UpdateUserDriverReq::UpdateUserDriverReq() +{ + driverName_ = ""; + driverNameIsSet_ = false; + driverType_ = ""; + driverTypeIsSet_ = false; +} + +UpdateUserDriverReq::~UpdateUserDriverReq() = default; + +void UpdateUserDriverReq::validate() +{ +} + +web::json::value UpdateUserDriverReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(driverNameIsSet_) { + val[utility::conversions::to_string_t("driver_name")] = ModelBase::toJson(driverName_); + } + if(driverTypeIsSet_) { + val[utility::conversions::to_string_t("driver_type")] = ModelBase::toJson(driverType_); + } + + return val; +} +bool UpdateUserDriverReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("driver_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("driver_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverType(refVal); + } + } + return ok; +} + + +std::string UpdateUserDriverReq::getDriverName() const +{ + return driverName_; +} + +void UpdateUserDriverReq::setDriverName(const std::string& value) +{ + driverName_ = value; + driverNameIsSet_ = true; +} + +bool UpdateUserDriverReq::driverNameIsSet() const +{ + return driverNameIsSet_; +} + +void UpdateUserDriverReq::unsetdriverName() +{ + driverNameIsSet_ = false; +} + +std::string UpdateUserDriverReq::getDriverType() const +{ + return driverType_; +} + +void UpdateUserDriverReq::setDriverType(const std::string& value) +{ + driverType_ = value; + driverTypeIsSet_ = true; +} + +bool UpdateUserDriverReq::driverTypeIsSet() const +{ + return driverTypeIsSet_; +} + +void UpdateUserDriverReq::unsetdriverType() +{ + driverTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UploadUserJdbcDriverRequest.cpp b/drs/src/v5/model/UploadUserJdbcDriverRequest.cpp new file mode 100644 index 000000000..66013bfc0 --- /dev/null +++ b/drs/src/v5/model/UploadUserJdbcDriverRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/UploadUserJdbcDriverRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UploadUserJdbcDriverRequest::UploadUserJdbcDriverRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + driverType_ = ""; + driverTypeIsSet_ = false; + bodyIsSet_ = false; +} + +UploadUserJdbcDriverRequest::~UploadUserJdbcDriverRequest() = default; + +void UploadUserJdbcDriverRequest::validate() +{ +} + +web::json::value UploadUserJdbcDriverRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(driverTypeIsSet_) { + val[utility::conversions::to_string_t("driver_type")] = ModelBase::toJson(driverType_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UploadUserJdbcDriverRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("driver_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + UploadUserJdbcDriverRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UploadUserJdbcDriverRequest::getXLanguage() const +{ + return xLanguage_; +} + +void UploadUserJdbcDriverRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool UploadUserJdbcDriverRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void UploadUserJdbcDriverRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string UploadUserJdbcDriverRequest::getDriverType() const +{ + return driverType_; +} + +void UploadUserJdbcDriverRequest::setDriverType(const std::string& value) +{ + driverType_ = value; + driverTypeIsSet_ = true; +} + +bool UploadUserJdbcDriverRequest::driverTypeIsSet() const +{ + return driverTypeIsSet_; +} + +void UploadUserJdbcDriverRequest::unsetdriverType() +{ + driverTypeIsSet_ = false; +} + +UploadUserJdbcDriverRequestBody UploadUserJdbcDriverRequest::getBody() const +{ + return body_; +} + +void UploadUserJdbcDriverRequest::setBody(const UploadUserJdbcDriverRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UploadUserJdbcDriverRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UploadUserJdbcDriverRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UploadUserJdbcDriverRequestBody.cpp b/drs/src/v5/model/UploadUserJdbcDriverRequestBody.cpp new file mode 100644 index 000000000..e484ea4ea --- /dev/null +++ b/drs/src/v5/model/UploadUserJdbcDriverRequestBody.cpp @@ -0,0 +1,66 @@ + + +#include "huaweicloud/drs/v5/model/UploadUserJdbcDriverRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UploadUserJdbcDriverRequestBody::UploadUserJdbcDriverRequestBody() +{ + fileIsSet_ = false; +} + +UploadUserJdbcDriverRequestBody::~UploadUserJdbcDriverRequestBody() = default; + +void UploadUserJdbcDriverRequestBody::validate() +{ +} + +web::json::value UploadUserJdbcDriverRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool UploadUserJdbcDriverRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +HttpContent UploadUserJdbcDriverRequestBody::getFile() const +{ + return file_; +} + +void UploadUserJdbcDriverRequestBody::setFile(const HttpContent& value) +{ + file_ = value; + fileIsSet_ = true; +} + +bool UploadUserJdbcDriverRequestBody::fileIsSet() const +{ + return fileIsSet_; +} + +void UploadUserJdbcDriverRequestBody::unsetfile() +{ + fileIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UploadUserJdbcDriverResponse.cpp b/drs/src/v5/model/UploadUserJdbcDriverResponse.cpp new file mode 100644 index 000000000..9acd5398a --- /dev/null +++ b/drs/src/v5/model/UploadUserJdbcDriverResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/UploadUserJdbcDriverResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UploadUserJdbcDriverResponse::UploadUserJdbcDriverResponse() +{ + bodyIsSet_ = false; +} + +UploadUserJdbcDriverResponse::~UploadUserJdbcDriverResponse() = default; + +void UploadUserJdbcDriverResponse::validate() +{ +} + +web::json::value UploadUserJdbcDriverResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UploadUserJdbcDriverResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object UploadUserJdbcDriverResponse::getBody() const +{ + return body_; +} + +void UploadUserJdbcDriverResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UploadUserJdbcDriverResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UploadUserJdbcDriverResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/evs/include/huaweicloud/evs/v2/EvsRegion.h b/evs/include/huaweicloud/evs/v2/EvsRegion.h index 58c849f42..d0347aa13 100644 --- a/evs/include/huaweicloud/evs/v2/EvsRegion.h +++ b/evs/include/huaweicloud/evs/v2/EvsRegion.h @@ -126,6 +126,26 @@ class HUAWEICLOUD_EVS_V2_EXPORT EvsRegion { { "https://evs.my-kualalumpur-1.myhuaweicloud.com" }); + regions["cn-east-4"] = Region("cn-east-4", + { + "https://evs.cn-east-4.myhuaweicloud.com" + }); + regions["cn-east-5"] = Region("cn-east-5", + { + "https://evs.cn-east-5.myhuaweicloud.com" + }); + regions["cn-north-11"] = Region("cn-north-11", + { + "https://evs.cn-north-11.myhuaweicloud.com" + }); + regions["ru-northwest-2"] = Region("ru-northwest-2", + { + "https://evs.ru-northwest-2.myhuaweicloud.com" + }); + regions["af-north-1"] = Region("af-north-1", + { + "https://evs.af-north-1.myhuaweicloud.com" + }); return regions; } private: diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/OpenGaussHaOption.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/OpenGaussHaOption.h index c371d5207..8991d85c1 100644 --- a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/OpenGaussHaOption.h +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/OpenGaussHaOption.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT OpenGaussHaOption void unsetreplicationMode(); void setReplicationMode(const std::string& value); + /// + /// 指定创建实例的产品类型,创建企业版实例时传空值或者enterprise,创建基础版实例时需要指定instance_mode的值为basic,创建生态版实例时需要指定instance_mode的值为ecology。 + /// + + std::string getInstanceMode() const; + bool instanceModeIsSet() const; + void unsetinstanceMode(); + void setInstanceMode(const std::string& value); + protected: std::string mode_; @@ -73,6 +82,8 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT OpenGaussHaOption bool consistencyIsSet_; std::string replicationMode_; bool replicationModeIsSet_; + std::string instanceMode_; + bool instanceModeIsSet_; }; diff --git a/gaussdbforopengauss/src/v3/model/OpenGaussHaOption.cpp b/gaussdbforopengauss/src/v3/model/OpenGaussHaOption.cpp index 4750eda8b..6a77f13cb 100644 --- a/gaussdbforopengauss/src/v3/model/OpenGaussHaOption.cpp +++ b/gaussdbforopengauss/src/v3/model/OpenGaussHaOption.cpp @@ -18,6 +18,8 @@ OpenGaussHaOption::OpenGaussHaOption() consistencyIsSet_ = false; replicationMode_ = ""; replicationModeIsSet_ = false; + instanceMode_ = ""; + instanceModeIsSet_ = false; } OpenGaussHaOption::~OpenGaussHaOption() = default; @@ -39,6 +41,9 @@ web::json::value OpenGaussHaOption::toJson() const if(replicationModeIsSet_) { val[utility::conversions::to_string_t("replication_mode")] = ModelBase::toJson(replicationMode_); } + if(instanceModeIsSet_) { + val[utility::conversions::to_string_t("instance_mode")] = ModelBase::toJson(instanceMode_); + } return val; } @@ -73,6 +78,15 @@ bool OpenGaussHaOption::fromJson(const web::json::value& val) setReplicationMode(refVal); } } + if(val.has_field(utility::conversions::to_string_t("instance_mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_mode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceMode(refVal); + } + } return ok; } @@ -140,6 +154,27 @@ void OpenGaussHaOption::unsetreplicationMode() replicationModeIsSet_ = false; } +std::string OpenGaussHaOption::getInstanceMode() const +{ + return instanceMode_; +} + +void OpenGaussHaOption::setInstanceMode(const std::string& value) +{ + instanceMode_ = value; + instanceModeIsSet_ = true; +} + +bool OpenGaussHaOption::instanceModeIsSet() const +{ + return instanceModeIsSet_; +} + +void OpenGaussHaOption::unsetinstanceMode() +{ + instanceModeIsSet_ = false; +} + } } } diff --git a/kms/include/huaweicloud/kms/v2/model/CreateDatakeyRequestBody.h b/kms/include/huaweicloud/kms/v2/model/CreateDatakeyRequestBody.h index 3b2e25f14..b345fc474 100644 --- a/kms/include/huaweicloud/kms/v2/model/CreateDatakeyRequestBody.h +++ b/kms/include/huaweicloud/kms/v2/model/CreateDatakeyRequestBody.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_KMS_V2_EXPORT CreateDatakeyRequestBody void unsetdatakeyLength(); void setDatakeyLength(const std::string& value); + /// + /// 身份验证的非敏感额外数据。任意字符串,长度不超过128字节。 + /// + + std::string getAdditionalAuthenticatedData() const; + bool additionalAuthenticatedDataIsSet() const; + void unsetadditionalAuthenticatedData(); + void setAdditionalAuthenticatedData(const std::string& value); + /// /// 请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff /// @@ -82,6 +91,8 @@ class HUAWEICLOUD_KMS_V2_EXPORT CreateDatakeyRequestBody bool keySpecIsSet_; std::string datakeyLength_; bool datakeyLengthIsSet_; + std::string additionalAuthenticatedData_; + bool additionalAuthenticatedDataIsSet_; std::string sequence_; bool sequenceIsSet_; diff --git a/kms/include/huaweicloud/kms/v2/model/DecryptDataRequestBody.h b/kms/include/huaweicloud/kms/v2/model/DecryptDataRequestBody.h index b1cd824e7..797debac5 100644 --- a/kms/include/huaweicloud/kms/v2/model/DecryptDataRequestBody.h +++ b/kms/include/huaweicloud/kms/v2/model/DecryptDataRequestBody.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_KMS_V2_EXPORT DecryptDataRequestBody void unsetkeyId(); void setKeyId(const std::string& value); + /// + /// 身份验证的非敏感额外数据。任意字符串,长度不超过128字节。 + /// + + std::string getAdditionalAuthenticatedData() const; + bool additionalAuthenticatedDataIsSet() const; + void unsetadditionalAuthenticatedData(); + void setAdditionalAuthenticatedData(const std::string& value); + /// /// 请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff /// @@ -82,6 +91,8 @@ class HUAWEICLOUD_KMS_V2_EXPORT DecryptDataRequestBody bool encryptionAlgorithmIsSet_; std::string keyId_; bool keyIdIsSet_; + std::string additionalAuthenticatedData_; + bool additionalAuthenticatedDataIsSet_; std::string sequence_; bool sequenceIsSet_; diff --git a/kms/include/huaweicloud/kms/v2/model/DecryptDatakeyRequestBody.h b/kms/include/huaweicloud/kms/v2/model/DecryptDatakeyRequestBody.h index 29e6f6f90..bc207fe18 100644 --- a/kms/include/huaweicloud/kms/v2/model/DecryptDatakeyRequestBody.h +++ b/kms/include/huaweicloud/kms/v2/model/DecryptDatakeyRequestBody.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_KMS_V2_EXPORT DecryptDatakeyRequestBody void unsetdatakeyCipherLength(); void setDatakeyCipherLength(const std::string& value); + /// + /// 身份验证的非敏感额外数据。任意字符串,长度不超过128字节。 + /// + + std::string getAdditionalAuthenticatedData() const; + bool additionalAuthenticatedDataIsSet() const; + void unsetadditionalAuthenticatedData(); + void setAdditionalAuthenticatedData(const std::string& value); + /// /// 请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff /// @@ -82,6 +91,8 @@ class HUAWEICLOUD_KMS_V2_EXPORT DecryptDatakeyRequestBody bool cipherTextIsSet_; std::string datakeyCipherLength_; bool datakeyCipherLengthIsSet_; + std::string additionalAuthenticatedData_; + bool additionalAuthenticatedDataIsSet_; std::string sequence_; bool sequenceIsSet_; diff --git a/kms/include/huaweicloud/kms/v2/model/EncryptDataRequestBody.h b/kms/include/huaweicloud/kms/v2/model/EncryptDataRequestBody.h index 6edeb09b0..7924f5c69 100644 --- a/kms/include/huaweicloud/kms/v2/model/EncryptDataRequestBody.h +++ b/kms/include/huaweicloud/kms/v2/model/EncryptDataRequestBody.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_KMS_V2_EXPORT EncryptDataRequestBody void unsetencryptionAlgorithm(); void setEncryptionAlgorithm(const std::string& value); + /// + /// 身份验证的非敏感额外数据。任意字符串,长度不超过128字节。 + /// + + std::string getAdditionalAuthenticatedData() const; + bool additionalAuthenticatedDataIsSet() const; + void unsetadditionalAuthenticatedData(); + void setAdditionalAuthenticatedData(const std::string& value); + /// /// 请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff /// @@ -82,6 +91,8 @@ class HUAWEICLOUD_KMS_V2_EXPORT EncryptDataRequestBody bool plainTextIsSet_; std::string encryptionAlgorithm_; bool encryptionAlgorithmIsSet_; + std::string additionalAuthenticatedData_; + bool additionalAuthenticatedDataIsSet_; std::string sequence_; bool sequenceIsSet_; diff --git a/kms/include/huaweicloud/kms/v2/model/EncryptDatakeyRequestBody.h b/kms/include/huaweicloud/kms/v2/model/EncryptDatakeyRequestBody.h index 995164a64..39b9470a8 100644 --- a/kms/include/huaweicloud/kms/v2/model/EncryptDatakeyRequestBody.h +++ b/kms/include/huaweicloud/kms/v2/model/EncryptDatakeyRequestBody.h @@ -65,6 +65,15 @@ class HUAWEICLOUD_KMS_V2_EXPORT EncryptDatakeyRequestBody void unsetdatakeyPlainLength(); void setDatakeyPlainLength(const std::string& value); + /// + /// 身份验证的非敏感额外数据。任意字符串,长度不超过128字节。 + /// + + std::string getAdditionalAuthenticatedData() const; + bool additionalAuthenticatedDataIsSet() const; + void unsetadditionalAuthenticatedData(); + void setAdditionalAuthenticatedData(const std::string& value); + /// /// 请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff /// @@ -82,6 +91,8 @@ class HUAWEICLOUD_KMS_V2_EXPORT EncryptDatakeyRequestBody bool plainTextIsSet_; std::string datakeyPlainLength_; bool datakeyPlainLengthIsSet_; + std::string additionalAuthenticatedData_; + bool additionalAuthenticatedDataIsSet_; std::string sequence_; bool sequenceIsSet_; diff --git a/kms/src/v2/model/CreateDatakeyRequestBody.cpp b/kms/src/v2/model/CreateDatakeyRequestBody.cpp index b80bacad7..5b482feca 100644 --- a/kms/src/v2/model/CreateDatakeyRequestBody.cpp +++ b/kms/src/v2/model/CreateDatakeyRequestBody.cpp @@ -18,6 +18,8 @@ CreateDatakeyRequestBody::CreateDatakeyRequestBody() keySpecIsSet_ = false; datakeyLength_ = ""; datakeyLengthIsSet_ = false; + additionalAuthenticatedData_ = ""; + additionalAuthenticatedDataIsSet_ = false; sequence_ = ""; sequenceIsSet_ = false; } @@ -41,6 +43,9 @@ web::json::value CreateDatakeyRequestBody::toJson() const if(datakeyLengthIsSet_) { val[utility::conversions::to_string_t("datakey_length")] = ModelBase::toJson(datakeyLength_); } + if(additionalAuthenticatedDataIsSet_) { + val[utility::conversions::to_string_t("additional_authenticated_data")] = ModelBase::toJson(additionalAuthenticatedData_); + } if(sequenceIsSet_) { val[utility::conversions::to_string_t("sequence")] = ModelBase::toJson(sequence_); } @@ -78,6 +83,15 @@ bool CreateDatakeyRequestBody::fromJson(const web::json::value& val) setDatakeyLength(refVal); } } + if(val.has_field(utility::conversions::to_string_t("additional_authenticated_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_authenticated_data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalAuthenticatedData(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sequence"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sequence")); if(!fieldValue.is_null()) @@ -154,6 +168,27 @@ void CreateDatakeyRequestBody::unsetdatakeyLength() datakeyLengthIsSet_ = false; } +std::string CreateDatakeyRequestBody::getAdditionalAuthenticatedData() const +{ + return additionalAuthenticatedData_; +} + +void CreateDatakeyRequestBody::setAdditionalAuthenticatedData(const std::string& value) +{ + additionalAuthenticatedData_ = value; + additionalAuthenticatedDataIsSet_ = true; +} + +bool CreateDatakeyRequestBody::additionalAuthenticatedDataIsSet() const +{ + return additionalAuthenticatedDataIsSet_; +} + +void CreateDatakeyRequestBody::unsetadditionalAuthenticatedData() +{ + additionalAuthenticatedDataIsSet_ = false; +} + std::string CreateDatakeyRequestBody::getSequence() const { return sequence_; diff --git a/kms/src/v2/model/DecryptDataRequestBody.cpp b/kms/src/v2/model/DecryptDataRequestBody.cpp index 7b8c70c52..6fe81645d 100644 --- a/kms/src/v2/model/DecryptDataRequestBody.cpp +++ b/kms/src/v2/model/DecryptDataRequestBody.cpp @@ -18,6 +18,8 @@ DecryptDataRequestBody::DecryptDataRequestBody() encryptionAlgorithmIsSet_ = false; keyId_ = ""; keyIdIsSet_ = false; + additionalAuthenticatedData_ = ""; + additionalAuthenticatedDataIsSet_ = false; sequence_ = ""; sequenceIsSet_ = false; } @@ -41,6 +43,9 @@ web::json::value DecryptDataRequestBody::toJson() const if(keyIdIsSet_) { val[utility::conversions::to_string_t("key_id")] = ModelBase::toJson(keyId_); } + if(additionalAuthenticatedDataIsSet_) { + val[utility::conversions::to_string_t("additional_authenticated_data")] = ModelBase::toJson(additionalAuthenticatedData_); + } if(sequenceIsSet_) { val[utility::conversions::to_string_t("sequence")] = ModelBase::toJson(sequence_); } @@ -78,6 +83,15 @@ bool DecryptDataRequestBody::fromJson(const web::json::value& val) setKeyId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("additional_authenticated_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_authenticated_data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalAuthenticatedData(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sequence"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sequence")); if(!fieldValue.is_null()) @@ -154,6 +168,27 @@ void DecryptDataRequestBody::unsetkeyId() keyIdIsSet_ = false; } +std::string DecryptDataRequestBody::getAdditionalAuthenticatedData() const +{ + return additionalAuthenticatedData_; +} + +void DecryptDataRequestBody::setAdditionalAuthenticatedData(const std::string& value) +{ + additionalAuthenticatedData_ = value; + additionalAuthenticatedDataIsSet_ = true; +} + +bool DecryptDataRequestBody::additionalAuthenticatedDataIsSet() const +{ + return additionalAuthenticatedDataIsSet_; +} + +void DecryptDataRequestBody::unsetadditionalAuthenticatedData() +{ + additionalAuthenticatedDataIsSet_ = false; +} + std::string DecryptDataRequestBody::getSequence() const { return sequence_; diff --git a/kms/src/v2/model/DecryptDatakeyRequestBody.cpp b/kms/src/v2/model/DecryptDatakeyRequestBody.cpp index 6f7836d9e..8507f8277 100644 --- a/kms/src/v2/model/DecryptDatakeyRequestBody.cpp +++ b/kms/src/v2/model/DecryptDatakeyRequestBody.cpp @@ -18,6 +18,8 @@ DecryptDatakeyRequestBody::DecryptDatakeyRequestBody() cipherTextIsSet_ = false; datakeyCipherLength_ = ""; datakeyCipherLengthIsSet_ = false; + additionalAuthenticatedData_ = ""; + additionalAuthenticatedDataIsSet_ = false; sequence_ = ""; sequenceIsSet_ = false; } @@ -41,6 +43,9 @@ web::json::value DecryptDatakeyRequestBody::toJson() const if(datakeyCipherLengthIsSet_) { val[utility::conversions::to_string_t("datakey_cipher_length")] = ModelBase::toJson(datakeyCipherLength_); } + if(additionalAuthenticatedDataIsSet_) { + val[utility::conversions::to_string_t("additional_authenticated_data")] = ModelBase::toJson(additionalAuthenticatedData_); + } if(sequenceIsSet_) { val[utility::conversions::to_string_t("sequence")] = ModelBase::toJson(sequence_); } @@ -78,6 +83,15 @@ bool DecryptDatakeyRequestBody::fromJson(const web::json::value& val) setDatakeyCipherLength(refVal); } } + if(val.has_field(utility::conversions::to_string_t("additional_authenticated_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_authenticated_data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalAuthenticatedData(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sequence"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sequence")); if(!fieldValue.is_null()) @@ -154,6 +168,27 @@ void DecryptDatakeyRequestBody::unsetdatakeyCipherLength() datakeyCipherLengthIsSet_ = false; } +std::string DecryptDatakeyRequestBody::getAdditionalAuthenticatedData() const +{ + return additionalAuthenticatedData_; +} + +void DecryptDatakeyRequestBody::setAdditionalAuthenticatedData(const std::string& value) +{ + additionalAuthenticatedData_ = value; + additionalAuthenticatedDataIsSet_ = true; +} + +bool DecryptDatakeyRequestBody::additionalAuthenticatedDataIsSet() const +{ + return additionalAuthenticatedDataIsSet_; +} + +void DecryptDatakeyRequestBody::unsetadditionalAuthenticatedData() +{ + additionalAuthenticatedDataIsSet_ = false; +} + std::string DecryptDatakeyRequestBody::getSequence() const { return sequence_; diff --git a/kms/src/v2/model/EncryptDataRequestBody.cpp b/kms/src/v2/model/EncryptDataRequestBody.cpp index 04a4d461d..e38189aed 100644 --- a/kms/src/v2/model/EncryptDataRequestBody.cpp +++ b/kms/src/v2/model/EncryptDataRequestBody.cpp @@ -18,6 +18,8 @@ EncryptDataRequestBody::EncryptDataRequestBody() plainTextIsSet_ = false; encryptionAlgorithm_ = ""; encryptionAlgorithmIsSet_ = false; + additionalAuthenticatedData_ = ""; + additionalAuthenticatedDataIsSet_ = false; sequence_ = ""; sequenceIsSet_ = false; } @@ -41,6 +43,9 @@ web::json::value EncryptDataRequestBody::toJson() const if(encryptionAlgorithmIsSet_) { val[utility::conversions::to_string_t("encryption_algorithm")] = ModelBase::toJson(encryptionAlgorithm_); } + if(additionalAuthenticatedDataIsSet_) { + val[utility::conversions::to_string_t("additional_authenticated_data")] = ModelBase::toJson(additionalAuthenticatedData_); + } if(sequenceIsSet_) { val[utility::conversions::to_string_t("sequence")] = ModelBase::toJson(sequence_); } @@ -78,6 +83,15 @@ bool EncryptDataRequestBody::fromJson(const web::json::value& val) setEncryptionAlgorithm(refVal); } } + if(val.has_field(utility::conversions::to_string_t("additional_authenticated_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_authenticated_data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalAuthenticatedData(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sequence"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sequence")); if(!fieldValue.is_null()) @@ -154,6 +168,27 @@ void EncryptDataRequestBody::unsetencryptionAlgorithm() encryptionAlgorithmIsSet_ = false; } +std::string EncryptDataRequestBody::getAdditionalAuthenticatedData() const +{ + return additionalAuthenticatedData_; +} + +void EncryptDataRequestBody::setAdditionalAuthenticatedData(const std::string& value) +{ + additionalAuthenticatedData_ = value; + additionalAuthenticatedDataIsSet_ = true; +} + +bool EncryptDataRequestBody::additionalAuthenticatedDataIsSet() const +{ + return additionalAuthenticatedDataIsSet_; +} + +void EncryptDataRequestBody::unsetadditionalAuthenticatedData() +{ + additionalAuthenticatedDataIsSet_ = false; +} + std::string EncryptDataRequestBody::getSequence() const { return sequence_; diff --git a/kms/src/v2/model/EncryptDatakeyRequestBody.cpp b/kms/src/v2/model/EncryptDatakeyRequestBody.cpp index e7ab1eb07..c14f16bfe 100644 --- a/kms/src/v2/model/EncryptDatakeyRequestBody.cpp +++ b/kms/src/v2/model/EncryptDatakeyRequestBody.cpp @@ -18,6 +18,8 @@ EncryptDatakeyRequestBody::EncryptDatakeyRequestBody() plainTextIsSet_ = false; datakeyPlainLength_ = ""; datakeyPlainLengthIsSet_ = false; + additionalAuthenticatedData_ = ""; + additionalAuthenticatedDataIsSet_ = false; sequence_ = ""; sequenceIsSet_ = false; } @@ -41,6 +43,9 @@ web::json::value EncryptDatakeyRequestBody::toJson() const if(datakeyPlainLengthIsSet_) { val[utility::conversions::to_string_t("datakey_plain_length")] = ModelBase::toJson(datakeyPlainLength_); } + if(additionalAuthenticatedDataIsSet_) { + val[utility::conversions::to_string_t("additional_authenticated_data")] = ModelBase::toJson(additionalAuthenticatedData_); + } if(sequenceIsSet_) { val[utility::conversions::to_string_t("sequence")] = ModelBase::toJson(sequence_); } @@ -78,6 +83,15 @@ bool EncryptDatakeyRequestBody::fromJson(const web::json::value& val) setDatakeyPlainLength(refVal); } } + if(val.has_field(utility::conversions::to_string_t("additional_authenticated_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_authenticated_data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalAuthenticatedData(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sequence"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sequence")); if(!fieldValue.is_null()) @@ -154,6 +168,27 @@ void EncryptDatakeyRequestBody::unsetdatakeyPlainLength() datakeyPlainLengthIsSet_ = false; } +std::string EncryptDatakeyRequestBody::getAdditionalAuthenticatedData() const +{ + return additionalAuthenticatedData_; +} + +void EncryptDatakeyRequestBody::setAdditionalAuthenticatedData(const std::string& value) +{ + additionalAuthenticatedData_ = value; + additionalAuthenticatedDataIsSet_ = true; +} + +bool EncryptDatakeyRequestBody::additionalAuthenticatedDataIsSet() const +{ + return additionalAuthenticatedDataIsSet_; +} + +void EncryptDatakeyRequestBody::unsetadditionalAuthenticatedData() +{ + additionalAuthenticatedDataIsSet_ = false; +} + std::string EncryptDatakeyRequestBody::getSequence() const { return sequence_; diff --git a/kvs/include/huaweicloud/kvs/v1/KvsCredentials.h b/kvs/include/huaweicloud/kvs/v1/KvsCredentials.h new file mode 100644 index 000000000..c13136589 --- /dev/null +++ b/kvs/include/huaweicloud/kvs/v1/KvsCredentials.h @@ -0,0 +1,49 @@ +#ifndef HUAWEICLOUD_SDK_CORE_AUTH_KVSCREDENTIALS_H +#define HUAWEICLOUD_SDK_CORE_AUTH_KVSCREDENTIALS_H + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Kvs { +namespace V1 { + +using namespace HuaweiCloud::Sdk::Core::Auth; + +class HUAWEICLOUD_KVS_V1_EXPORT KvsCredentials : public BasicCredentials { +public: + KvsCredentials(); + KvsCredentials(std::string ak, std::string sk, std::string securityToken, std::string projectId); + KvsCredentials(std::string ak, std::string sk, std::string projectId); + ~KvsCredentials(); + + bool getEnableBodySignature(); + KvsCredentials &withAk(std::string ak); + KvsCredentials &withSk(std::string sk); + KvsCredentials &withSecurityToken(std::string securityToken); + KvsCredentials &withProjectId(std::string projectId); + KvsCredentials &withIamEndpoint(std::string IamEndpoint); + KvsCredentials &withIamService(std::unique_ptr iamService); + KvsCredentials &withEnableBodySignature(bool enableBodySignature); + std::string processAuthRequest(HuaweiCloud::Sdk::Core::RequestParams &requestParams, + HuaweiCloud::Sdk::Core::Http::HttpConfig &httpConfig) override; + +private: + bool enableBodySignature_; + std::string ak_; + std::string sk_; + std::string securityToken_; + std::string projectId_; + std::string iamEndpoint_; + std::unique_ptr iamService; +}; +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CORE_AUTH_KVSCREDENTIALS_H diff --git a/kvs/src/v1/KvsClient.cpp b/kvs/src/v1/KvsClient.cpp index d1b438274..af16dfe1c 100644 --- a/kvs/src/v1/KvsClient.cpp +++ b/kvs/src/v1/KvsClient.cpp @@ -30,7 +30,7 @@ KvsClient::~KvsClient() ClientBuilder KvsClient::newBuilder() { - return ClientBuilder("BasicCredentials"); + return ClientBuilder("BasicCredentials,KvsCredentials"); } std::shared_ptr KvsClient::createTable(CreateTableRequest &request) { diff --git a/kvs/src/v1/KvsCredentials.cpp b/kvs/src/v1/KvsCredentials.cpp new file mode 100644 index 000000000..98f515178 --- /dev/null +++ b/kvs/src/v1/KvsCredentials.cpp @@ -0,0 +1,76 @@ +#include +#include +#include +#include + +using namespace HuaweiCloud::Sdk::Core::Auth; +using namespace HuaweiCloud::Sdk::Core::Exception; +using namespace HuaweiCloud::Sdk::Kvs::V1; + +KvsCredentials::KvsCredentials() = default; + +KvsCredentials::~KvsCredentials() = default; + +KvsCredentials::KvsCredentials(std::string ak, std::string sk, std::string securityToken, std::string projectId): + BasicCredentials(std::move(ak), std::move(sk), std::move(securityToken), std::move(projectId)){} + +KvsCredentials::KvsCredentials(std::string ak, std::string sk, std::string projectId): + BasicCredentials(std::move(ak), std::move(sk), std::move(projectId)){} + +KvsCredentials &KvsCredentials::withEnableBodySignature(bool enableBodySignature) { + enableBodySignature_ = enableBodySignature; + return *this; +} + +bool KvsCredentials::getEnableBodySignature() { + return enableBodySignature_; +} + +KvsCredentials &KvsCredentials::withSk(std::string sk) +{ + sk_ = std::move(sk); + return *this; +} + +KvsCredentials &KvsCredentials::withSecurityToken(std::string securityToken) +{ + securityToken_ = std::move(securityToken); + return *this; +} + +KvsCredentials &KvsCredentials::withProjectId(std::string projectId) +{ + projectId_ = std::move(projectId); + return *this; +} + +KvsCredentials &KvsCredentials::withAk(std::string ak) +{ + ak_ = std::move(ak); + return *this; +} + +KvsCredentials &KvsCredentials::withIamEndpoint(std::string iamEndpoint) { + iamEndpoint_ = std::move(iamEndpoint); + return *this; +} + +KvsCredentials &KvsCredentials::withIamService(std::unique_ptr iamService_) { + iamService = std::move(iamService_); + return *this; +} + +std::string KvsCredentials::processAuthRequest(HuaweiCloud::Sdk::Core::RequestParams &requestParams, + HuaweiCloud::Sdk::Core::Http::HttpConfig &httpConfig) +{ + requestParams.addHeader("X-Project-Id", projectId_); + if (!securityToken_.empty()) { + requestParams.addHeader("X-Security-Token", securityToken_); + } + if (!enableBodySignature_) { + requestParams.addHeader("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD"); + } + std::unique_ptr signer = getAlgorithmSigner(httpConfig.getAlgorithm(), ak_, sk_); + std::string signature = signer->createSignature(requestParams); + return signature; +} \ No newline at end of file