diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c9d03f0..e50d26746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,114 @@ +# 3.1.65 2023-12-14 + +### HuaweiCloud SDK CFW + +- _Features_ + - Support the APIs `CreateFirewall`, `ListJob`, `DeleteFirewall` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK CloudTable + +- _Features_ + - Support the API `CreateCloudTableCluster` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK Live + +- _Features_ + - Support the following APIs: + - `ListDelayConfig` + - `UpdateDelayConfig` + - `ShowPullSourcesConfig` + - `UpdatePullSourcesConfig` + - `ListGeoBlockingConfig` + - `UpdateGeoBlockingConfig` + - `CreateUrlAuthchain` + - `ListIpAuthList` + - `UpdateIpAuthList` + - `ListPublishTemplate` + - `UpdatePublishTemplate` + - `DeletePublishTemplate` +- _Bug Fix_ + - None +- _Change_ + - **ListRecordContents** + - changes of request param + - `+ record_type: enum value [PLAN_RECORD,ON_DEMAND_RECORD]` + - changes of response param + - `- record_contents.record_type: enum value [PLAN_RECORD,ON_DEMAND_RECORD]` + +### HuaweiCloud SDK LTS + +- _Features_ + - Support the API `CreateAgencyAccess` +- _Bug Fix_ + - None +- _Change_ + - **ListSqlAlarmRules** + - changes of response param + - `+ sql_alarm_rules.is_css_sql` + - `+ sql_alarm_rules.notification_frequency` + - `+ sql_alarm_rules.alarm_action_rule_name` + - `+ sql_alarm_rules.status: enum value [RUNNING 启用,STOPPING 停止]` + - `- sql_alarm_rules.status: enum value [RUNNING,STOPPING]` + - `* sql_alarm_rules.frequency: object -> object` + - **UpdateSqlAlarmRule** + - changes of request param + - `+ is_css_sql` + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `* frequency: object -> object` + - changes of response param + - `+ is_css_sql` + - `+ alarm_action_rule_name` + - `+ notification_frequency` + - `+ language: enum value [zh-cn,en-us]` + - `* frequency: object -> object` + - **CreateSqlAlarmRule** + - changes of request param + - `+ is_css_sql` + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `* frequency: object -> object` + - **ListKeywordsAlarmRules** + - changes of response param + - `+ keywords_alarm_rules.notification_frequency` + - `+ keywords_alarm_rules.alarm_action_rule_name` + - `+ keywords_alarm_rules.status: enum value [RUNNING 启用,STOPPING 停止]` + - `- keywords_alarm_rules.status: enum value [RUNNING,STOPPING]` + - **UpdateKeywordsAlarmRule** + - changes of request param + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - changes of response param + - `+ alarm_action_rule_name` + - `+ notification_frequency` + - `+ language: enum value [zh-cn,en-us]` + - `- keywords_requests.search_time_range_unit: enum value [minute]` + - `* keywords_requests: list -> list` + - `* frequency: object -> object` + - **CreateKeywordsAlarmRule** + - changes of request param + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `+ keywords_alarm_level: enum value [Critical]` + - `- keywords_alarm_level: enum value [CRITICAL]` + +### HuaweiCloud SDK RDS + +- _Features_ + - Support the APIs `ListLogLtsConfigs`, `SetLogLtsConfigs`, `DeleteLogLtsConfigs` +- _Bug Fix_ + - None +- _Change_ + - None + # 3.1.64 2023-12-07 ### HuaweiCloud SDK GaussDB diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 6445c0f25..39e8c7eb3 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,114 @@ +# 3.1.65 2023-12-14 + +### HuaweiCloud SDK CFW + +- _新增特性_ + - 支持接口`CreateFirewall`、`ListJob`、`DeleteFirewall` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK CloudTable + +- _新增特性_ + - 支持接口`CreateCloudTableCluster` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK Live + +- _新增特性_ + - 支持以下接口: + - `ListDelayConfig` + - `UpdateDelayConfig` + - `ShowPullSourcesConfig` + - `UpdatePullSourcesConfig` + - `ListGeoBlockingConfig` + - `UpdateGeoBlockingConfig` + - `CreateUrlAuthchain` + - `ListIpAuthList` + - `UpdateIpAuthList` + - `ListPublishTemplate` + - `UpdatePublishTemplate` + - `DeletePublishTemplate` +- _解决问题_ + - 无 +- _特性变更_ + - **ListRecordContents** + - 请求参数变更 + - `+ record_type: enum value [PLAN_RECORD,ON_DEMAND_RECORD]` + - 响应参数变更 + - `- record_contents.record_type: enum value [PLAN_RECORD,ON_DEMAND_RECORD]` + +### HuaweiCloud SDK LTS + +- _新增特性_ + - 支持接口`CreateAgencyAccess` +- _解决问题_ + - 无 +- _特性变更_ + - **ListSqlAlarmRules** + - 响应参数变更 + - `+ sql_alarm_rules.is_css_sql` + - `+ sql_alarm_rules.notification_frequency` + - `+ sql_alarm_rules.alarm_action_rule_name` + - `+ sql_alarm_rules.status: enum value [RUNNING 启用,STOPPING 停止]` + - `- sql_alarm_rules.status: enum value [RUNNING,STOPPING]` + - `* sql_alarm_rules.frequency: object -> object` + - **UpdateSqlAlarmRule** + - 请求参数变更 + - `+ is_css_sql` + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `* frequency: object -> object` + - 响应参数变更 + - `+ is_css_sql` + - `+ alarm_action_rule_name` + - `+ notification_frequency` + - `+ language: enum value [zh-cn,en-us]` + - `* frequency: object -> object` + - **CreateSqlAlarmRule** + - 请求参数变更 + - `+ is_css_sql` + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `* frequency: object -> object` + - **ListKeywordsAlarmRules** + - 响应参数变更 + - `+ keywords_alarm_rules.notification_frequency` + - `+ keywords_alarm_rules.alarm_action_rule_name` + - `+ keywords_alarm_rules.status: enum value [RUNNING 启用,STOPPING 停止]` + - `- keywords_alarm_rules.status: enum value [RUNNING,STOPPING]` + - **UpdateKeywordsAlarmRule** + - 请求参数变更 + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - 响应参数变更 + - `+ alarm_action_rule_name` + - `+ notification_frequency` + - `+ language: enum value [zh-cn,en-us]` + - `- keywords_requests.search_time_range_unit: enum value [minute]` + - `* keywords_requests: list -> list` + - `* frequency: object -> object` + - **CreateKeywordsAlarmRule** + - 请求参数变更 + - `+ notification_frequency` + - `+ alarm_action_rule_name` + - `+ keywords_alarm_level: enum value [Critical]` + - `- keywords_alarm_level: enum value [CRITICAL]` + +### HuaweiCloud SDK RDS + +- _新增特性_ + - 支持接口`ListLogLtsConfigs`、`SetLogLtsConfigs`、`DeleteLogLtsConfigs` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + # 3.1.64 2023-12-07 ### HuaweiCloud SDK GaussDB diff --git a/VERSION b/VERSION index 331ba4bca..061174579 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.64 +3.1.65 diff --git a/cfw/include/huaweicloud/cfw/v1/CfwClient.h b/cfw/include/huaweicloud/cfw/v1/CfwClient.h index 2bf23f6bc..6e10d2e7f 100644 --- a/cfw/include/huaweicloud/cfw/v1/CfwClient.h +++ b/cfw/include/huaweicloud/cfw/v1/CfwClient.h @@ -39,6 +39,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -51,6 +54,8 @@ #include #include #include +#include +#include #include #include #include @@ -84,6 +89,8 @@ #include #include #include +#include +#include #include #include #include @@ -285,6 +292,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr createEastWestFirewall( CreateEastWestFirewallRequest &request ); + // 创建防火墙 + // + // 创建防火墙 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createFirewall( + CreateFirewallRequest &request + ); // 删除地址组成员 // // 删除地址组成员 @@ -325,6 +340,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr deleteDomains( DeleteDomainsRequest &request ); + // 删除防火墙 + // + // 删除防火墙,仅按需生效 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteFirewall( + DeleteFirewallRequest &request + ); // 删除服务成员 // // 删除服务组成员 @@ -453,6 +476,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listFlowLogs( ListFlowLogsRequest &request ); + // 获取CFW任务执行状态 + // + // 获取CFW任务执行状态 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listJob( + ListJobRequest &request + ); // 获取日志配置 // // 获取日志配置 diff --git a/cfw/include/huaweicloud/cfw/v1/CfwMeta.h b/cfw/include/huaweicloud/cfw/v1/CfwMeta.h index 5faad51f3..456cffdb2 100644 --- a/cfw/include/huaweicloud/cfw/v1/CfwMeta.h +++ b/cfw/include/huaweicloud/cfw/v1/CfwMeta.h @@ -25,11 +25,13 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForBatchDeleteServiceItems(); static HttpRequestDef genRequestDefForChangeEastWestFirewallStatus(); static HttpRequestDef genRequestDefForCreateEastWestFirewall(); + static HttpRequestDef genRequestDefForCreateFirewall(); static HttpRequestDef genRequestDefForDeleteAddressItem(); static HttpRequestDef genRequestDefForDeleteAddressSet(); static HttpRequestDef genRequestDefForDeleteBlackWhiteList(); static HttpRequestDef genRequestDefForDeleteDomainSet(); static HttpRequestDef genRequestDefForDeleteDomains(); + static HttpRequestDef genRequestDefForDeleteFirewall(); static HttpRequestDef genRequestDefForDeleteServiceItem(); static HttpRequestDef genRequestDefForDeleteServiceSet(); static HttpRequestDef genRequestDefForListAccessControlLogs(); @@ -46,6 +48,7 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForListFirewallDetail(); static HttpRequestDef genRequestDefForListFirewallList(); static HttpRequestDef genRequestDefForListFlowLogs(); + static HttpRequestDef genRequestDefForListJob(); static HttpRequestDef genRequestDefForListLogConfig(); static HttpRequestDef genRequestDefForListProtectedVpcs(); static HttpRequestDef genRequestDefForListServiceItems(); diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq.h new file mode 100644 index 000000000..62845cfc0 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq.h @@ -0,0 +1,112 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 按需防火墙实体 +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallReq + : public ModelBase +{ +public: + CreateFirewallReq(); + virtual ~CreateFirewallReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallReq members + + /// + /// 防火墙名称 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 企业项目ID,租户未开启企业项目时传0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 资源标签 + /// + + std::vector& getTags(); + bool tagsIsSet() const; + void unsettags(); + void setTags(const std::vector& value); + + /// + /// + /// + + CreateFirewallReq_flavor getFlavor() const; + bool flavorIsSet() const; + void unsetflavor(); + void setFlavor(const CreateFirewallReq_flavor& value); + + /// + /// + /// + + CreateFirewallReq_charge_info getChargeInfo() const; + bool chargeInfoIsSet() const; + void unsetchargeInfo(); + void setChargeInfo(const CreateFirewallReq_charge_info& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::vector tags_; + bool tagsIsSet_; + CreateFirewallReq_flavor flavor_; + bool flavorIsSet_; + CreateFirewallReq_charge_info chargeInfo_; + bool chargeInfoIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_charge_info.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_charge_info.h new file mode 100644 index 000000000..1f98b9e66 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_charge_info.h @@ -0,0 +1,108 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_charge_info_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_charge_info_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 计费类型信息,支持包年/包月和按需,默认为按需。 +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallReq_charge_info + : public ModelBase +{ +public: + CreateFirewallReq_charge_info(); + virtual ~CreateFirewallReq_charge_info(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallReq_charge_info members + + /// + /// 计费模式。 取值范围: prePaid:预付费,即包年/包月。 postPaid:后付费,即按需付费。 + /// + + std::string getChargeMode() const; + bool chargeModeIsSet() const; + void unsetchargeMode(); + void setChargeMode(const std::string& value); + + /// + /// 订购周期类型。 取值范围: month:包月。 year:包年。 说明:“charge_mode”为“prePaid”时生效,且为必选值。 + /// + + std::string getPeriodType() const; + bool periodTypeIsSet() const; + void unsetperiodType(); + void setPeriodType(const std::string& value); + + /// + /// “charge_mode”为“prePaid”时生效,且为必选值,指定订购的时间。 取值范围: 当“period_type”为“month”时,取值为1~9。 当“period_type”为“year”时,取值为1~3。 + /// + + int32_t getPeriodNum() const; + bool periodNumIsSet() const; + void unsetperiodNum(); + void setPeriodNum(int32_t value); + + /// + /// 创建包周期实例时可指定,表示是否自动续订,续订的周期和原周期相同,且续订时会自动支付。 true,为自动续订。 false,为不自动续订,默认该方式。 + /// + + bool isIsAutoRenew() const; + bool isAutoRenewIsSet() const; + void unsetisAutoRenew(); + void setIsAutoRenew(bool value); + + /// + /// 创建包周期时可指定,表示是否自动从客户的账户中支付,此字段不影响自动续订的支付方式。 true,为自动支付。(会自动选择折扣和优惠券进行优惠,然后自动从客户华为云账户中支付),自动支付失败后会生成订单成功(该订单应付金额是优惠后金额)、但订单状态为“待支付”,等待客户手动支付(手动支付时,客户还可以修改系统自动选择的折扣和优惠券) false,为手动支付,默认该方式。(需要客户手动去支付,客户可以选择折扣和优惠券) + /// + + bool isIsAutoPay() const; + bool isAutoPayIsSet() const; + void unsetisAutoPay(); + void setIsAutoPay(bool value); + + +protected: + std::string chargeMode_; + bool chargeModeIsSet_; + std::string periodType_; + bool periodTypeIsSet_; + int32_t periodNum_; + bool periodNumIsSet_; + bool isAutoRenew_; + bool isAutoRenewIsSet_; + bool isAutoPay_; + bool isAutoPayIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_charge_info_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_flavor.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_flavor.h new file mode 100644 index 000000000..b2025f1e9 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_flavor.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_flavor_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_flavor_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 规格信息 +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallReq_flavor + : public ModelBase +{ +public: + CreateFirewallReq_flavor(); + virtual ~CreateFirewallReq_flavor(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallReq_flavor members + + /// + /// 防火墙版本 “charge_mode”为“prePaid”时,仅支持专业版。 “charge_mode”为“postPaid”时,支持标准版、专业版。 Standard - 标准版 Professional - 专业版 Platinum - 铂金版,防火墙版本“charge_mode”为\"postPaid\"时,仅支持专业版。“charge_mode”为“prePaid”时,支持标准版、专业版。 + /// + + std::string getVersion() const; + bool versionIsSet() const; + void unsetversion(); + void setVersion(const std::string& value); + + /// + /// 扩展EIP数量,仅包周期场景下生效 + /// + + int32_t getExtendEipCount() const; + bool extendEipCountIsSet() const; + void unsetextendEipCount(); + void setExtendEipCount(int32_t value); + + /// + /// 扩展带宽,步长为5,仅包周期场景下生效 + /// + + int32_t getExtendBandwidth() const; + bool extendBandwidthIsSet() const; + void unsetextendBandwidth(); + void setExtendBandwidth(int32_t value); + + /// + /// 扩展VPC数量,仅包周期场景下生效 + /// + + int32_t getExtendVpcCount() const; + bool extendVpcCountIsSet() const; + void unsetextendVpcCount(); + void setExtendVpcCount(int32_t value); + + +protected: + std::string version_; + bool versionIsSet_; + int32_t extendEipCount_; + bool extendEipCountIsSet_; + int32_t extendBandwidth_; + bool extendBandwidthIsSet_; + int32_t extendVpcCount_; + bool extendVpcCountIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_flavor_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_tags.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_tags.h new file mode 100644 index 000000000..e915ec9d6 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallReq_tags.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_tags_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_tags_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallReq_tags + : public ModelBase +{ +public: + CreateFirewallReq_tags(); + virtual ~CreateFirewallReq_tags(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallReq_tags members + + /// + /// 标签KEY + /// + + std::string getKey() const; + bool keyIsSet() const; + void unsetkey(); + void setKey(const std::string& value); + + /// + /// 标签VALUE + /// + + std::string getValue() const; + bool valueIsSet() const; + void unsetvalue(); + void setValue(const std::string& value); + + +protected: + std::string key_; + bool keyIsSet_; + std::string value_; + bool valueIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallReq_tags_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallRequest.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallRequest.h new file mode 100644 index 000000000..793478e9e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallRequest + : public ModelBase +{ +public: + CreateFirewallRequest(); + virtual ~CreateFirewallRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallRequest members + + /// + /// 保证客户端请求幂等性的标识。 该标识为32位UUID格式,由客户端生成,且需确保不同请求之间该标识具有唯一性。 + /// + + std::string getXClientToken() const; + bool xClientTokenIsSet() const; + void unsetxClientToken(); + void setXClientToken(const std::string& value); + + /// + /// + /// + + std::string getXTraceId() const; + bool xTraceIdIsSet() const; + void unsetxTraceId(); + void setXTraceId(const std::string& value); + + /// + /// + /// + + CreateFirewallReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateFirewallReq& value); + + +protected: + std::string xClientToken_; + bool xClientTokenIsSet_; + std::string xTraceId_; + bool xTraceIdIsSet_; + CreateFirewallReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateFirewallRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallResponse.h b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallResponse.h new file mode 100644 index 000000000..3e37f63a5 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CreateFirewallResponse.h @@ -0,0 +1,90 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT CreateFirewallResponse + : public ModelBase, public HttpResponse +{ +public: + CreateFirewallResponse(); + virtual ~CreateFirewallResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateFirewallResponse members + + /// + /// 实例创建的任务id。 仅创建按需实例时会返回该参数。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// 订单号,创建包年包月时返回该参数。 + /// + + std::string getOrderId() const; + bool orderIdIsSet() const; + void unsetorderId(); + void setOrderId(const std::string& value); + + /// + /// + /// + + CreateFirewallReq getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const CreateFirewallReq& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + std::string orderId_; + bool orderIdIsSet_; + CreateFirewallReq data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CreateFirewallResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallRequest.h b/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallRequest.h new file mode 100644 index 000000000..5aaab2679 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT DeleteFirewallRequest + : public ModelBase +{ +public: + DeleteFirewallRequest(); + virtual ~DeleteFirewallRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteFirewallRequest members + + /// + /// 资源id + /// + + std::string getResourceId() const; + bool resourceIdIsSet() const; + void unsetresourceId(); + void setResourceId(const std::string& value); + + +protected: + std::string resourceId_; + bool resourceIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteFirewallRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallResponse.h b/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallResponse.h new file mode 100644 index 000000000..226010f20 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/DeleteFirewallResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT DeleteFirewallResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteFirewallResponse(); + virtual ~DeleteFirewallResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteFirewallResponse members + + /// + /// 删除防火墙返回data + /// + + std::string getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const std::string& value); + + +protected: + std::string data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_DeleteFirewallResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ErrorRsp.h b/cfw/include/huaweicloud/cfw/v1/model/ErrorRsp.h new file mode 100644 index 000000000..1c1557ae7 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ErrorRsp.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ErrorRsp_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ErrorRsp_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 失败时返回的错误对象 +/// +class HUAWEICLOUD_CFW_V1_EXPORT ErrorRsp + : public ModelBase +{ +public: + ErrorRsp(); + virtual ~ErrorRsp(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ErrorRsp members + + /// + /// 错误码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 错误描述 + /// + + std::string getErrorMsg() const; + bool errorMsgIsSet() const; + void unseterrorMsg(); + void setErrorMsg(const std::string& value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorMsg_; + bool errorMsgIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ErrorRsp_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListJobRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListJobRequest.h new file mode 100644 index 000000000..d1a98cfeb --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListJobRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListJobRequest + : public ModelBase +{ +public: + ListJobRequest(); + virtual ~ListJobRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListJobRequest members + + /// + /// 任务ID + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListJobRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListJobResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListJobResponse.h new file mode 100644 index 000000000..147e522be --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListJobResponse.h @@ -0,0 +1,91 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListJobResponse + : public ModelBase, public HttpResponse +{ +public: + ListJobResponse(); + virtual ~ListJobResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListJobResponse members + + /// + /// 错误码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 错误描述 + /// + + std::string getErrorMsg() const; + bool errorMsgIsSet() const; + void unseterrorMsg(); + void setErrorMsg(const std::string& value); + + /// + /// 执行结果 + /// + + Object getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const Object& value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorMsg_; + bool errorMsgIsSet_; + Object data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListJobResponse_H_ diff --git a/cfw/src/v1/CfwClient.cpp b/cfw/src/v1/CfwClient.cpp index 0443735da..b9c2dc6ad 100644 --- a/cfw/src/v1/CfwClient.cpp +++ b/cfw/src/v1/CfwClient.cpp @@ -597,6 +597,53 @@ std::shared_ptr CfwClient::createEastWestFirewal return localVarResult; } +std::shared_ptr CfwClient::createFirewall(CreateFirewallRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/firewall"; + + 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.xClientTokenIsSet()) { + localVarHeaderParams["X-Client-Token"] = parameterToString(request.getXClientToken()); + } + if (request.xTraceIdIsSet()) { + localVarHeaderParams["X-Trace-Id"] = parameterToString(request.getXTraceId()); + } + + 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("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForCreateFirewall()); + + 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 CfwClient::deleteAddressItem(DeleteAddressItemRequest &request) { std::string localVarPath = "/v1/{project_id}/address-items/{item_id}"; @@ -786,6 +833,36 @@ std::shared_ptr CfwClient::deleteDomains(DeleteDomainsReq return localVarResult; } +std::shared_ptr CfwClient::deleteFirewall(DeleteFirewallRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/firewall/{resource_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["resource_id"] = parameterToString(request.getResourceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForDeleteFirewall()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::deleteServiceItem(DeleteServiceItemRequest &request) { std::string localVarPath = "/v1/{project_id}/service-items/{item_id}"; @@ -1630,6 +1707,36 @@ std::shared_ptr CfwClient::listFlowLogs(ListFlowLogsReques return localVarResult; } +std::shared_ptr CfwClient::listJob(ListJobRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/jobs/{job_id}"; + + 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; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListJob()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listLogConfig(ListLogConfigRequest &request) { std::string localVarPath = "/v1/{project_id}/cfw/logs/configuration"; diff --git a/cfw/src/v1/CfwMeta.cpp b/cfw/src/v1/CfwMeta.cpp index ec911d409..e2bb93073 100644 --- a/cfw/src/v1/CfwMeta.cpp +++ b/cfw/src/v1/CfwMeta.cpp @@ -188,6 +188,25 @@ HttpRequestDef CfwMeta::genRequestDefForCreateEastWestFirewall() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForCreateFirewall() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXClientToken; + reqDefBuilder.withRequestField(headerParamXClientToken + .withName("XClientToken") + .withJsonTag("X-Client-Token") + .withLocationType(Header_)); + FieldDef headerParamXTraceId; + reqDefBuilder.withRequestField(headerParamXTraceId + .withName("XTraceId") + .withJsonTag("X-Trace-Id") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForDeleteAddressItem() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -244,6 +263,11 @@ HttpRequestDef CfwMeta::genRequestDefForDeleteDomains() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForDeleteFirewall() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForDeleteServiceItem() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -691,6 +715,11 @@ HttpRequestDef CfwMeta::genRequestDefForListFlowLogs() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListJob() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListLogConfig() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") diff --git a/cfw/src/v1/model/CreateFirewallReq.cpp b/cfw/src/v1/model/CreateFirewallReq.cpp new file mode 100644 index 000000000..405da74c9 --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallReq.cpp @@ -0,0 +1,216 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallReq::CreateFirewallReq() +{ + name_ = ""; + nameIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + tagsIsSet_ = false; + flavorIsSet_ = false; + chargeInfoIsSet_ = false; +} + +CreateFirewallReq::~CreateFirewallReq() = default; + +void CreateFirewallReq::validate() +{ +} + +web::json::value CreateFirewallReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(tagsIsSet_) { + val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); + } + if(flavorIsSet_) { + val[utility::conversions::to_string_t("flavor")] = ModelBase::toJson(flavor_); + } + if(chargeInfoIsSet_) { + val[utility::conversions::to_string_t("charge_info")] = ModelBase::toJson(chargeInfo_); + } + + return val; +} +bool CreateFirewallReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTags(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("flavor"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("flavor")); + if(!fieldValue.is_null()) + { + CreateFirewallReq_flavor refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFlavor(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("charge_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("charge_info")); + if(!fieldValue.is_null()) + { + CreateFirewallReq_charge_info refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setChargeInfo(refVal); + } + } + return ok; +} + + +std::string CreateFirewallReq::getName() const +{ + return name_; +} + +void CreateFirewallReq::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool CreateFirewallReq::nameIsSet() const +{ + return nameIsSet_; +} + +void CreateFirewallReq::unsetname() +{ + nameIsSet_ = false; +} + +std::string CreateFirewallReq::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void CreateFirewallReq::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool CreateFirewallReq::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void CreateFirewallReq::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::vector& CreateFirewallReq::getTags() +{ + return tags_; +} + +void CreateFirewallReq::setTags(const std::vector& value) +{ + tags_ = value; + tagsIsSet_ = true; +} + +bool CreateFirewallReq::tagsIsSet() const +{ + return tagsIsSet_; +} + +void CreateFirewallReq::unsettags() +{ + tagsIsSet_ = false; +} + +CreateFirewallReq_flavor CreateFirewallReq::getFlavor() const +{ + return flavor_; +} + +void CreateFirewallReq::setFlavor(const CreateFirewallReq_flavor& value) +{ + flavor_ = value; + flavorIsSet_ = true; +} + +bool CreateFirewallReq::flavorIsSet() const +{ + return flavorIsSet_; +} + +void CreateFirewallReq::unsetflavor() +{ + flavorIsSet_ = false; +} + +CreateFirewallReq_charge_info CreateFirewallReq::getChargeInfo() const +{ + return chargeInfo_; +} + +void CreateFirewallReq::setChargeInfo(const CreateFirewallReq_charge_info& value) +{ + chargeInfo_ = value; + chargeInfoIsSet_ = true; +} + +bool CreateFirewallReq::chargeInfoIsSet() const +{ + return chargeInfoIsSet_; +} + +void CreateFirewallReq::unsetchargeInfo() +{ + chargeInfoIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CreateFirewallReq_charge_info.cpp b/cfw/src/v1/model/CreateFirewallReq_charge_info.cpp new file mode 100644 index 000000000..649093f5b --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallReq_charge_info.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallReq_charge_info.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallReq_charge_info::CreateFirewallReq_charge_info() +{ + chargeMode_ = ""; + chargeModeIsSet_ = false; + periodType_ = ""; + periodTypeIsSet_ = false; + periodNum_ = 0; + periodNumIsSet_ = false; + isAutoRenew_ = false; + isAutoRenewIsSet_ = false; + isAutoPay_ = false; + isAutoPayIsSet_ = false; +} + +CreateFirewallReq_charge_info::~CreateFirewallReq_charge_info() = default; + +void CreateFirewallReq_charge_info::validate() +{ +} + +web::json::value CreateFirewallReq_charge_info::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(chargeModeIsSet_) { + val[utility::conversions::to_string_t("charge_mode")] = ModelBase::toJson(chargeMode_); + } + if(periodTypeIsSet_) { + val[utility::conversions::to_string_t("period_type")] = ModelBase::toJson(periodType_); + } + if(periodNumIsSet_) { + val[utility::conversions::to_string_t("period_num")] = ModelBase::toJson(periodNum_); + } + if(isAutoRenewIsSet_) { + val[utility::conversions::to_string_t("is_auto_renew")] = ModelBase::toJson(isAutoRenew_); + } + if(isAutoPayIsSet_) { + val[utility::conversions::to_string_t("is_auto_pay")] = ModelBase::toJson(isAutoPay_); + } + + return val; +} +bool CreateFirewallReq_charge_info::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("charge_mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("charge_mode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setChargeMode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("period_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("period_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_auto_renew"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_auto_renew")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsAutoRenew(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_auto_pay"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_auto_pay")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsAutoPay(refVal); + } + } + return ok; +} + + +std::string CreateFirewallReq_charge_info::getChargeMode() const +{ + return chargeMode_; +} + +void CreateFirewallReq_charge_info::setChargeMode(const std::string& value) +{ + chargeMode_ = value; + chargeModeIsSet_ = true; +} + +bool CreateFirewallReq_charge_info::chargeModeIsSet() const +{ + return chargeModeIsSet_; +} + +void CreateFirewallReq_charge_info::unsetchargeMode() +{ + chargeModeIsSet_ = false; +} + +std::string CreateFirewallReq_charge_info::getPeriodType() const +{ + return periodType_; +} + +void CreateFirewallReq_charge_info::setPeriodType(const std::string& value) +{ + periodType_ = value; + periodTypeIsSet_ = true; +} + +bool CreateFirewallReq_charge_info::periodTypeIsSet() const +{ + return periodTypeIsSet_; +} + +void CreateFirewallReq_charge_info::unsetperiodType() +{ + periodTypeIsSet_ = false; +} + +int32_t CreateFirewallReq_charge_info::getPeriodNum() const +{ + return periodNum_; +} + +void CreateFirewallReq_charge_info::setPeriodNum(int32_t value) +{ + periodNum_ = value; + periodNumIsSet_ = true; +} + +bool CreateFirewallReq_charge_info::periodNumIsSet() const +{ + return periodNumIsSet_; +} + +void CreateFirewallReq_charge_info::unsetperiodNum() +{ + periodNumIsSet_ = false; +} + +bool CreateFirewallReq_charge_info::isIsAutoRenew() const +{ + return isAutoRenew_; +} + +void CreateFirewallReq_charge_info::setIsAutoRenew(bool value) +{ + isAutoRenew_ = value; + isAutoRenewIsSet_ = true; +} + +bool CreateFirewallReq_charge_info::isAutoRenewIsSet() const +{ + return isAutoRenewIsSet_; +} + +void CreateFirewallReq_charge_info::unsetisAutoRenew() +{ + isAutoRenewIsSet_ = false; +} + +bool CreateFirewallReq_charge_info::isIsAutoPay() const +{ + return isAutoPay_; +} + +void CreateFirewallReq_charge_info::setIsAutoPay(bool value) +{ + isAutoPay_ = value; + isAutoPayIsSet_ = true; +} + +bool CreateFirewallReq_charge_info::isAutoPayIsSet() const +{ + return isAutoPayIsSet_; +} + +void CreateFirewallReq_charge_info::unsetisAutoPay() +{ + isAutoPayIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CreateFirewallReq_flavor.cpp b/cfw/src/v1/model/CreateFirewallReq_flavor.cpp new file mode 100644 index 000000000..ad35f77fa --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallReq_flavor.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallReq_flavor.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallReq_flavor::CreateFirewallReq_flavor() +{ + version_ = ""; + versionIsSet_ = false; + extendEipCount_ = 0; + extendEipCountIsSet_ = false; + extendBandwidth_ = 0; + extendBandwidthIsSet_ = false; + extendVpcCount_ = 0; + extendVpcCountIsSet_ = false; +} + +CreateFirewallReq_flavor::~CreateFirewallReq_flavor() = default; + +void CreateFirewallReq_flavor::validate() +{ +} + +web::json::value CreateFirewallReq_flavor::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(versionIsSet_) { + val[utility::conversions::to_string_t("version")] = ModelBase::toJson(version_); + } + if(extendEipCountIsSet_) { + val[utility::conversions::to_string_t("extend_eip_count")] = ModelBase::toJson(extendEipCount_); + } + if(extendBandwidthIsSet_) { + val[utility::conversions::to_string_t("extend_bandwidth")] = ModelBase::toJson(extendBandwidth_); + } + if(extendVpcCountIsSet_) { + val[utility::conversions::to_string_t("extend_vpc_count")] = ModelBase::toJson(extendVpcCount_); + } + + return val; +} +bool CreateFirewallReq_flavor::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("version"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("version")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setVersion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("extend_eip_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extend_eip_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExtendEipCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("extend_bandwidth"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extend_bandwidth")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExtendBandwidth(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("extend_vpc_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extend_vpc_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExtendVpcCount(refVal); + } + } + return ok; +} + + +std::string CreateFirewallReq_flavor::getVersion() const +{ + return version_; +} + +void CreateFirewallReq_flavor::setVersion(const std::string& value) +{ + version_ = value; + versionIsSet_ = true; +} + +bool CreateFirewallReq_flavor::versionIsSet() const +{ + return versionIsSet_; +} + +void CreateFirewallReq_flavor::unsetversion() +{ + versionIsSet_ = false; +} + +int32_t CreateFirewallReq_flavor::getExtendEipCount() const +{ + return extendEipCount_; +} + +void CreateFirewallReq_flavor::setExtendEipCount(int32_t value) +{ + extendEipCount_ = value; + extendEipCountIsSet_ = true; +} + +bool CreateFirewallReq_flavor::extendEipCountIsSet() const +{ + return extendEipCountIsSet_; +} + +void CreateFirewallReq_flavor::unsetextendEipCount() +{ + extendEipCountIsSet_ = false; +} + +int32_t CreateFirewallReq_flavor::getExtendBandwidth() const +{ + return extendBandwidth_; +} + +void CreateFirewallReq_flavor::setExtendBandwidth(int32_t value) +{ + extendBandwidth_ = value; + extendBandwidthIsSet_ = true; +} + +bool CreateFirewallReq_flavor::extendBandwidthIsSet() const +{ + return extendBandwidthIsSet_; +} + +void CreateFirewallReq_flavor::unsetextendBandwidth() +{ + extendBandwidthIsSet_ = false; +} + +int32_t CreateFirewallReq_flavor::getExtendVpcCount() const +{ + return extendVpcCount_; +} + +void CreateFirewallReq_flavor::setExtendVpcCount(int32_t value) +{ + extendVpcCount_ = value; + extendVpcCountIsSet_ = true; +} + +bool CreateFirewallReq_flavor::extendVpcCountIsSet() const +{ + return extendVpcCountIsSet_; +} + +void CreateFirewallReq_flavor::unsetextendVpcCount() +{ + extendVpcCountIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CreateFirewallReq_tags.cpp b/cfw/src/v1/model/CreateFirewallReq_tags.cpp new file mode 100644 index 000000000..420d0b085 --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallReq_tags.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallReq_tags.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallReq_tags::CreateFirewallReq_tags() +{ + key_ = ""; + keyIsSet_ = false; + value_ = ""; + valueIsSet_ = false; +} + +CreateFirewallReq_tags::~CreateFirewallReq_tags() = default; + +void CreateFirewallReq_tags::validate() +{ +} + +web::json::value CreateFirewallReq_tags::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(keyIsSet_) { + val[utility::conversions::to_string_t("key")] = ModelBase::toJson(key_); + } + if(valueIsSet_) { + val[utility::conversions::to_string_t("value")] = ModelBase::toJson(value_); + } + + return val; +} +bool CreateFirewallReq_tags::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("value"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("value")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setValue(refVal); + } + } + return ok; +} + + +std::string CreateFirewallReq_tags::getKey() const +{ + return key_; +} + +void CreateFirewallReq_tags::setKey(const std::string& value) +{ + key_ = value; + keyIsSet_ = true; +} + +bool CreateFirewallReq_tags::keyIsSet() const +{ + return keyIsSet_; +} + +void CreateFirewallReq_tags::unsetkey() +{ + keyIsSet_ = false; +} + +std::string CreateFirewallReq_tags::getValue() const +{ + return value_; +} + +void CreateFirewallReq_tags::setValue(const std::string& value) +{ + value_ = value; + valueIsSet_ = true; +} + +bool CreateFirewallReq_tags::valueIsSet() const +{ + return valueIsSet_; +} + +void CreateFirewallReq_tags::unsetvalue() +{ + valueIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CreateFirewallRequest.cpp b/cfw/src/v1/model/CreateFirewallRequest.cpp new file mode 100644 index 000000000..bb049f84d --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallRequest::CreateFirewallRequest() +{ + xClientToken_ = ""; + xClientTokenIsSet_ = false; + xTraceId_ = ""; + xTraceIdIsSet_ = false; + bodyIsSet_ = false; +} + +CreateFirewallRequest::~CreateFirewallRequest() = default; + +void CreateFirewallRequest::validate() +{ +} + +web::json::value CreateFirewallRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xClientTokenIsSet_) { + val[utility::conversions::to_string_t("X-Client-Token")] = ModelBase::toJson(xClientToken_); + } + if(xTraceIdIsSet_) { + val[utility::conversions::to_string_t("X-Trace-Id")] = ModelBase::toJson(xTraceId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool CreateFirewallRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Client-Token"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Client-Token")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXClientToken(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Trace-Id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Trace-Id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXTraceId(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()) + { + CreateFirewallReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateFirewallRequest::getXClientToken() const +{ + return xClientToken_; +} + +void CreateFirewallRequest::setXClientToken(const std::string& value) +{ + xClientToken_ = value; + xClientTokenIsSet_ = true; +} + +bool CreateFirewallRequest::xClientTokenIsSet() const +{ + return xClientTokenIsSet_; +} + +void CreateFirewallRequest::unsetxClientToken() +{ + xClientTokenIsSet_ = false; +} + +std::string CreateFirewallRequest::getXTraceId() const +{ + return xTraceId_; +} + +void CreateFirewallRequest::setXTraceId(const std::string& value) +{ + xTraceId_ = value; + xTraceIdIsSet_ = true; +} + +bool CreateFirewallRequest::xTraceIdIsSet() const +{ + return xTraceIdIsSet_; +} + +void CreateFirewallRequest::unsetxTraceId() +{ + xTraceIdIsSet_ = false; +} + +CreateFirewallReq CreateFirewallRequest::getBody() const +{ + return body_; +} + +void CreateFirewallRequest::setBody(const CreateFirewallReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateFirewallRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateFirewallRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CreateFirewallResponse.cpp b/cfw/src/v1/model/CreateFirewallResponse.cpp new file mode 100644 index 000000000..f1a41adeb --- /dev/null +++ b/cfw/src/v1/model/CreateFirewallResponse.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/CreateFirewallResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CreateFirewallResponse::CreateFirewallResponse() +{ + jobId_ = ""; + jobIdIsSet_ = false; + orderId_ = ""; + orderIdIsSet_ = false; + dataIsSet_ = false; +} + +CreateFirewallResponse::~CreateFirewallResponse() = default; + +void CreateFirewallResponse::validate() +{ +} + +web::json::value CreateFirewallResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + if(orderIdIsSet_) { + val[utility::conversions::to_string_t("order_id")] = ModelBase::toJson(orderId_); + } + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool CreateFirewallResponse::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("order_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("order_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOrderId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + CreateFirewallReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::string CreateFirewallResponse::getJobId() const +{ + return jobId_; +} + +void CreateFirewallResponse::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool CreateFirewallResponse::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void CreateFirewallResponse::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string CreateFirewallResponse::getOrderId() const +{ + return orderId_; +} + +void CreateFirewallResponse::setOrderId(const std::string& value) +{ + orderId_ = value; + orderIdIsSet_ = true; +} + +bool CreateFirewallResponse::orderIdIsSet() const +{ + return orderIdIsSet_; +} + +void CreateFirewallResponse::unsetorderId() +{ + orderIdIsSet_ = false; +} + +CreateFirewallReq CreateFirewallResponse::getData() const +{ + return data_; +} + +void CreateFirewallResponse::setData(const CreateFirewallReq& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool CreateFirewallResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void CreateFirewallResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/DeleteFirewallRequest.cpp b/cfw/src/v1/model/DeleteFirewallRequest.cpp new file mode 100644 index 000000000..fcfce7097 --- /dev/null +++ b/cfw/src/v1/model/DeleteFirewallRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/DeleteFirewallRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +DeleteFirewallRequest::DeleteFirewallRequest() +{ + resourceId_ = ""; + resourceIdIsSet_ = false; +} + +DeleteFirewallRequest::~DeleteFirewallRequest() = default; + +void DeleteFirewallRequest::validate() +{ +} + +web::json::value DeleteFirewallRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(resourceIdIsSet_) { + val[utility::conversions::to_string_t("resource_id")] = ModelBase::toJson(resourceId_); + } + + return val; +} +bool DeleteFirewallRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("resource_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("resource_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setResourceId(refVal); + } + } + return ok; +} + + +std::string DeleteFirewallRequest::getResourceId() const +{ + return resourceId_; +} + +void DeleteFirewallRequest::setResourceId(const std::string& value) +{ + resourceId_ = value; + resourceIdIsSet_ = true; +} + +bool DeleteFirewallRequest::resourceIdIsSet() const +{ + return resourceIdIsSet_; +} + +void DeleteFirewallRequest::unsetresourceId() +{ + resourceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/DeleteFirewallResponse.cpp b/cfw/src/v1/model/DeleteFirewallResponse.cpp new file mode 100644 index 000000000..9d1182dcd --- /dev/null +++ b/cfw/src/v1/model/DeleteFirewallResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/DeleteFirewallResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +DeleteFirewallResponse::DeleteFirewallResponse() +{ + data_ = ""; + dataIsSet_ = false; +} + +DeleteFirewallResponse::~DeleteFirewallResponse() = default; + +void DeleteFirewallResponse::validate() +{ +} + +web::json::value DeleteFirewallResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool DeleteFirewallResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::string DeleteFirewallResponse::getData() const +{ + return data_; +} + +void DeleteFirewallResponse::setData(const std::string& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool DeleteFirewallResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void DeleteFirewallResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ErrorRsp.cpp b/cfw/src/v1/model/ErrorRsp.cpp new file mode 100644 index 000000000..a6a2d10bd --- /dev/null +++ b/cfw/src/v1/model/ErrorRsp.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ErrorRsp.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ErrorRsp::ErrorRsp() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + errorMsg_ = ""; + errorMsgIsSet_ = false; +} + +ErrorRsp::~ErrorRsp() = default; + +void ErrorRsp::validate() +{ +} + +web::json::value ErrorRsp::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("error_code")] = ModelBase::toJson(errorCode_); + } + if(errorMsgIsSet_) { + val[utility::conversions::to_string_t("error_msg")] = ModelBase::toJson(errorMsg_); + } + + return val; +} +bool ErrorRsp::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("error_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_msg"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_msg")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorMsg(refVal); + } + } + return ok; +} + + +std::string ErrorRsp::getErrorCode() const +{ + return errorCode_; +} + +void ErrorRsp::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool ErrorRsp::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void ErrorRsp::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string ErrorRsp::getErrorMsg() const +{ + return errorMsg_; +} + +void ErrorRsp::setErrorMsg(const std::string& value) +{ + errorMsg_ = value; + errorMsgIsSet_ = true; +} + +bool ErrorRsp::errorMsgIsSet() const +{ + return errorMsgIsSet_; +} + +void ErrorRsp::unseterrorMsg() +{ + errorMsgIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListJobRequest.cpp b/cfw/src/v1/model/ListJobRequest.cpp new file mode 100644 index 000000000..582b906da --- /dev/null +++ b/cfw/src/v1/model/ListJobRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/ListJobRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListJobRequest::ListJobRequest() +{ + jobId_ = ""; + jobIdIsSet_ = false; +} + +ListJobRequest::~ListJobRequest() = default; + +void ListJobRequest::validate() +{ +} + +web::json::value ListJobRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool ListJobRequest::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); + } + } + return ok; +} + + +std::string ListJobRequest::getJobId() const +{ + return jobId_; +} + +void ListJobRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ListJobRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ListJobRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListJobResponse.cpp b/cfw/src/v1/model/ListJobResponse.cpp new file mode 100644 index 000000000..2c840ad65 --- /dev/null +++ b/cfw/src/v1/model/ListJobResponse.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/ListJobResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListJobResponse::ListJobResponse() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + errorMsg_ = ""; + errorMsgIsSet_ = false; + dataIsSet_ = false; +} + +ListJobResponse::~ListJobResponse() = default; + +void ListJobResponse::validate() +{ +} + +web::json::value ListJobResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("error_code")] = ModelBase::toJson(errorCode_); + } + if(errorMsgIsSet_) { + val[utility::conversions::to_string_t("error_msg")] = ModelBase::toJson(errorMsg_); + } + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListJobResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("error_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_msg"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_msg")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorMsg(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::string ListJobResponse::getErrorCode() const +{ + return errorCode_; +} + +void ListJobResponse::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool ListJobResponse::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void ListJobResponse::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string ListJobResponse::getErrorMsg() const +{ + return errorMsg_; +} + +void ListJobResponse::setErrorMsg(const std::string& value) +{ + errorMsg_ = value; + errorMsgIsSet_ = true; +} + +bool ListJobResponse::errorMsgIsSet() const +{ + return errorMsgIsSet_; +} + +void ListJobResponse::unseterrorMsg() +{ + errorMsgIsSet_ = false; +} + +Object ListJobResponse::getData() const +{ + return data_; +} + +void ListJobResponse::setData(const Object& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListJobResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListJobResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableClient.h b/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableClient.h index d91167e53..dd1ce5d41 100644 --- a/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableClient.h +++ b/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableClient.h @@ -32,6 +32,11 @@ #include #include +#include +#include +#include +#include + #include #include #include @@ -137,6 +142,20 @@ class HUAWEICLOUD_CLOUDTABLE_V2_EXPORT CloudTableClient : public Client UpdateClusterSettingRequest &request ); + // 创建CloudTable集群 + // + // 创建一个CloudTable集群。 + // 使用接口前,您需要先获取如下资源信息。 + // - 通过VPC创建或查询VPC、子网 + // - 通过安全组创建或查询可用的security_group_id + // + // 本接口是一个同步接口,当创建CloudTable集群成功后会返回集群id。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createCloudTableCluster( + CreateCloudTableClusterRequest &request + ); + private: #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) diff --git a/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableMeta.h b/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableMeta.h index 3650838d3..b4b8e235f 100644 --- a/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableMeta.h +++ b/cloudtable/include/huaweicloud/cloudtable/v2/CloudTableMeta.h @@ -22,6 +22,7 @@ class HUAWEICLOUD_CLOUDTABLE_V2_EXPORT CloudTableMeta { static HttpRequestDef genRequestDefForShowClusterDetail(); static HttpRequestDef genRequestDefForShowClusterSetting(); static HttpRequestDef genRequestDefForUpdateClusterSetting(); + static HttpRequestDef genRequestDefForCreateCloudTableCluster(); }; } diff --git a/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterRequest.h b/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterRequest.h new file mode 100644 index 000000000..d4fcd41c3 --- /dev/null +++ b/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterRequest_H_ +#define HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cloudtable { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CLOUDTABLE_V2_EXPORT CreateCloudTableClusterRequest + : public ModelBase +{ +public: + CreateCloudTableClusterRequest(); + virtual ~CreateCloudTableClusterRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateCloudTableClusterRequest members + + /// + /// 语言类型 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + CreateClusterRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateClusterRequestBody& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + CreateClusterRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateCloudTableClusterRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterRequest_H_ diff --git a/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterResponse.h b/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterResponse.h new file mode 100644 index 000000000..a9c57b6c6 --- /dev/null +++ b/cloudtable/include/huaweicloud/cloudtable/v2/model/CreateCloudTableClusterResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterResponse_H_ +#define HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cloudtable { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CLOUDTABLE_V2_EXPORT CreateCloudTableClusterResponse + : public ModelBase, public HttpResponse +{ +public: + CreateCloudTableClusterResponse(); + virtual ~CreateCloudTableClusterResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateCloudTableClusterResponse members + + /// + /// 集群ID + /// + + std::string getClusterId() const; + bool clusterIdIsSet() const; + void unsetclusterId(); + void setClusterId(const std::string& value); + + +protected: + std::string clusterId_; + bool clusterIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CLOUDTABLE_V2_MODEL_CreateCloudTableClusterResponse_H_ diff --git a/cloudtable/src/v2/CloudTableClient.cpp b/cloudtable/src/v2/CloudTableClient.cpp index 3e436af32..4890be649 100644 --- a/cloudtable/src/v2/CloudTableClient.cpp +++ b/cloudtable/src/v2/CloudTableClient.cpp @@ -391,6 +391,50 @@ std::shared_ptr CloudTableClient::updateClusterSet return localVarResult; } +std::shared_ptr CloudTableClient::createCloudTableCluster(CreateCloudTableClusterRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/clusters"; + + 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("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CloudTableMeta::genRequestDefForCreateCloudTableCluster()); + + 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; +} #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) std::string CloudTableClient::parameterToString(utility::string_t value) { diff --git a/cloudtable/src/v2/CloudTableMeta.cpp b/cloudtable/src/v2/CloudTableMeta.cpp index c234751ff..925a3f0b5 100644 --- a/cloudtable/src/v2/CloudTableMeta.cpp +++ b/cloudtable/src/v2/CloudTableMeta.cpp @@ -122,6 +122,20 @@ HttpRequestDef CloudTableMeta::genRequestDefForUpdateClusterSetting() { return reqDefBuilder; } +HttpRequestDef CloudTableMeta::genRequestDefForCreateCloudTableCluster() { + 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; +} + } } diff --git a/cloudtable/src/v2/model/CreateCloudTableClusterRequest.cpp b/cloudtable/src/v2/model/CreateCloudTableClusterRequest.cpp new file mode 100644 index 000000000..2d4177924 --- /dev/null +++ b/cloudtable/src/v2/model/CreateCloudTableClusterRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cloudtable/v2/model/CreateCloudTableClusterRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cloudtable { +namespace V2 { +namespace Model { + + + + +CreateCloudTableClusterRequest::CreateCloudTableClusterRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +CreateCloudTableClusterRequest::~CreateCloudTableClusterRequest() = default; + +void CreateCloudTableClusterRequest::validate() +{ +} + +web::json::value CreateCloudTableClusterRequest::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 CreateCloudTableClusterRequest::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()) + { + CreateClusterRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateCloudTableClusterRequest::getXLanguage() const +{ + return xLanguage_; +} + +void CreateCloudTableClusterRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool CreateCloudTableClusterRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void CreateCloudTableClusterRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +CreateClusterRequestBody CreateCloudTableClusterRequest::getBody() const +{ + return body_; +} + +void CreateCloudTableClusterRequest::setBody(const CreateClusterRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateCloudTableClusterRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateCloudTableClusterRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cloudtable/src/v2/model/CreateCloudTableClusterResponse.cpp b/cloudtable/src/v2/model/CreateCloudTableClusterResponse.cpp new file mode 100644 index 000000000..57b23ecd6 --- /dev/null +++ b/cloudtable/src/v2/model/CreateCloudTableClusterResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cloudtable/v2/model/CreateCloudTableClusterResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cloudtable { +namespace V2 { +namespace Model { + + + + +CreateCloudTableClusterResponse::CreateCloudTableClusterResponse() +{ + clusterId_ = ""; + clusterIdIsSet_ = false; +} + +CreateCloudTableClusterResponse::~CreateCloudTableClusterResponse() = default; + +void CreateCloudTableClusterResponse::validate() +{ +} + +web::json::value CreateCloudTableClusterResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(clusterIdIsSet_) { + val[utility::conversions::to_string_t("cluster_id")] = ModelBase::toJson(clusterId_); + } + + return val; +} +bool CreateCloudTableClusterResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cluster_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cluster_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setClusterId(refVal); + } + } + return ok; +} + + +std::string CreateCloudTableClusterResponse::getClusterId() const +{ + return clusterId_; +} + +void CreateCloudTableClusterResponse::setClusterId(const std::string& value) +{ + clusterId_ = value; + clusterIdIsSet_ = true; +} + +bool CreateCloudTableClusterResponse::clusterIdIsSet() const +{ + return clusterIdIsSet_; +} + +void CreateCloudTableClusterResponse::unsetclusterId() +{ + clusterIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/dds/include/huaweicloud/dds/v3/DdsRegion.h b/dds/include/huaweicloud/dds/v3/DdsRegion.h index b2d00152c..7ed2741ad 100644 --- a/dds/include/huaweicloud/dds/v3/DdsRegion.h +++ b/dds/include/huaweicloud/dds/v3/DdsRegion.h @@ -98,6 +98,18 @@ class HUAWEICLOUD_DDS_V3_EXPORT DdsRegion { { "https://dds.cn-north-9.myhuaweicloud.com" }); + regions["me-east-1"] = Region("me-east-1", + { + "https://dds.me-east-1.myhuaweicloud.com" + }); + regions["tr-west-1"] = Region("tr-west-1", + { + "https://dds.tr-west-1.myhuaweicloud.com" + }); + regions["ap-southeast-4"] = Region("ap-southeast-4", + { + "https://dds.ap-southeast-4.myhuaweicloud.com" + }); return regions; } private: diff --git a/live/include/huaweicloud/live/v1/LiveClient.h b/live/include/huaweicloud/live/v1/LiveClient.h index 7862ac38a..b5f316877 100644 --- a/live/include/huaweicloud/live/v1/LiveClient.h +++ b/live/include/huaweicloud/live/v1/LiveClient.h @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -24,12 +25,17 @@ #include #include #include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -42,11 +48,21 @@ #include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include @@ -60,6 +76,8 @@ #include #include #include +#include +#include #include #include #include @@ -70,6 +88,8 @@ #include #include #include +#include +#include #include #include #include @@ -78,12 +98,22 @@ #include #include #include +#include +#include #include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -206,6 +236,14 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr createTranscodingsTemplate( CreateTranscodingsTemplateRequest &request ); + // 生成URL鉴权串 + // + // 生成URL鉴权串 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createUrlAuthchain( + CreateUrlAuthchainRequest &request + ); // 删除直播域名 // // 删除域名。只有在域名停用(off)状态时才能删除。 @@ -230,6 +268,14 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr deleteDomainMapping( DeleteDomainMappingRequest &request ); + // 删除直播推流通知配置 + // + // 删除直播推流通知配置 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deletePublishTemplate( + DeletePublishTemplateRequest &request + ); // 删除录制回调配置 // // 删除录制回调配置接口 @@ -270,6 +316,33 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr deleteTranscodingsTemplate( DeleteTranscodingsTemplateRequest &request ); + // 查询播放域名延时配置 + // + // 查询播放域名延时配置。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDelayConfig( + ListDelayConfigRequest &request + ); + // 获取地域限制配置列表 + // + // 查询播放域名的地域限制列表。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listGeoBlockingConfig( + ListGeoBlockingConfigRequest &request + ); + // 查询IP黑/白名单 + // + // 查询推流/播放域名的IP黑/白名单。 + // - 黑名单模式:禁止指定的IP或网段 + // - 白名单模式:仅允许指定的IP或网段 + // - 默认:全放通。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listIpAuthList( + ListIpAuthListRequest &request + ); // 获取直播播放日志 // // 获取直播播放日志,基于域名以5分钟粒度进行打包,日志内容以 \"|\" 进行分隔。 @@ -286,6 +359,14 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr listLiveStreamsOnline( ListLiveStreamsOnlineRequest &request ); + // 查询直播推流通知配置 + // + // 查询直播推流通知配置 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listPublishTemplate( + ListPublishTemplateRequest &request + ); // 查询录制回调配置列表 // // 查询录制回调配置列表接口。通过指定条件,查询满足条件的配置列表。 @@ -350,6 +431,14 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr showDomainKeyChain( ShowDomainKeyChainRequest &request ); + // 查询直播拉流回源配置 + // + // 查询直播拉流回源配置。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showPullSourcesConfig( + ShowPullSourcesConfigRequest &request + ); // 查询录制回调配置 // // 查询录制回调配置接口 @@ -374,6 +463,14 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr showTranscodingsTemplate( ShowTranscodingsTemplateRequest &request ); + // 修改播放域名延时配置 + // + // 修改播放域名延时配置。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateDelayConfig( + UpdateDelayConfigRequest &request + ); // 修改直播域名 // // 修改直播播放、RTMP推流加速域名相关信息 @@ -398,6 +495,41 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveClient : public Client std::shared_ptr updateDomainKeyChain( UpdateDomainKeyChainRequest &request ); + // 修改地域限制配置 + // + // 修改播放域名的地域限制,选中地域允许接入。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateGeoBlockingConfig( + UpdateGeoBlockingConfigRequest &request + ); + // 修改IP黑/白名单 + // + // 修改推流/播放域名的IP黑/白名单,当前仅支持ipv4。 + // - 黑名单模式:禁止指定的IP或网段 + // - 白名单模式:仅允许指定的IP或网段 + // - 默认:全放通。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateIpAuthList( + UpdateIpAuthListRequest &request + ); + // 新增、覆盖直播推流通知配置 + // + // 新增、覆盖直播推流通知配置 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updatePublishTemplate( + UpdatePublishTemplateRequest &request + ); + // 修改直播拉流回源配置 + // + // 修改直播拉流回源配置。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updatePullSourcesConfig( + UpdatePullSourcesConfigRequest &request + ); // 修改录制回调配置 // // 修改录制回调配置接口 diff --git a/live/include/huaweicloud/live/v1/LiveMeta.h b/live/include/huaweicloud/live/v1/LiveMeta.h index f74a4717e..f65ddeaf7 100644 --- a/live/include/huaweicloud/live/v1/LiveMeta.h +++ b/live/include/huaweicloud/live/v1/LiveMeta.h @@ -22,16 +22,22 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveMeta { static HttpRequestDef genRequestDefForCreateSnapshotConfig(); static HttpRequestDef genRequestDefForCreateStreamForbidden(); static HttpRequestDef genRequestDefForCreateTranscodingsTemplate(); + static HttpRequestDef genRequestDefForCreateUrlAuthchain(); static HttpRequestDef genRequestDefForDeleteDomain(); static HttpRequestDef genRequestDefForDeleteDomainKeyChain(); static HttpRequestDef genRequestDefForDeleteDomainMapping(); + static HttpRequestDef genRequestDefForDeletePublishTemplate(); static HttpRequestDef genRequestDefForDeleteRecordCallbackConfig(); static HttpRequestDef genRequestDefForDeleteRecordRule(); static HttpRequestDef genRequestDefForDeleteSnapshotConfig(); static HttpRequestDef genRequestDefForDeleteStreamForbidden(); static HttpRequestDef genRequestDefForDeleteTranscodingsTemplate(); + static HttpRequestDef genRequestDefForListDelayConfig(); + static HttpRequestDef genRequestDefForListGeoBlockingConfig(); + static HttpRequestDef genRequestDefForListIpAuthList(); static HttpRequestDef genRequestDefForListLiveSampleLogs(); static HttpRequestDef genRequestDefForListLiveStreamsOnline(); + static HttpRequestDef genRequestDefForListPublishTemplate(); static HttpRequestDef genRequestDefForListRecordCallbackConfigs(); static HttpRequestDef genRequestDefForListRecordContents(); static HttpRequestDef genRequestDefForListRecordRules(); @@ -40,12 +46,18 @@ class HUAWEICLOUD_LIVE_V1_EXPORT LiveMeta { static HttpRequestDef genRequestDefForRunRecord(); static HttpRequestDef genRequestDefForShowDomain(); static HttpRequestDef genRequestDefForShowDomainKeyChain(); + static HttpRequestDef genRequestDefForShowPullSourcesConfig(); static HttpRequestDef genRequestDefForShowRecordCallbackConfig(); static HttpRequestDef genRequestDefForShowRecordRule(); static HttpRequestDef genRequestDefForShowTranscodingsTemplate(); + static HttpRequestDef genRequestDefForUpdateDelayConfig(); static HttpRequestDef genRequestDefForUpdateDomain(); static HttpRequestDef genRequestDefForUpdateDomainIp6Switch(); static HttpRequestDef genRequestDefForUpdateDomainKeyChain(); + static HttpRequestDef genRequestDefForUpdateGeoBlockingConfig(); + static HttpRequestDef genRequestDefForUpdateIpAuthList(); + static HttpRequestDef genRequestDefForUpdatePublishTemplate(); + static HttpRequestDef genRequestDefForUpdatePullSourcesConfig(); static HttpRequestDef genRequestDefForUpdateRecordCallbackConfig(); static HttpRequestDef genRequestDefForUpdateRecordRule(); static HttpRequestDef genRequestDefForUpdateSnapshotConfig(); diff --git a/live/include/huaweicloud/live/v1/model/CallbackUrl.h b/live/include/huaweicloud/live/v1/model/CallbackUrl.h new file mode 100644 index 000000000..c41420e43 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/CallbackUrl.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_CallbackUrl_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_CallbackUrl_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT CallbackUrl + : public ModelBase +{ +public: + CallbackUrl(); + virtual ~CallbackUrl(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CallbackUrl members + + /// + /// 回调地址 + /// + + std::string getUrl() const; + bool urlIsSet() const; + void unseturl(); + void setUrl(const std::string& value); + + /// + /// 鉴权密钥 + /// + + std::string getAuthSignKey() const; + bool authSignKeyIsSet() const; + void unsetauthSignKey(); + void setAuthSignKey(const std::string& value); + + /// + /// 接收回调通知服务器所在区域。 包含如下取值: - mainland_china:中国大陆区域。 - outside_mainland_china:中国大陆以外区域。 + /// + + std::string getCallBackArea() const; + bool callBackAreaIsSet() const; + void unsetcallBackArea(); + void setCallBackArea(const std::string& value); + + +protected: + std::string url_; + bool urlIsSet_; + std::string authSignKey_; + bool authSignKeyIsSet_; + std::string callBackArea_; + bool callBackAreaIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_CallbackUrl_H_ diff --git a/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainReq.h b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainReq.h new file mode 100644 index 000000000..5c7c33fb2 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainReq.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainReq_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainReq_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT CreateUrlAuthchainReq + : public ModelBase +{ +public: + CreateUrlAuthchainReq(); + virtual ~CreateUrlAuthchainReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateUrlAuthchainReq members + + /// + /// 播放域名或推流域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + /// + /// 域名类型 + /// + + std::string getDomainType() const; + bool domainTypeIsSet() const; + void unsetdomainType(); + void setDomainType(const std::string& value); + + /// + /// 流名称,与推流或播放地址中的StreamName一致。 + /// + + std::string getStream() const; + bool streamIsSet() const; + void unsetstream(); + void setStream(const std::string& value); + + /// + /// 应用名称,与推流或播放地址中的AppName一致。 + /// + + std::string getApp() const; + bool appIsSet() const; + void unsetapp(); + void setApp(const std::string& value); + + /// + /// 鉴权方式C必选。 检查级别。LiveID由AppName和StreamName组成,即\"<app_name>/<stream_name>\"。 包含如下取值: - 3:只检查LiveID是否匹配,不检查鉴权URL是否过期。 - 5:检查LiveID是否匹配,Timestamp是否超时。 + /// + + int32_t getCheckLevel() const; + bool checkLevelIsSet() const; + void unsetcheckLevel(); + void setCheckLevel(int32_t value); + + /// + /// 用户定义的有效访问时间起始点;例如:2006-01-02T15:04:05Z07:00 不传或为空表示当前时间 + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + std::string domainType_; + bool domainTypeIsSet_; + std::string stream_; + bool streamIsSet_; + std::string app_; + bool appIsSet_; + int32_t checkLevel_; + bool checkLevelIsSet_; + std::string startTime_; + bool startTimeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainReq_H_ diff --git a/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainRequest.h b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainRequest.h new file mode 100644 index 000000000..663cd4405 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT CreateUrlAuthchainRequest + : public ModelBase +{ +public: + CreateUrlAuthchainRequest(); + virtual ~CreateUrlAuthchainRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateUrlAuthchainRequest members + + /// + /// + /// + + CreateUrlAuthchainReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateUrlAuthchainReq& value); + + +protected: + CreateUrlAuthchainReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateUrlAuthchainRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainResponse.h b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainResponse.h new file mode 100644 index 000000000..09bbac682 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/CreateUrlAuthchainResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT CreateUrlAuthchainResponse + : public ModelBase, public HttpResponse +{ +public: + CreateUrlAuthchainResponse(); + virtual ~CreateUrlAuthchainResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateUrlAuthchainResponse members + + /// + /// 生成的鉴权串列表 + /// + + std::vector& getKeychain(); + bool keychainIsSet() const; + void unsetkeychain(); + void setKeychain(const std::vector& value); + + +protected: + std::vector keychain_; + bool keychainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_CreateUrlAuthchainResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/DelayConfig.h b/live/include/huaweicloud/live/v1/model/DelayConfig.h new file mode 100644 index 000000000..378b31aca --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/DelayConfig.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_DelayConfig_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_DelayConfig_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT DelayConfig + : public ModelBase +{ +public: + DelayConfig(); + virtual ~DelayConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DelayConfig members + + /// + /// 应用名,默认为live + /// + + std::string getApp() const; + bool appIsSet() const; + void unsetapp(); + void setApp(const std::string& value); + + /// + /// 延时时间,单位:ms。 包含如下取值: - 2000(低)。 - 4000(中)。 - 6000(高)。 + /// + + int32_t getDelay() const; + bool delayIsSet() const; + void unsetdelay(); + void setDelay(int32_t value); + + +protected: + std::string app_; + bool appIsSet_; + int32_t delay_; + bool delayIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_DelayConfig_H_ diff --git a/live/include/huaweicloud/live/v1/model/DeletePublishTemplateRequest.h b/live/include/huaweicloud/live/v1/model/DeletePublishTemplateRequest.h new file mode 100644 index 000000000..36a9cff81 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/DeletePublishTemplateRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT DeletePublishTemplateRequest + : public ModelBase +{ +public: + DeletePublishTemplateRequest(); + virtual ~DeletePublishTemplateRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeletePublishTemplateRequest members + + /// + /// 推流域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeletePublishTemplateRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/DeletePublishTemplateResponse.h b/live/include/huaweicloud/live/v1/model/DeletePublishTemplateResponse.h new file mode 100644 index 000000000..67364b538 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/DeletePublishTemplateResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT DeletePublishTemplateResponse + : public ModelBase, public HttpResponse +{ +public: + DeletePublishTemplateResponse(); + virtual ~DeletePublishTemplateResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeletePublishTemplateResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_DeletePublishTemplateResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/GeoBlockingConfigInfo.h b/live/include/huaweicloud/live/v1/model/GeoBlockingConfigInfo.h new file mode 100644 index 000000000..59097e4de --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/GeoBlockingConfigInfo.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_GeoBlockingConfigInfo_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_GeoBlockingConfigInfo_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT GeoBlockingConfigInfo + : public ModelBase +{ +public: + GeoBlockingConfigInfo(); + virtual ~GeoBlockingConfigInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// GeoBlockingConfigInfo members + + /// + /// 应用名 + /// + + std::string getApp() const; + bool appIsSet() const; + void unsetapp(); + void setApp(const std::string& value); + + /// + /// 限制区域列表, 空列表表示不限制。 除中国以外,其他地区代码,2位字母大写。代码格式参阅[ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#search/code/) 包含如下部分取值: - CN-IN:中国大陆 - CN-HK:中国香港 - CN-MO:中国澳门 - CN-TW:中国台湾 - BR:巴西 + /// + + std::vector& getAreaWhitelist(); + bool areaWhitelistIsSet() const; + void unsetareaWhitelist(); + void setAreaWhitelist(const std::vector& value); + + +protected: + std::string app_; + bool appIsSet_; + std::vector areaWhitelist_; + bool areaWhitelistIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_GeoBlockingConfigInfo_H_ diff --git a/live/include/huaweicloud/live/v1/model/IPAuthInfo.h b/live/include/huaweicloud/live/v1/model/IPAuthInfo.h new file mode 100644 index 000000000..b602c057e --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/IPAuthInfo.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_IPAuthInfo_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_IPAuthInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT IPAuthInfo + : public ModelBase +{ +public: + IPAuthInfo(); + virtual ~IPAuthInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IPAuthInfo members + + /// + /// 推流域名或播放域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + /// + /// 鉴权类型。 包含如下取值: - WHITE:IP白名单鉴权。 - BLACK:IP黑名单鉴权。 - NONE:不鉴权。 + /// + + std::string getAuthType() const; + bool authTypeIsSet() const; + void unsetauthType(); + void setAuthType(const std::string& value); + + /// + /// IP黑名单列表,IP之间用;分隔,如192.168.0.0;192.168.0.8,最多支持配置100个IP。支持IP网段添加,例如127.0.0.1/24表示采用子网掩码中的前24位为有效位,即用32-24=8bit来表示主机号,该子网可以容纳2^8 - 2 = 254 台主机。故127.0.0.1/24 表示IP网段范围是:127.0.0.1~127.0.0.255 + /// + + std::string getIpAuthList() const; + bool ipAuthListIsSet() const; + void unsetipAuthList(); + void setIpAuthList(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + std::string authType_; + bool authTypeIsSet_; + std::string ipAuthList_; + bool ipAuthListIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_IPAuthInfo_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListDelayConfigRequest.h b/live/include/huaweicloud/live/v1/model/ListDelayConfigRequest.h new file mode 100644 index 000000000..882d52975 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListDelayConfigRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListDelayConfigRequest + : public ModelBase +{ +public: + ListDelayConfigRequest(); + virtual ~ListDelayConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDelayConfigRequest members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDelayConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListDelayConfigResponse.h b/live/include/huaweicloud/live/v1/model/ListDelayConfigResponse.h new file mode 100644 index 000000000..986eb61c5 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListDelayConfigResponse.h @@ -0,0 +1,80 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListDelayConfigResponse + : public ModelBase, public HttpResponse +{ +public: + ListDelayConfigResponse(); + virtual ~ListDelayConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDelayConfigResponse members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// 直播延时配置 + /// + + std::vector& getDelayConfig(); + bool delayConfigIsSet() const; + void unsetdelayConfig(); + void setDelayConfig(const std::vector& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + std::vector delayConfig_; + bool delayConfigIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListDelayConfigResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigRequest.h b/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigRequest.h new file mode 100644 index 000000000..30ae61422 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListGeoBlockingConfigRequest + : public ModelBase +{ +public: + ListGeoBlockingConfigRequest(); + virtual ~ListGeoBlockingConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListGeoBlockingConfigRequest members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListGeoBlockingConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigResponse.h b/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigResponse.h new file mode 100644 index 000000000..401c66d56 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListGeoBlockingConfigResponse.h @@ -0,0 +1,91 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListGeoBlockingConfigResponse + : public ModelBase, public HttpResponse +{ +public: + ListGeoBlockingConfigResponse(); + virtual ~ListGeoBlockingConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListGeoBlockingConfigResponse members + + /// + /// 直播播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// 应用列表 + /// + + std::vector& getApps(); + bool appsIsSet() const; + void unsetapps(); + void setApps(const std::vector& value); + + /// + /// + /// + + std::string getXRequestId() const; + bool xRequestIdIsSet() const; + void unsetxRequestId(); + void setXRequestId(const std::string& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + std::vector apps_; + bool appsIsSet_; + std::string xRequestId_; + bool xRequestIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListGeoBlockingConfigResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListIpAuthListRequest.h b/live/include/huaweicloud/live/v1/model/ListIpAuthListRequest.h new file mode 100644 index 000000000..284038daa --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListIpAuthListRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListIpAuthListRequest + : public ModelBase +{ +public: + ListIpAuthListRequest(); + virtual ~ListIpAuthListRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpAuthListRequest members + + /// + /// 推流域名或播放域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListIpAuthListRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListIpAuthListResponse.h b/live/include/huaweicloud/live/v1/model/ListIpAuthListResponse.h new file mode 100644 index 000000000..9173a402b --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListIpAuthListResponse.h @@ -0,0 +1,100 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListIpAuthListResponse + : public ModelBase, public HttpResponse +{ +public: + ListIpAuthListResponse(); + virtual ~ListIpAuthListResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpAuthListResponse members + + /// + /// 推流域名或播放域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + /// + /// 鉴权类型。 包含如下取值: - WHITE:IP白名单鉴权。 - BLACK:IP黑名单鉴权。 - NONE:不鉴权。 + /// + + std::string getAuthType() const; + bool authTypeIsSet() const; + void unsetauthType(); + void setAuthType(const std::string& value); + + /// + /// IP黑名单列表,IP之间用;分隔,如192.168.0.0;192.168.0.8,最多支持配置100个IP。支持IP网段添加,例如127.0.0.1/24表示采用子网掩码中的前24位为有效位,即用32-24=8bit来表示主机号,该子网可以容纳2^8 - 2 = 254 台主机。故127.0.0.1/24 表示IP网段范围是:127.0.0.1~127.0.0.255 + /// + + std::string getIpAuthList() const; + bool ipAuthListIsSet() const; + void unsetipAuthList(); + void setIpAuthList(const std::string& value); + + /// + /// + /// + + std::string getXRequestId() const; + bool xRequestIdIsSet() const; + void unsetxRequestId(); + void setXRequestId(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + std::string authType_; + bool authTypeIsSet_; + std::string ipAuthList_; + bool ipAuthListIsSet_; + std::string xRequestId_; + bool xRequestIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListIpAuthListResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListPublishTemplateRequest.h b/live/include/huaweicloud/live/v1/model/ListPublishTemplateRequest.h new file mode 100644 index 000000000..ce8403f5f --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListPublishTemplateRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListPublishTemplateRequest + : public ModelBase +{ +public: + ListPublishTemplateRequest(); + virtual ~ListPublishTemplateRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListPublishTemplateRequest members + + /// + /// 推流域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + +protected: + std::string domain_; + bool domainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListPublishTemplateRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListPublishTemplateResponse.h b/live/include/huaweicloud/live/v1/model/ListPublishTemplateResponse.h new file mode 100644 index 000000000..f6faabc6e --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ListPublishTemplateResponse.h @@ -0,0 +1,89 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ListPublishTemplateResponse + : public ModelBase, public HttpResponse +{ +public: + ListPublishTemplateResponse(); + virtual ~ListPublishTemplateResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListPublishTemplateResponse members + + /// + /// 回调地址 + /// + + std::string getUrl() const; + bool urlIsSet() const; + void unseturl(); + void setUrl(const std::string& value); + + /// + /// 鉴权密钥 + /// + + std::string getAuthSignKey() const; + bool authSignKeyIsSet() const; + void unsetauthSignKey(); + void setAuthSignKey(const std::string& value); + + /// + /// 接收回调通知服务器所在区域。 包含如下取值: - mainland_china:中国大陆区域。 - outside_mainland_china:中国大陆以外区域。 + /// + + std::string getCallBackArea() const; + bool callBackAreaIsSet() const; + void unsetcallBackArea(); + void setCallBackArea(const std::string& value); + + +protected: + std::string url_; + bool urlIsSet_; + std::string authSignKey_; + bool authSignKeyIsSet_; + std::string callBackArea_; + bool callBackAreaIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ListPublishTemplateResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/ListRecordContentsRequest.h b/live/include/huaweicloud/live/v1/model/ListRecordContentsRequest.h index 38fa1ed25..c972789f6 100644 --- a/live/include/huaweicloud/live/v1/model/ListRecordContentsRequest.h +++ b/live/include/huaweicloud/live/v1/model/ListRecordContentsRequest.h @@ -39,7 +39,7 @@ class HUAWEICLOUD_LIVE_V1_EXPORT ListRecordContentsRequest /// ListRecordContentsRequest members /// - /// 直播推流放域名 + /// 直播推流域名 /// std::string getPublishDomain() const; @@ -66,7 +66,7 @@ class HUAWEICLOUD_LIVE_V1_EXPORT ListRecordContentsRequest void setStream(const std::string& value); /// - /// 录制类型,包括:CONTINUOUS_RECORD,COMMAND_RECORD,PLAN_RECORD,ON_DEMAND_RECORD。默认CONTINUOUS_RECORD。 - CONTINUOUS_RECORD:持续录制,在该规则类型配置后,只要有流到推送到录制系统,就触发录制。 - COMMAND_RECORD:命令录制,在该规则类型配置后,在流推送到录制系统后,租户需要通过命令控制该流的录制开始和结束。 - PLAN_RECORD:计划录制,在该规则类型配置后,推的流如果在计划录制的时间区间则触发录制。 - ON_DEMAND_RECORD:按需录制,在该规则类型配置后,录制系统收到推流后,需要调用租户提供的接口查询录制规则,并根据规则录制。 + /// 录制类型,包括:CONTINUOUS_RECORD,COMMAND_RECORD。默认CONTINUOUS_RECORD。 - CONTINUOUS_RECORD:持续录制,在该规则类型配置后,只要有流到推送到录制系统,就触发录制。 - COMMAND_RECORD:命令录制,在该规则类型配置后,在流推送到录制系统后,租户需要通过命令控制该流的录制开始和结束。 /// std::string getRecordType() const; diff --git a/live/include/huaweicloud/live/v1/model/ModifyDelayConfig.h b/live/include/huaweicloud/live/v1/model/ModifyDelayConfig.h new file mode 100644 index 000000000..265bcd1cb --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ModifyDelayConfig.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyDelayConfig_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyDelayConfig_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ModifyDelayConfig + : public ModelBase +{ +public: + ModifyDelayConfig(); + virtual ~ModifyDelayConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyDelayConfig members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// 应用名称,默认为live + /// + + std::string getApp() const; + bool appIsSet() const; + void unsetapp(); + void setApp(const std::string& value); + + /// + /// 延时时间,单位:ms。 包含如下取值: - 2000(低)。 - 4000(中)。 - 6000(高)。 + /// + + int32_t getDelay() const; + bool delayIsSet() const; + void unsetdelay(); + void setDelay(int32_t value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + std::string app_; + bool appIsSet_; + int32_t delay_; + bool delayIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyDelayConfig_H_ diff --git a/live/include/huaweicloud/live/v1/model/ModifyPullSourcesConfig.h b/live/include/huaweicloud/live/v1/model/ModifyPullSourcesConfig.h new file mode 100644 index 000000000..4da6ea914 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ModifyPullSourcesConfig.h @@ -0,0 +1,121 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyPullSourcesConfig_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyPullSourcesConfig_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ModifyPullSourcesConfig + : public ModelBase +{ +public: + ModifyPullSourcesConfig(); + virtual ~ModifyPullSourcesConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyPullSourcesConfig members + + /// + /// 直播播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// 回源方式。 包含如下取值: - domain: 回源客户源站,源站地址是域名格式。回源域名,可配置多个,如果回源失败,将按照配置顺序进行轮循。 - ipaddr: 回源客户源站,源站地址是IP格式。回源IP,可配置多个,如果回源失败,将按照配置顺序进行轮循。同时,最多可以配置一个回源域名,如果配置,回源时httpflv HOST头填该域名,RTMP tcurl字段填该域名,否则按当前IP作为HOST。 - huawei: 回源华为源站,域名创建后的默认值。 + /// + + std::string getSourceType() const; + bool sourceTypeIsSet() const; + void unsetsourceType(); + void setSourceType(const std::string& value); + + /// + /// 回源域名列表,最多可配置10个。 - 当回源方式是“domain”时,此参数必选,域名配置多个时,如果回源失败,将按照配置顺序进行轮循。 - 当回源方式是“ipaddr”时,最多可以配置一个回源域名,如果配置,回源时httpflv HOST头填该域名,RTMP tcurl 字段填该域名,否则按当前IP作为HOST。 + /// + + std::vector& getSources(); + bool sourcesIsSet() const; + void unsetsources(); + void setSources(const std::vector& value); + + /// + /// 回源IP地址列表,最多可配置10个。当回源方式是“ipaddr”时,此参数必选,IP配置多个时,如果回源失败,将按照配置顺序进行轮循。 + /// + + std::vector& getSourcesIp(); + bool sourcesIpIsSet() const; + void unsetsourcesIp(); + void setSourcesIp(const std::vector& value); + + /// + /// 回源协议,回源方式非“huawei”时必选。 包含如下取值: - http - rtmp + /// + + std::string getScheme() const; + bool schemeIsSet() const; + void unsetscheme(); + void setScheme(const std::string& value); + + /// + /// 回源客户源站时在URL携带的参数。 + /// + + std::map& getAdditionalArgs(); + bool additionalArgsIsSet() const; + void unsetadditionalArgs(); + void setAdditionalArgs(const std::map& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + std::string sourceType_; + bool sourceTypeIsSet_; + std::vector sources_; + bool sourcesIsSet_; + std::vector sourcesIp_; + bool sourcesIpIsSet_; + std::string scheme_; + bool schemeIsSet_; + std::map additionalArgs_; + bool additionalArgsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ModifyPullSourcesConfig_H_ diff --git a/live/include/huaweicloud/live/v1/model/RecordContentInfoV2.h b/live/include/huaweicloud/live/v1/model/RecordContentInfoV2.h index 51b4c4f80..392385228 100644 --- a/live/include/huaweicloud/live/v1/model/RecordContentInfoV2.h +++ b/live/include/huaweicloud/live/v1/model/RecordContentInfoV2.h @@ -87,7 +87,7 @@ class HUAWEICLOUD_LIVE_V1_EXPORT RecordContentInfoV2 void setRecordFormat(const std::string& value); /// - /// 录制类型,CONTINUOUS_RECORD,COMMAND_RECORD,PLAN_RECORD, ON_DEMAND_RECORD。默认CONTINUOUS_RECORD。 - CONTINUOUS_RECORD:持续录制,在该规则类型配置后,只要有流到推送到录制系统,就触发录制。 - COMMAND_RECORD:命令录制,在该规则类型配置后,在流推送到录制系统后,租户需要通过命令控制该流的录制开始和结束。 - PLAN_RECORD:计划录制,在该规则类型配置后,推的流如果在计划录制的时间区间则触发录制。 - ON_DEMAND_RECORD:按需录制,在该规则类型配置后,录制系统收到推流后,需要调用租户提供的接口查询录制规则,并根据规则录制。 + /// 录制类型,CONTINUOUS_RECORD,COMMAND_RECORD。默认CONTINUOUS_RECORD。 - CONTINUOUS_RECORD:持续录制,在该规则类型配置后,只要有流到推送到录制系统,就触发录制。 - COMMAND_RECORD:命令录制,在该规则类型配置后,在流推送到录制系统后,租户需要通过命令控制该流的录制开始和结束。 /// std::string getRecordType() const; diff --git a/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigRequest.h b/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigRequest.h new file mode 100644 index 000000000..84bcbdaa1 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ShowPullSourcesConfigRequest + : public ModelBase +{ +public: + ShowPullSourcesConfigRequest(); + virtual ~ShowPullSourcesConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowPullSourcesConfigRequest members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowPullSourcesConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigResponse.h b/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigResponse.h new file mode 100644 index 000000000..79330fc76 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/ShowPullSourcesConfigResponse.h @@ -0,0 +1,124 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT ShowPullSourcesConfigResponse + : public ModelBase, public HttpResponse +{ +public: + ShowPullSourcesConfigResponse(); + virtual ~ShowPullSourcesConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowPullSourcesConfigResponse members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// 回源方式。 - domain: 回源客户源站,源站地址是域名格式。回源域名,可配置多个,如果回源失败,将按照配置顺序进行轮循。 - ipaddr: 回源客户源站,源站地址是IP格式。回源IP,可配置多个,如果回源失败,将按照配置顺序进行轮循。同时,最多可以配置一个回源域名,如果配置,回源时httpflv HOST头填该域名,RTMP tcurl字段填该域名,否则按当前IP作为HOST。 - huawei: 回源华为源站,域名创建后的默认值。 + /// + + std::string getSourceType() const; + bool sourceTypeIsSet() const; + void unsetsourceType(); + void setSourceType(const std::string& value); + + /// + /// 回源域名列表,最多可配置10个。 - 当回源方式是“domain”时,此参数必选,域名配置多个时,如果回源失败,将按照配置顺序进行轮循。 - 当回源方式是“ipaddr”时,最多可以配置一个回源域名,如果配置,回源时httpflv HOST头填该域名,RTMP tcurl 字段填该域名,否则按当前IP作为HOST。 + /// + + std::vector& getSources(); + bool sourcesIsSet() const; + void unsetsources(); + void setSources(const std::vector& value); + + /// + /// 回源IP地址列表,最多可配置10个。当回源方式是“ipaddr”时,此参数必选,IP配置多个时,如果回源失败,将按照配置顺序进行轮循。 + /// + + std::vector& getSourcesIp(); + bool sourcesIpIsSet() const; + void unsetsourcesIp(); + void setSourcesIp(const std::vector& value); + + /// + /// 回源协议,回源方式非“huawei”时必选。 + /// + + std::string getScheme() const; + bool schemeIsSet() const; + void unsetscheme(); + void setScheme(const std::string& value); + + /// + /// 回源客户源站时在URL携带的参数。 + /// + + std::map& getAdditionalArgs(); + bool additionalArgsIsSet() const; + void unsetadditionalArgs(); + void setAdditionalArgs(const std::map& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + std::string sourceType_; + bool sourceTypeIsSet_; + std::vector sources_; + bool sourcesIsSet_; + std::vector sourcesIp_; + bool sourcesIpIsSet_; + std::string scheme_; + bool schemeIsSet_; + std::map additionalArgs_; + bool additionalArgsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_ShowPullSourcesConfigResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateDelayConfigRequest.h b/live/include/huaweicloud/live/v1/model/UpdateDelayConfigRequest.h new file mode 100644 index 000000000..f887d30ee --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateDelayConfigRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateDelayConfigRequest + : public ModelBase +{ +public: + UpdateDelayConfigRequest(); + virtual ~UpdateDelayConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateDelayConfigRequest members + + /// + /// + /// + + ModifyDelayConfig getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ModifyDelayConfig& value); + + +protected: + ModifyDelayConfig body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateDelayConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateDelayConfigResponse.h b/live/include/huaweicloud/live/v1/model/UpdateDelayConfigResponse.h new file mode 100644 index 000000000..b1adaa549 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateDelayConfigResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateDelayConfigResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateDelayConfigResponse(); + virtual ~UpdateDelayConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateDelayConfigResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateDelayConfigResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigRequest.h b/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigRequest.h new file mode 100644 index 000000000..f6f170dec --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateGeoBlockingConfigRequest + : public ModelBase +{ +public: + UpdateGeoBlockingConfigRequest(); + virtual ~UpdateGeoBlockingConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateGeoBlockingConfigRequest members + + /// + /// 播放域名 + /// + + std::string getPlayDomain() const; + bool playDomainIsSet() const; + void unsetplayDomain(); + void setPlayDomain(const std::string& value); + + /// + /// + /// + + GeoBlockingConfigInfo getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const GeoBlockingConfigInfo& value); + + +protected: + std::string playDomain_; + bool playDomainIsSet_; + GeoBlockingConfigInfo body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateGeoBlockingConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigResponse.h b/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigResponse.h new file mode 100644 index 000000000..c7b850f3b --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateGeoBlockingConfigResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateGeoBlockingConfigResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateGeoBlockingConfigResponse(); + virtual ~UpdateGeoBlockingConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateGeoBlockingConfigResponse members + + /// + /// + /// + + std::string getXRequestId() const; + bool xRequestIdIsSet() const; + void unsetxRequestId(); + void setXRequestId(const std::string& value); + + +protected: + std::string xRequestId_; + bool xRequestIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateGeoBlockingConfigResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateIpAuthListRequest.h b/live/include/huaweicloud/live/v1/model/UpdateIpAuthListRequest.h new file mode 100644 index 000000000..70bea21f5 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateIpAuthListRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateIpAuthListRequest + : public ModelBase +{ +public: + UpdateIpAuthListRequest(); + virtual ~UpdateIpAuthListRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateIpAuthListRequest members + + /// + /// + /// + + IPAuthInfo getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const IPAuthInfo& value); + + +protected: + IPAuthInfo body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateIpAuthListRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdateIpAuthListResponse.h b/live/include/huaweicloud/live/v1/model/UpdateIpAuthListResponse.h new file mode 100644 index 000000000..d2ebec97a --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdateIpAuthListResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdateIpAuthListResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateIpAuthListResponse(); + virtual ~UpdateIpAuthListResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateIpAuthListResponse members + + /// + /// + /// + + std::string getXRequestId() const; + bool xRequestIdIsSet() const; + void unsetxRequestId(); + void setXRequestId(const std::string& value); + + +protected: + std::string xRequestId_; + bool xRequestIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdateIpAuthListResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateRequest.h b/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateRequest.h new file mode 100644 index 000000000..35f6141e4 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdatePublishTemplateRequest + : public ModelBase +{ +public: + UpdatePublishTemplateRequest(); + virtual ~UpdatePublishTemplateRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdatePublishTemplateRequest members + + /// + /// 推流域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + /// + /// + /// + + CallbackUrl getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CallbackUrl& value); + + +protected: + std::string domain_; + bool domainIsSet_; + CallbackUrl body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdatePublishTemplateRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateResponse.h b/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateResponse.h new file mode 100644 index 000000000..acd8e0c13 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdatePublishTemplateResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdatePublishTemplateResponse + : public ModelBase, public HttpResponse +{ +public: + UpdatePublishTemplateResponse(); + virtual ~UpdatePublishTemplateResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdatePublishTemplateResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePublishTemplateResponse_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigRequest.h b/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigRequest.h new file mode 100644 index 000000000..5ac614c6c --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigRequest_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdatePullSourcesConfigRequest + : public ModelBase +{ +public: + UpdatePullSourcesConfigRequest(); + virtual ~UpdatePullSourcesConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdatePullSourcesConfigRequest members + + /// + /// + /// + + ModifyPullSourcesConfig getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ModifyPullSourcesConfig& value); + + +protected: + ModifyPullSourcesConfig body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdatePullSourcesConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigRequest_H_ diff --git a/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigResponse.h b/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigResponse.h new file mode 100644 index 000000000..a922c88cb --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/UpdatePullSourcesConfigResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigResponse_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LIVE_V1_EXPORT UpdatePullSourcesConfigResponse + : public ModelBase, public HttpResponse +{ +public: + UpdatePullSourcesConfigResponse(); + virtual ~UpdatePullSourcesConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdatePullSourcesConfigResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_UpdatePullSourcesConfigResponse_H_ diff --git a/live/src/v1/LiveClient.cpp b/live/src/v1/LiveClient.cpp index 83879ed66..386212f49 100644 --- a/live/src/v1/LiveClient.cpp +++ b/live/src/v1/LiveClient.cpp @@ -392,6 +392,47 @@ std::shared_ptr LiveClient::createTranscodin return localVarResult; } +std::shared_ptr LiveClient::createUrlAuthchain(CreateUrlAuthchainRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/auth/chain"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + 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("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForCreateUrlAuthchain()); + + 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 LiveClient::deleteDomain(DeleteDomainRequest &request) { std::string localVarPath = "/v1/{project_id}/domain"; @@ -491,6 +532,38 @@ std::shared_ptr LiveClient::deleteDomainMapping(Del return localVarResult; } +std::shared_ptr LiveClient::deletePublishTemplate(DeletePublishTemplateRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/notifications/publish"; + + 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.domainIsSet()) { + localVarQueryParams["domain"] = parameterToString(request.getDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForDeletePublishTemplate()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr LiveClient::deleteRecordCallbackConfig(DeleteRecordCallbackConfigRequest &request) { std::string localVarPath = "/v1/{project_id}/record/callbacks/{id}"; @@ -659,6 +732,102 @@ std::shared_ptr LiveClient::deleteTranscodin return localVarResult; } +std::shared_ptr LiveClient::listDelayConfig(ListDelayConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/delay"; + + 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.playDomainIsSet()) { + localVarQueryParams["play_domain"] = parameterToString(request.getPlayDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListDelayConfig()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LiveClient::listGeoBlockingConfig(ListGeoBlockingConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/geo-blocking"; + + 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.playDomainIsSet()) { + localVarQueryParams["play_domain"] = parameterToString(request.getPlayDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListGeoBlockingConfig()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LiveClient::listIpAuthList(ListIpAuthListRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/guard/ip"; + + 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.domainIsSet()) { + localVarQueryParams["domain"] = parameterToString(request.getDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListIpAuthList()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr LiveClient::listLiveSampleLogs(ListLiveSampleLogsRequest &request) { std::string localVarPath = "/v1/{project_id}/logs"; @@ -741,6 +910,38 @@ std::shared_ptr LiveClient::listLiveStreamsOnline return localVarResult; } +std::shared_ptr LiveClient::listPublishTemplate(ListPublishTemplateRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/notifications/publish"; + + 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.domainIsSet()) { + localVarQueryParams["domain"] = parameterToString(request.getDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListPublishTemplate()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr LiveClient::listRecordCallbackConfigs(ListRecordCallbackConfigsRequest &request) { std::string localVarPath = "/v1/{project_id}/record/callbacks"; @@ -1078,6 +1279,38 @@ std::shared_ptr LiveClient::showDomainKeyChain(ShowD return localVarResult; } +std::shared_ptr LiveClient::showPullSourcesConfig(ShowPullSourcesConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/pull-sources"; + + 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.playDomainIsSet()) { + localVarQueryParams["play_domain"] = parameterToString(request.getPlayDomain()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForShowPullSourcesConfig()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr LiveClient::showRecordCallbackConfig(ShowRecordCallbackConfigRequest &request) { std::string localVarPath = "/v1/{project_id}/record/callbacks/{id}"; @@ -1179,6 +1412,47 @@ std::shared_ptr LiveClient::showTranscodingsTe return localVarResult; } +std::shared_ptr LiveClient::updateDelayConfig(UpdateDelayConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/delay"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + 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, LiveMeta::genRequestDefForUpdateDelayConfig()); + + 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 LiveClient::updateDomain(UpdateDomainRequest &request) { std::string localVarPath = "/v1/{project_id}/domain"; @@ -1305,6 +1579,176 @@ std::shared_ptr LiveClient::updateDomainKeyChain(U return localVarResult; } +std::shared_ptr LiveClient::updateGeoBlockingConfig(UpdateGeoBlockingConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/geo-blocking"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.playDomainIsSet()) { + localVarQueryParams["play_domain"] = parameterToString(request.getPlayDomain()); + } + + 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, LiveMeta::genRequestDefForUpdateGeoBlockingConfig()); + + 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 LiveClient::updateIpAuthList(UpdateIpAuthListRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/guard/ip"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + 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, LiveMeta::genRequestDefForUpdateIpAuthList()); + + 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 LiveClient::updatePublishTemplate(UpdatePublishTemplateRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/notifications/publish"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.domainIsSet()) { + localVarQueryParams["domain"] = parameterToString(request.getDomain()); + } + + 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, LiveMeta::genRequestDefForUpdatePublishTemplate()); + + 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 LiveClient::updatePullSourcesConfig(UpdatePullSourcesConfigRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/pull-sources"; + + 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; charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + 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, LiveMeta::genRequestDefForUpdatePullSourcesConfig()); + + 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 LiveClient::updateRecordCallbackConfig(UpdateRecordCallbackConfigRequest &request) { std::string localVarPath = "/v1/{project_id}/record/callbacks/{id}"; diff --git a/live/src/v1/LiveMeta.cpp b/live/src/v1/LiveMeta.cpp index 94acdcbd7..d12146e99 100644 --- a/live/src/v1/LiveMeta.cpp +++ b/live/src/v1/LiveMeta.cpp @@ -93,6 +93,15 @@ HttpRequestDef LiveMeta::genRequestDefForCreateTranscodingsTemplate() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForCreateUrlAuthchain() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForDeleteDomain() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("Domain") @@ -120,6 +129,14 @@ HttpRequestDef LiveMeta::genRequestDefForDeleteDomainMapping() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForDeletePublishTemplate() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domain") + .withJsonTag("domain") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForDeleteRecordCallbackConfig() { HttpRequestDef reqDefBuilder; return reqDefBuilder; @@ -166,6 +183,40 @@ HttpRequestDef LiveMeta::genRequestDefForDeleteTranscodingsTemplate() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForListDelayConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("PlayDomain") + .withJsonTag("play_domain") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef LiveMeta::genRequestDefForListGeoBlockingConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("PlayDomain") + .withJsonTag("play_domain") + .withLocationType(Query_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("xRequestId"). + withJsonTag("X-Request-Id"). + withKindName("std::string"). + withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LiveMeta::genRequestDefForListIpAuthList() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domain") + .withJsonTag("domain") + .withLocationType(Query_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("xRequestId"). + withJsonTag("X-Request-Id"). + withKindName("std::string"). + withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForListLiveSampleLogs() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("PlayDomain") @@ -200,6 +251,14 @@ HttpRequestDef LiveMeta::genRequestDefForListLiveStreamsOnline() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForListPublishTemplate() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domain") + .withJsonTag("domain") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForListRecordCallbackConfigs() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("PublishDomain") @@ -347,6 +406,14 @@ HttpRequestDef LiveMeta::genRequestDefForShowDomainKeyChain() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForShowPullSourcesConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("PlayDomain") + .withJsonTag("play_domain") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForShowRecordCallbackConfig() { HttpRequestDef reqDefBuilder; return reqDefBuilder; @@ -374,6 +441,15 @@ HttpRequestDef LiveMeta::genRequestDefForShowTranscodingsTemplate() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForUpdateDelayConfig() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForUpdateDomain() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; @@ -404,6 +480,58 @@ HttpRequestDef LiveMeta::genRequestDefForUpdateDomainKeyChain() { return reqDefBuilder; } +HttpRequestDef LiveMeta::genRequestDefForUpdateGeoBlockingConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("PlayDomain") + .withJsonTag("play_domain") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("xRequestId"). + withJsonTag("X-Request-Id"). + withKindName("std::string"). + withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LiveMeta::genRequestDefForUpdateIpAuthList() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("xRequestId"). + withJsonTag("X-Request-Id"). + withKindName("std::string"). + withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LiveMeta::genRequestDefForUpdatePublishTemplate() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domain") + .withJsonTag("domain") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef LiveMeta::genRequestDefForUpdatePullSourcesConfig() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef LiveMeta::genRequestDefForUpdateRecordCallbackConfig() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; diff --git a/live/src/v1/model/CallbackUrl.cpp b/live/src/v1/model/CallbackUrl.cpp new file mode 100644 index 000000000..886cb4c6d --- /dev/null +++ b/live/src/v1/model/CallbackUrl.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/live/v1/model/CallbackUrl.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +CallbackUrl::CallbackUrl() +{ + url_ = ""; + urlIsSet_ = false; + authSignKey_ = ""; + authSignKeyIsSet_ = false; + callBackArea_ = ""; + callBackAreaIsSet_ = false; +} + +CallbackUrl::~CallbackUrl() = default; + +void CallbackUrl::validate() +{ +} + +web::json::value CallbackUrl::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(urlIsSet_) { + val[utility::conversions::to_string_t("url")] = ModelBase::toJson(url_); + } + if(authSignKeyIsSet_) { + val[utility::conversions::to_string_t("auth_sign_key")] = ModelBase::toJson(authSignKey_); + } + if(callBackAreaIsSet_) { + val[utility::conversions::to_string_t("call_back_area")] = ModelBase::toJson(callBackArea_); + } + + return val; +} +bool CallbackUrl::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("url"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("url")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUrl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auth_sign_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auth_sign_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAuthSignKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("call_back_area"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("call_back_area")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCallBackArea(refVal); + } + } + return ok; +} + + +std::string CallbackUrl::getUrl() const +{ + return url_; +} + +void CallbackUrl::setUrl(const std::string& value) +{ + url_ = value; + urlIsSet_ = true; +} + +bool CallbackUrl::urlIsSet() const +{ + return urlIsSet_; +} + +void CallbackUrl::unseturl() +{ + urlIsSet_ = false; +} + +std::string CallbackUrl::getAuthSignKey() const +{ + return authSignKey_; +} + +void CallbackUrl::setAuthSignKey(const std::string& value) +{ + authSignKey_ = value; + authSignKeyIsSet_ = true; +} + +bool CallbackUrl::authSignKeyIsSet() const +{ + return authSignKeyIsSet_; +} + +void CallbackUrl::unsetauthSignKey() +{ + authSignKeyIsSet_ = false; +} + +std::string CallbackUrl::getCallBackArea() const +{ + return callBackArea_; +} + +void CallbackUrl::setCallBackArea(const std::string& value) +{ + callBackArea_ = value; + callBackAreaIsSet_ = true; +} + +bool CallbackUrl::callBackAreaIsSet() const +{ + return callBackAreaIsSet_; +} + +void CallbackUrl::unsetcallBackArea() +{ + callBackAreaIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/CreateUrlAuthchainReq.cpp b/live/src/v1/model/CreateUrlAuthchainReq.cpp new file mode 100644 index 000000000..a7c3c75ae --- /dev/null +++ b/live/src/v1/model/CreateUrlAuthchainReq.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/live/v1/model/CreateUrlAuthchainReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +CreateUrlAuthchainReq::CreateUrlAuthchainReq() +{ + domain_ = ""; + domainIsSet_ = false; + domainType_ = ""; + domainTypeIsSet_ = false; + stream_ = ""; + streamIsSet_ = false; + app_ = ""; + appIsSet_ = false; + checkLevel_ = 0; + checkLevelIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; +} + +CreateUrlAuthchainReq::~CreateUrlAuthchainReq() = default; + +void CreateUrlAuthchainReq::validate() +{ +} + +web::json::value CreateUrlAuthchainReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + if(domainTypeIsSet_) { + val[utility::conversions::to_string_t("domain_type")] = ModelBase::toJson(domainType_); + } + if(streamIsSet_) { + val[utility::conversions::to_string_t("stream")] = ModelBase::toJson(stream_); + } + if(appIsSet_) { + val[utility::conversions::to_string_t("app")] = ModelBase::toJson(app_); + } + if(checkLevelIsSet_) { + val[utility::conversions::to_string_t("check_level")] = ModelBase::toJson(checkLevel_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + + return val; +} +bool CreateUrlAuthchainReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStream(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("app"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("check_level"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("check_level")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCheckLevel(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + return ok; +} + + +std::string CreateUrlAuthchainReq::getDomain() const +{ + return domain_; +} + +void CreateUrlAuthchainReq::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool CreateUrlAuthchainReq::domainIsSet() const +{ + return domainIsSet_; +} + +void CreateUrlAuthchainReq::unsetdomain() +{ + domainIsSet_ = false; +} + +std::string CreateUrlAuthchainReq::getDomainType() const +{ + return domainType_; +} + +void CreateUrlAuthchainReq::setDomainType(const std::string& value) +{ + domainType_ = value; + domainTypeIsSet_ = true; +} + +bool CreateUrlAuthchainReq::domainTypeIsSet() const +{ + return domainTypeIsSet_; +} + +void CreateUrlAuthchainReq::unsetdomainType() +{ + domainTypeIsSet_ = false; +} + +std::string CreateUrlAuthchainReq::getStream() const +{ + return stream_; +} + +void CreateUrlAuthchainReq::setStream(const std::string& value) +{ + stream_ = value; + streamIsSet_ = true; +} + +bool CreateUrlAuthchainReq::streamIsSet() const +{ + return streamIsSet_; +} + +void CreateUrlAuthchainReq::unsetstream() +{ + streamIsSet_ = false; +} + +std::string CreateUrlAuthchainReq::getApp() const +{ + return app_; +} + +void CreateUrlAuthchainReq::setApp(const std::string& value) +{ + app_ = value; + appIsSet_ = true; +} + +bool CreateUrlAuthchainReq::appIsSet() const +{ + return appIsSet_; +} + +void CreateUrlAuthchainReq::unsetapp() +{ + appIsSet_ = false; +} + +int32_t CreateUrlAuthchainReq::getCheckLevel() const +{ + return checkLevel_; +} + +void CreateUrlAuthchainReq::setCheckLevel(int32_t value) +{ + checkLevel_ = value; + checkLevelIsSet_ = true; +} + +bool CreateUrlAuthchainReq::checkLevelIsSet() const +{ + return checkLevelIsSet_; +} + +void CreateUrlAuthchainReq::unsetcheckLevel() +{ + checkLevelIsSet_ = false; +} + +std::string CreateUrlAuthchainReq::getStartTime() const +{ + return startTime_; +} + +void CreateUrlAuthchainReq::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool CreateUrlAuthchainReq::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void CreateUrlAuthchainReq::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/CreateUrlAuthchainRequest.cpp b/live/src/v1/model/CreateUrlAuthchainRequest.cpp new file mode 100644 index 000000000..916fff91a --- /dev/null +++ b/live/src/v1/model/CreateUrlAuthchainRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/live/v1/model/CreateUrlAuthchainRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +CreateUrlAuthchainRequest::CreateUrlAuthchainRequest() +{ + bodyIsSet_ = false; +} + +CreateUrlAuthchainRequest::~CreateUrlAuthchainRequest() = default; + +void CreateUrlAuthchainRequest::validate() +{ +} + +web::json::value CreateUrlAuthchainRequest::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 CreateUrlAuthchainRequest::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()) + { + CreateUrlAuthchainReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +CreateUrlAuthchainReq CreateUrlAuthchainRequest::getBody() const +{ + return body_; +} + +void CreateUrlAuthchainRequest::setBody(const CreateUrlAuthchainReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateUrlAuthchainRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateUrlAuthchainRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/CreateUrlAuthchainResponse.cpp b/live/src/v1/model/CreateUrlAuthchainResponse.cpp new file mode 100644 index 000000000..ca03aa041 --- /dev/null +++ b/live/src/v1/model/CreateUrlAuthchainResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/live/v1/model/CreateUrlAuthchainResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +CreateUrlAuthchainResponse::CreateUrlAuthchainResponse() +{ + keychainIsSet_ = false; +} + +CreateUrlAuthchainResponse::~CreateUrlAuthchainResponse() = default; + +void CreateUrlAuthchainResponse::validate() +{ +} + +web::json::value CreateUrlAuthchainResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(keychainIsSet_) { + val[utility::conversions::to_string_t("keychain")] = ModelBase::toJson(keychain_); + } + + return val; +} +bool CreateUrlAuthchainResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("keychain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("keychain")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setKeychain(refVal); + } + } + return ok; +} + + +std::vector& CreateUrlAuthchainResponse::getKeychain() +{ + return keychain_; +} + +void CreateUrlAuthchainResponse::setKeychain(const std::vector& value) +{ + keychain_ = value; + keychainIsSet_ = true; +} + +bool CreateUrlAuthchainResponse::keychainIsSet() const +{ + return keychainIsSet_; +} + +void CreateUrlAuthchainResponse::unsetkeychain() +{ + keychainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/DelayConfig.cpp b/live/src/v1/model/DelayConfig.cpp new file mode 100644 index 000000000..acc402441 --- /dev/null +++ b/live/src/v1/model/DelayConfig.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/live/v1/model/DelayConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +DelayConfig::DelayConfig() +{ + app_ = ""; + appIsSet_ = false; + delay_ = 0; + delayIsSet_ = false; +} + +DelayConfig::~DelayConfig() = default; + +void DelayConfig::validate() +{ +} + +web::json::value DelayConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(appIsSet_) { + val[utility::conversions::to_string_t("app")] = ModelBase::toJson(app_); + } + if(delayIsSet_) { + val[utility::conversions::to_string_t("delay")] = ModelBase::toJson(delay_); + } + + return val; +} +bool DelayConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("app"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("delay"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("delay")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDelay(refVal); + } + } + return ok; +} + + +std::string DelayConfig::getApp() const +{ + return app_; +} + +void DelayConfig::setApp(const std::string& value) +{ + app_ = value; + appIsSet_ = true; +} + +bool DelayConfig::appIsSet() const +{ + return appIsSet_; +} + +void DelayConfig::unsetapp() +{ + appIsSet_ = false; +} + +int32_t DelayConfig::getDelay() const +{ + return delay_; +} + +void DelayConfig::setDelay(int32_t value) +{ + delay_ = value; + delayIsSet_ = true; +} + +bool DelayConfig::delayIsSet() const +{ + return delayIsSet_; +} + +void DelayConfig::unsetdelay() +{ + delayIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/DeletePublishTemplateRequest.cpp b/live/src/v1/model/DeletePublishTemplateRequest.cpp new file mode 100644 index 000000000..2a81bf904 --- /dev/null +++ b/live/src/v1/model/DeletePublishTemplateRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/DeletePublishTemplateRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +DeletePublishTemplateRequest::DeletePublishTemplateRequest() +{ + domain_ = ""; + domainIsSet_ = false; +} + +DeletePublishTemplateRequest::~DeletePublishTemplateRequest() = default; + +void DeletePublishTemplateRequest::validate() +{ +} + +web::json::value DeletePublishTemplateRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + + return val; +} +bool DeletePublishTemplateRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + return ok; +} + + +std::string DeletePublishTemplateRequest::getDomain() const +{ + return domain_; +} + +void DeletePublishTemplateRequest::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool DeletePublishTemplateRequest::domainIsSet() const +{ + return domainIsSet_; +} + +void DeletePublishTemplateRequest::unsetdomain() +{ + domainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/DeletePublishTemplateResponse.cpp b/live/src/v1/model/DeletePublishTemplateResponse.cpp new file mode 100644 index 000000000..13d8c26ec --- /dev/null +++ b/live/src/v1/model/DeletePublishTemplateResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/live/v1/model/DeletePublishTemplateResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +DeletePublishTemplateResponse::DeletePublishTemplateResponse() +{ +} + +DeletePublishTemplateResponse::~DeletePublishTemplateResponse() = default; + +void DeletePublishTemplateResponse::validate() +{ +} + +web::json::value DeletePublishTemplateResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool DeletePublishTemplateResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/live/src/v1/model/GeoBlockingConfigInfo.cpp b/live/src/v1/model/GeoBlockingConfigInfo.cpp new file mode 100644 index 000000000..e1d0fcdeb --- /dev/null +++ b/live/src/v1/model/GeoBlockingConfigInfo.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/live/v1/model/GeoBlockingConfigInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +GeoBlockingConfigInfo::GeoBlockingConfigInfo() +{ + app_ = ""; + appIsSet_ = false; + areaWhitelistIsSet_ = false; +} + +GeoBlockingConfigInfo::~GeoBlockingConfigInfo() = default; + +void GeoBlockingConfigInfo::validate() +{ +} + +web::json::value GeoBlockingConfigInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(appIsSet_) { + val[utility::conversions::to_string_t("app")] = ModelBase::toJson(app_); + } + if(areaWhitelistIsSet_) { + val[utility::conversions::to_string_t("area_whitelist")] = ModelBase::toJson(areaWhitelist_); + } + + return val; +} +bool GeoBlockingConfigInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("app"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("area_whitelist"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("area_whitelist")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAreaWhitelist(refVal); + } + } + return ok; +} + + +std::string GeoBlockingConfigInfo::getApp() const +{ + return app_; +} + +void GeoBlockingConfigInfo::setApp(const std::string& value) +{ + app_ = value; + appIsSet_ = true; +} + +bool GeoBlockingConfigInfo::appIsSet() const +{ + return appIsSet_; +} + +void GeoBlockingConfigInfo::unsetapp() +{ + appIsSet_ = false; +} + +std::vector& GeoBlockingConfigInfo::getAreaWhitelist() +{ + return areaWhitelist_; +} + +void GeoBlockingConfigInfo::setAreaWhitelist(const std::vector& value) +{ + areaWhitelist_ = value; + areaWhitelistIsSet_ = true; +} + +bool GeoBlockingConfigInfo::areaWhitelistIsSet() const +{ + return areaWhitelistIsSet_; +} + +void GeoBlockingConfigInfo::unsetareaWhitelist() +{ + areaWhitelistIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/IPAuthInfo.cpp b/live/src/v1/model/IPAuthInfo.cpp new file mode 100644 index 000000000..cf238ffae --- /dev/null +++ b/live/src/v1/model/IPAuthInfo.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/live/v1/model/IPAuthInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +IPAuthInfo::IPAuthInfo() +{ + domain_ = ""; + domainIsSet_ = false; + authType_ = ""; + authTypeIsSet_ = false; + ipAuthList_ = ""; + ipAuthListIsSet_ = false; +} + +IPAuthInfo::~IPAuthInfo() = default; + +void IPAuthInfo::validate() +{ +} + +web::json::value IPAuthInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + if(authTypeIsSet_) { + val[utility::conversions::to_string_t("auth_type")] = ModelBase::toJson(authType_); + } + if(ipAuthListIsSet_) { + val[utility::conversions::to_string_t("ip_auth_list")] = ModelBase::toJson(ipAuthList_); + } + + return val; +} +bool IPAuthInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auth_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auth_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAuthType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip_auth_list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip_auth_list")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpAuthList(refVal); + } + } + return ok; +} + + +std::string IPAuthInfo::getDomain() const +{ + return domain_; +} + +void IPAuthInfo::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool IPAuthInfo::domainIsSet() const +{ + return domainIsSet_; +} + +void IPAuthInfo::unsetdomain() +{ + domainIsSet_ = false; +} + +std::string IPAuthInfo::getAuthType() const +{ + return authType_; +} + +void IPAuthInfo::setAuthType(const std::string& value) +{ + authType_ = value; + authTypeIsSet_ = true; +} + +bool IPAuthInfo::authTypeIsSet() const +{ + return authTypeIsSet_; +} + +void IPAuthInfo::unsetauthType() +{ + authTypeIsSet_ = false; +} + +std::string IPAuthInfo::getIpAuthList() const +{ + return ipAuthList_; +} + +void IPAuthInfo::setIpAuthList(const std::string& value) +{ + ipAuthList_ = value; + ipAuthListIsSet_ = true; +} + +bool IPAuthInfo::ipAuthListIsSet() const +{ + return ipAuthListIsSet_; +} + +void IPAuthInfo::unsetipAuthList() +{ + ipAuthListIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListDelayConfigRequest.cpp b/live/src/v1/model/ListDelayConfigRequest.cpp new file mode 100644 index 000000000..b2f4d9c22 --- /dev/null +++ b/live/src/v1/model/ListDelayConfigRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/ListDelayConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListDelayConfigRequest::ListDelayConfigRequest() +{ + playDomain_ = ""; + playDomainIsSet_ = false; +} + +ListDelayConfigRequest::~ListDelayConfigRequest() = default; + +void ListDelayConfigRequest::validate() +{ +} + +web::json::value ListDelayConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + + return val; +} +bool ListDelayConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + return ok; +} + + +std::string ListDelayConfigRequest::getPlayDomain() const +{ + return playDomain_; +} + +void ListDelayConfigRequest::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ListDelayConfigRequest::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ListDelayConfigRequest::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListDelayConfigResponse.cpp b/live/src/v1/model/ListDelayConfigResponse.cpp new file mode 100644 index 000000000..29b9094ab --- /dev/null +++ b/live/src/v1/model/ListDelayConfigResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/live/v1/model/ListDelayConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListDelayConfigResponse::ListDelayConfigResponse() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + delayConfigIsSet_ = false; +} + +ListDelayConfigResponse::~ListDelayConfigResponse() = default; + +void ListDelayConfigResponse::validate() +{ +} + +web::json::value ListDelayConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(delayConfigIsSet_) { + val[utility::conversions::to_string_t("delay_config")] = ModelBase::toJson(delayConfig_); + } + + return val; +} +bool ListDelayConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("delay_config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("delay_config")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDelayConfig(refVal); + } + } + return ok; +} + + +std::string ListDelayConfigResponse::getPlayDomain() const +{ + return playDomain_; +} + +void ListDelayConfigResponse::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ListDelayConfigResponse::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ListDelayConfigResponse::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +std::vector& ListDelayConfigResponse::getDelayConfig() +{ + return delayConfig_; +} + +void ListDelayConfigResponse::setDelayConfig(const std::vector& value) +{ + delayConfig_ = value; + delayConfigIsSet_ = true; +} + +bool ListDelayConfigResponse::delayConfigIsSet() const +{ + return delayConfigIsSet_; +} + +void ListDelayConfigResponse::unsetdelayConfig() +{ + delayConfigIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListGeoBlockingConfigRequest.cpp b/live/src/v1/model/ListGeoBlockingConfigRequest.cpp new file mode 100644 index 000000000..0f076253e --- /dev/null +++ b/live/src/v1/model/ListGeoBlockingConfigRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/ListGeoBlockingConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListGeoBlockingConfigRequest::ListGeoBlockingConfigRequest() +{ + playDomain_ = ""; + playDomainIsSet_ = false; +} + +ListGeoBlockingConfigRequest::~ListGeoBlockingConfigRequest() = default; + +void ListGeoBlockingConfigRequest::validate() +{ +} + +web::json::value ListGeoBlockingConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + + return val; +} +bool ListGeoBlockingConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + return ok; +} + + +std::string ListGeoBlockingConfigRequest::getPlayDomain() const +{ + return playDomain_; +} + +void ListGeoBlockingConfigRequest::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ListGeoBlockingConfigRequest::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ListGeoBlockingConfigRequest::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListGeoBlockingConfigResponse.cpp b/live/src/v1/model/ListGeoBlockingConfigResponse.cpp new file mode 100644 index 000000000..80e6c3e37 --- /dev/null +++ b/live/src/v1/model/ListGeoBlockingConfigResponse.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/live/v1/model/ListGeoBlockingConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListGeoBlockingConfigResponse::ListGeoBlockingConfigResponse() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + appsIsSet_ = false; + xRequestId_ = ""; + xRequestIdIsSet_ = false; +} + +ListGeoBlockingConfigResponse::~ListGeoBlockingConfigResponse() = default; + +void ListGeoBlockingConfigResponse::validate() +{ +} + +web::json::value ListGeoBlockingConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(appsIsSet_) { + val[utility::conversions::to_string_t("apps")] = ModelBase::toJson(apps_); + } + if(xRequestIdIsSet_) { + val[utility::conversions::to_string_t("X-Request-Id")] = ModelBase::toJson(xRequestId_); + } + + return val; +} +bool ListGeoBlockingConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("apps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("apps")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Request-Id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Request-Id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXRequestId(refVal); + } + } + return ok; +} + + +std::string ListGeoBlockingConfigResponse::getPlayDomain() const +{ + return playDomain_; +} + +void ListGeoBlockingConfigResponse::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ListGeoBlockingConfigResponse::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ListGeoBlockingConfigResponse::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +std::vector& ListGeoBlockingConfigResponse::getApps() +{ + return apps_; +} + +void ListGeoBlockingConfigResponse::setApps(const std::vector& value) +{ + apps_ = value; + appsIsSet_ = true; +} + +bool ListGeoBlockingConfigResponse::appsIsSet() const +{ + return appsIsSet_; +} + +void ListGeoBlockingConfigResponse::unsetapps() +{ + appsIsSet_ = false; +} + +std::string ListGeoBlockingConfigResponse::getXRequestId() const +{ + return xRequestId_; +} + +void ListGeoBlockingConfigResponse::setXRequestId(const std::string& value) +{ + xRequestId_ = value; + xRequestIdIsSet_ = true; +} + +bool ListGeoBlockingConfigResponse::xRequestIdIsSet() const +{ + return xRequestIdIsSet_; +} + +void ListGeoBlockingConfigResponse::unsetxRequestId() +{ + xRequestIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListIpAuthListRequest.cpp b/live/src/v1/model/ListIpAuthListRequest.cpp new file mode 100644 index 000000000..da952e74b --- /dev/null +++ b/live/src/v1/model/ListIpAuthListRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/ListIpAuthListRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListIpAuthListRequest::ListIpAuthListRequest() +{ + domain_ = ""; + domainIsSet_ = false; +} + +ListIpAuthListRequest::~ListIpAuthListRequest() = default; + +void ListIpAuthListRequest::validate() +{ +} + +web::json::value ListIpAuthListRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + + return val; +} +bool ListIpAuthListRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + return ok; +} + + +std::string ListIpAuthListRequest::getDomain() const +{ + return domain_; +} + +void ListIpAuthListRequest::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool ListIpAuthListRequest::domainIsSet() const +{ + return domainIsSet_; +} + +void ListIpAuthListRequest::unsetdomain() +{ + domainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListIpAuthListResponse.cpp b/live/src/v1/model/ListIpAuthListResponse.cpp new file mode 100644 index 000000000..c719bcf87 --- /dev/null +++ b/live/src/v1/model/ListIpAuthListResponse.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/live/v1/model/ListIpAuthListResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListIpAuthListResponse::ListIpAuthListResponse() +{ + domain_ = ""; + domainIsSet_ = false; + authType_ = ""; + authTypeIsSet_ = false; + ipAuthList_ = ""; + ipAuthListIsSet_ = false; + xRequestId_ = ""; + xRequestIdIsSet_ = false; +} + +ListIpAuthListResponse::~ListIpAuthListResponse() = default; + +void ListIpAuthListResponse::validate() +{ +} + +web::json::value ListIpAuthListResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + if(authTypeIsSet_) { + val[utility::conversions::to_string_t("auth_type")] = ModelBase::toJson(authType_); + } + if(ipAuthListIsSet_) { + val[utility::conversions::to_string_t("ip_auth_list")] = ModelBase::toJson(ipAuthList_); + } + if(xRequestIdIsSet_) { + val[utility::conversions::to_string_t("X-Request-Id")] = ModelBase::toJson(xRequestId_); + } + + return val; +} +bool ListIpAuthListResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auth_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auth_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAuthType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip_auth_list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip_auth_list")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpAuthList(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Request-Id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Request-Id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXRequestId(refVal); + } + } + return ok; +} + + +std::string ListIpAuthListResponse::getDomain() const +{ + return domain_; +} + +void ListIpAuthListResponse::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool ListIpAuthListResponse::domainIsSet() const +{ + return domainIsSet_; +} + +void ListIpAuthListResponse::unsetdomain() +{ + domainIsSet_ = false; +} + +std::string ListIpAuthListResponse::getAuthType() const +{ + return authType_; +} + +void ListIpAuthListResponse::setAuthType(const std::string& value) +{ + authType_ = value; + authTypeIsSet_ = true; +} + +bool ListIpAuthListResponse::authTypeIsSet() const +{ + return authTypeIsSet_; +} + +void ListIpAuthListResponse::unsetauthType() +{ + authTypeIsSet_ = false; +} + +std::string ListIpAuthListResponse::getIpAuthList() const +{ + return ipAuthList_; +} + +void ListIpAuthListResponse::setIpAuthList(const std::string& value) +{ + ipAuthList_ = value; + ipAuthListIsSet_ = true; +} + +bool ListIpAuthListResponse::ipAuthListIsSet() const +{ + return ipAuthListIsSet_; +} + +void ListIpAuthListResponse::unsetipAuthList() +{ + ipAuthListIsSet_ = false; +} + +std::string ListIpAuthListResponse::getXRequestId() const +{ + return xRequestId_; +} + +void ListIpAuthListResponse::setXRequestId(const std::string& value) +{ + xRequestId_ = value; + xRequestIdIsSet_ = true; +} + +bool ListIpAuthListResponse::xRequestIdIsSet() const +{ + return xRequestIdIsSet_; +} + +void ListIpAuthListResponse::unsetxRequestId() +{ + xRequestIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListPublishTemplateRequest.cpp b/live/src/v1/model/ListPublishTemplateRequest.cpp new file mode 100644 index 000000000..6552201f7 --- /dev/null +++ b/live/src/v1/model/ListPublishTemplateRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/ListPublishTemplateRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListPublishTemplateRequest::ListPublishTemplateRequest() +{ + domain_ = ""; + domainIsSet_ = false; +} + +ListPublishTemplateRequest::~ListPublishTemplateRequest() = default; + +void ListPublishTemplateRequest::validate() +{ +} + +web::json::value ListPublishTemplateRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + + return val; +} +bool ListPublishTemplateRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(refVal); + } + } + return ok; +} + + +std::string ListPublishTemplateRequest::getDomain() const +{ + return domain_; +} + +void ListPublishTemplateRequest::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool ListPublishTemplateRequest::domainIsSet() const +{ + return domainIsSet_; +} + +void ListPublishTemplateRequest::unsetdomain() +{ + domainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ListPublishTemplateResponse.cpp b/live/src/v1/model/ListPublishTemplateResponse.cpp new file mode 100644 index 000000000..6622fd9b7 --- /dev/null +++ b/live/src/v1/model/ListPublishTemplateResponse.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/live/v1/model/ListPublishTemplateResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ListPublishTemplateResponse::ListPublishTemplateResponse() +{ + url_ = ""; + urlIsSet_ = false; + authSignKey_ = ""; + authSignKeyIsSet_ = false; + callBackArea_ = ""; + callBackAreaIsSet_ = false; +} + +ListPublishTemplateResponse::~ListPublishTemplateResponse() = default; + +void ListPublishTemplateResponse::validate() +{ +} + +web::json::value ListPublishTemplateResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(urlIsSet_) { + val[utility::conversions::to_string_t("url")] = ModelBase::toJson(url_); + } + if(authSignKeyIsSet_) { + val[utility::conversions::to_string_t("auth_sign_key")] = ModelBase::toJson(authSignKey_); + } + if(callBackAreaIsSet_) { + val[utility::conversions::to_string_t("call_back_area")] = ModelBase::toJson(callBackArea_); + } + + return val; +} +bool ListPublishTemplateResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("url"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("url")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUrl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auth_sign_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auth_sign_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAuthSignKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("call_back_area"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("call_back_area")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCallBackArea(refVal); + } + } + return ok; +} + + +std::string ListPublishTemplateResponse::getUrl() const +{ + return url_; +} + +void ListPublishTemplateResponse::setUrl(const std::string& value) +{ + url_ = value; + urlIsSet_ = true; +} + +bool ListPublishTemplateResponse::urlIsSet() const +{ + return urlIsSet_; +} + +void ListPublishTemplateResponse::unseturl() +{ + urlIsSet_ = false; +} + +std::string ListPublishTemplateResponse::getAuthSignKey() const +{ + return authSignKey_; +} + +void ListPublishTemplateResponse::setAuthSignKey(const std::string& value) +{ + authSignKey_ = value; + authSignKeyIsSet_ = true; +} + +bool ListPublishTemplateResponse::authSignKeyIsSet() const +{ + return authSignKeyIsSet_; +} + +void ListPublishTemplateResponse::unsetauthSignKey() +{ + authSignKeyIsSet_ = false; +} + +std::string ListPublishTemplateResponse::getCallBackArea() const +{ + return callBackArea_; +} + +void ListPublishTemplateResponse::setCallBackArea(const std::string& value) +{ + callBackArea_ = value; + callBackAreaIsSet_ = true; +} + +bool ListPublishTemplateResponse::callBackAreaIsSet() const +{ + return callBackAreaIsSet_; +} + +void ListPublishTemplateResponse::unsetcallBackArea() +{ + callBackAreaIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ModifyDelayConfig.cpp b/live/src/v1/model/ModifyDelayConfig.cpp new file mode 100644 index 000000000..c34390729 --- /dev/null +++ b/live/src/v1/model/ModifyDelayConfig.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/live/v1/model/ModifyDelayConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ModifyDelayConfig::ModifyDelayConfig() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + app_ = ""; + appIsSet_ = false; + delay_ = 0; + delayIsSet_ = false; +} + +ModifyDelayConfig::~ModifyDelayConfig() = default; + +void ModifyDelayConfig::validate() +{ +} + +web::json::value ModifyDelayConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(appIsSet_) { + val[utility::conversions::to_string_t("app")] = ModelBase::toJson(app_); + } + if(delayIsSet_) { + val[utility::conversions::to_string_t("delay")] = ModelBase::toJson(delay_); + } + + return val; +} +bool ModifyDelayConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("app"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("delay"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("delay")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDelay(refVal); + } + } + return ok; +} + + +std::string ModifyDelayConfig::getPlayDomain() const +{ + return playDomain_; +} + +void ModifyDelayConfig::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ModifyDelayConfig::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ModifyDelayConfig::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +std::string ModifyDelayConfig::getApp() const +{ + return app_; +} + +void ModifyDelayConfig::setApp(const std::string& value) +{ + app_ = value; + appIsSet_ = true; +} + +bool ModifyDelayConfig::appIsSet() const +{ + return appIsSet_; +} + +void ModifyDelayConfig::unsetapp() +{ + appIsSet_ = false; +} + +int32_t ModifyDelayConfig::getDelay() const +{ + return delay_; +} + +void ModifyDelayConfig::setDelay(int32_t value) +{ + delay_ = value; + delayIsSet_ = true; +} + +bool ModifyDelayConfig::delayIsSet() const +{ + return delayIsSet_; +} + +void ModifyDelayConfig::unsetdelay() +{ + delayIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ModifyPullSourcesConfig.cpp b/live/src/v1/model/ModifyPullSourcesConfig.cpp new file mode 100644 index 000000000..626cb26c4 --- /dev/null +++ b/live/src/v1/model/ModifyPullSourcesConfig.cpp @@ -0,0 +1,251 @@ + + +#include "huaweicloud/live/v1/model/ModifyPullSourcesConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ModifyPullSourcesConfig::ModifyPullSourcesConfig() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + sourceType_ = ""; + sourceTypeIsSet_ = false; + sourcesIsSet_ = false; + sourcesIpIsSet_ = false; + scheme_ = ""; + schemeIsSet_ = false; + additionalArgsIsSet_ = false; +} + +ModifyPullSourcesConfig::~ModifyPullSourcesConfig() = default; + +void ModifyPullSourcesConfig::validate() +{ +} + +web::json::value ModifyPullSourcesConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(sourceTypeIsSet_) { + val[utility::conversions::to_string_t("source_type")] = ModelBase::toJson(sourceType_); + } + if(sourcesIsSet_) { + val[utility::conversions::to_string_t("sources")] = ModelBase::toJson(sources_); + } + if(sourcesIpIsSet_) { + val[utility::conversions::to_string_t("sources_ip")] = ModelBase::toJson(sourcesIp_); + } + if(schemeIsSet_) { + val[utility::conversions::to_string_t("scheme")] = ModelBase::toJson(scheme_); + } + if(additionalArgsIsSet_) { + val[utility::conversions::to_string_t("additional_args")] = ModelBase::toJson(additionalArgs_); + } + + return val; +} +bool ModifyPullSourcesConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sources"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sources")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSources(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sources_ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sources_ip")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourcesIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("scheme"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("scheme")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setScheme(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("additional_args"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_args")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalArgs(refVal); + } + } + return ok; +} + + +std::string ModifyPullSourcesConfig::getPlayDomain() const +{ + return playDomain_; +} + +void ModifyPullSourcesConfig::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ModifyPullSourcesConfig::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ModifyPullSourcesConfig::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +std::string ModifyPullSourcesConfig::getSourceType() const +{ + return sourceType_; +} + +void ModifyPullSourcesConfig::setSourceType(const std::string& value) +{ + sourceType_ = value; + sourceTypeIsSet_ = true; +} + +bool ModifyPullSourcesConfig::sourceTypeIsSet() const +{ + return sourceTypeIsSet_; +} + +void ModifyPullSourcesConfig::unsetsourceType() +{ + sourceTypeIsSet_ = false; +} + +std::vector& ModifyPullSourcesConfig::getSources() +{ + return sources_; +} + +void ModifyPullSourcesConfig::setSources(const std::vector& value) +{ + sources_ = value; + sourcesIsSet_ = true; +} + +bool ModifyPullSourcesConfig::sourcesIsSet() const +{ + return sourcesIsSet_; +} + +void ModifyPullSourcesConfig::unsetsources() +{ + sourcesIsSet_ = false; +} + +std::vector& ModifyPullSourcesConfig::getSourcesIp() +{ + return sourcesIp_; +} + +void ModifyPullSourcesConfig::setSourcesIp(const std::vector& value) +{ + sourcesIp_ = value; + sourcesIpIsSet_ = true; +} + +bool ModifyPullSourcesConfig::sourcesIpIsSet() const +{ + return sourcesIpIsSet_; +} + +void ModifyPullSourcesConfig::unsetsourcesIp() +{ + sourcesIpIsSet_ = false; +} + +std::string ModifyPullSourcesConfig::getScheme() const +{ + return scheme_; +} + +void ModifyPullSourcesConfig::setScheme(const std::string& value) +{ + scheme_ = value; + schemeIsSet_ = true; +} + +bool ModifyPullSourcesConfig::schemeIsSet() const +{ + return schemeIsSet_; +} + +void ModifyPullSourcesConfig::unsetscheme() +{ + schemeIsSet_ = false; +} + +std::map& ModifyPullSourcesConfig::getAdditionalArgs() +{ + return additionalArgs_; +} + +void ModifyPullSourcesConfig::setAdditionalArgs(const std::map& value) +{ + additionalArgs_ = value; + additionalArgsIsSet_ = true; +} + +bool ModifyPullSourcesConfig::additionalArgsIsSet() const +{ + return additionalArgsIsSet_; +} + +void ModifyPullSourcesConfig::unsetadditionalArgs() +{ + additionalArgsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ShowPullSourcesConfigRequest.cpp b/live/src/v1/model/ShowPullSourcesConfigRequest.cpp new file mode 100644 index 000000000..c3c378ea8 --- /dev/null +++ b/live/src/v1/model/ShowPullSourcesConfigRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/ShowPullSourcesConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ShowPullSourcesConfigRequest::ShowPullSourcesConfigRequest() +{ + playDomain_ = ""; + playDomainIsSet_ = false; +} + +ShowPullSourcesConfigRequest::~ShowPullSourcesConfigRequest() = default; + +void ShowPullSourcesConfigRequest::validate() +{ +} + +web::json::value ShowPullSourcesConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + + return val; +} +bool ShowPullSourcesConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + return ok; +} + + +std::string ShowPullSourcesConfigRequest::getPlayDomain() const +{ + return playDomain_; +} + +void ShowPullSourcesConfigRequest::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ShowPullSourcesConfigRequest::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ShowPullSourcesConfigRequest::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ShowPullSourcesConfigResponse.cpp b/live/src/v1/model/ShowPullSourcesConfigResponse.cpp new file mode 100644 index 000000000..2af740937 --- /dev/null +++ b/live/src/v1/model/ShowPullSourcesConfigResponse.cpp @@ -0,0 +1,251 @@ + + +#include "huaweicloud/live/v1/model/ShowPullSourcesConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +ShowPullSourcesConfigResponse::ShowPullSourcesConfigResponse() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + sourceType_ = ""; + sourceTypeIsSet_ = false; + sourcesIsSet_ = false; + sourcesIpIsSet_ = false; + scheme_ = ""; + schemeIsSet_ = false; + additionalArgsIsSet_ = false; +} + +ShowPullSourcesConfigResponse::~ShowPullSourcesConfigResponse() = default; + +void ShowPullSourcesConfigResponse::validate() +{ +} + +web::json::value ShowPullSourcesConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(sourceTypeIsSet_) { + val[utility::conversions::to_string_t("source_type")] = ModelBase::toJson(sourceType_); + } + if(sourcesIsSet_) { + val[utility::conversions::to_string_t("sources")] = ModelBase::toJson(sources_); + } + if(sourcesIpIsSet_) { + val[utility::conversions::to_string_t("sources_ip")] = ModelBase::toJson(sourcesIp_); + } + if(schemeIsSet_) { + val[utility::conversions::to_string_t("scheme")] = ModelBase::toJson(scheme_); + } + if(additionalArgsIsSet_) { + val[utility::conversions::to_string_t("additional_args")] = ModelBase::toJson(additionalArgs_); + } + + return val; +} +bool ShowPullSourcesConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sources"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sources")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSources(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sources_ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sources_ip")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourcesIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("scheme"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("scheme")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setScheme(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("additional_args"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("additional_args")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdditionalArgs(refVal); + } + } + return ok; +} + + +std::string ShowPullSourcesConfigResponse::getPlayDomain() const +{ + return playDomain_; +} + +void ShowPullSourcesConfigResponse::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +std::string ShowPullSourcesConfigResponse::getSourceType() const +{ + return sourceType_; +} + +void ShowPullSourcesConfigResponse::setSourceType(const std::string& value) +{ + sourceType_ = value; + sourceTypeIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::sourceTypeIsSet() const +{ + return sourceTypeIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetsourceType() +{ + sourceTypeIsSet_ = false; +} + +std::vector& ShowPullSourcesConfigResponse::getSources() +{ + return sources_; +} + +void ShowPullSourcesConfigResponse::setSources(const std::vector& value) +{ + sources_ = value; + sourcesIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::sourcesIsSet() const +{ + return sourcesIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetsources() +{ + sourcesIsSet_ = false; +} + +std::vector& ShowPullSourcesConfigResponse::getSourcesIp() +{ + return sourcesIp_; +} + +void ShowPullSourcesConfigResponse::setSourcesIp(const std::vector& value) +{ + sourcesIp_ = value; + sourcesIpIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::sourcesIpIsSet() const +{ + return sourcesIpIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetsourcesIp() +{ + sourcesIpIsSet_ = false; +} + +std::string ShowPullSourcesConfigResponse::getScheme() const +{ + return scheme_; +} + +void ShowPullSourcesConfigResponse::setScheme(const std::string& value) +{ + scheme_ = value; + schemeIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::schemeIsSet() const +{ + return schemeIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetscheme() +{ + schemeIsSet_ = false; +} + +std::map& ShowPullSourcesConfigResponse::getAdditionalArgs() +{ + return additionalArgs_; +} + +void ShowPullSourcesConfigResponse::setAdditionalArgs(const std::map& value) +{ + additionalArgs_ = value; + additionalArgsIsSet_ = true; +} + +bool ShowPullSourcesConfigResponse::additionalArgsIsSet() const +{ + return additionalArgsIsSet_; +} + +void ShowPullSourcesConfigResponse::unsetadditionalArgs() +{ + additionalArgsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateDelayConfigRequest.cpp b/live/src/v1/model/UpdateDelayConfigRequest.cpp new file mode 100644 index 000000000..44caf7ba5 --- /dev/null +++ b/live/src/v1/model/UpdateDelayConfigRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/live/v1/model/UpdateDelayConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateDelayConfigRequest::UpdateDelayConfigRequest() +{ + bodyIsSet_ = false; +} + +UpdateDelayConfigRequest::~UpdateDelayConfigRequest() = default; + +void UpdateDelayConfigRequest::validate() +{ +} + +web::json::value UpdateDelayConfigRequest::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 UpdateDelayConfigRequest::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()) + { + ModifyDelayConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +ModifyDelayConfig UpdateDelayConfigRequest::getBody() const +{ + return body_; +} + +void UpdateDelayConfigRequest::setBody(const ModifyDelayConfig& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateDelayConfigRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateDelayConfigRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateDelayConfigResponse.cpp b/live/src/v1/model/UpdateDelayConfigResponse.cpp new file mode 100644 index 000000000..804bf0478 --- /dev/null +++ b/live/src/v1/model/UpdateDelayConfigResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/live/v1/model/UpdateDelayConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateDelayConfigResponse::UpdateDelayConfigResponse() +{ +} + +UpdateDelayConfigResponse::~UpdateDelayConfigResponse() = default; + +void UpdateDelayConfigResponse::validate() +{ +} + +web::json::value UpdateDelayConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool UpdateDelayConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateGeoBlockingConfigRequest.cpp b/live/src/v1/model/UpdateGeoBlockingConfigRequest.cpp new file mode 100644 index 000000000..d73289c3b --- /dev/null +++ b/live/src/v1/model/UpdateGeoBlockingConfigRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/live/v1/model/UpdateGeoBlockingConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateGeoBlockingConfigRequest::UpdateGeoBlockingConfigRequest() +{ + playDomain_ = ""; + playDomainIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateGeoBlockingConfigRequest::~UpdateGeoBlockingConfigRequest() = default; + +void UpdateGeoBlockingConfigRequest::validate() +{ +} + +web::json::value UpdateGeoBlockingConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(playDomainIsSet_) { + val[utility::conversions::to_string_t("play_domain")] = ModelBase::toJson(playDomain_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateGeoBlockingConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("play_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("play_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPlayDomain(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()) + { + GeoBlockingConfigInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateGeoBlockingConfigRequest::getPlayDomain() const +{ + return playDomain_; +} + +void UpdateGeoBlockingConfigRequest::setPlayDomain(const std::string& value) +{ + playDomain_ = value; + playDomainIsSet_ = true; +} + +bool UpdateGeoBlockingConfigRequest::playDomainIsSet() const +{ + return playDomainIsSet_; +} + +void UpdateGeoBlockingConfigRequest::unsetplayDomain() +{ + playDomainIsSet_ = false; +} + +GeoBlockingConfigInfo UpdateGeoBlockingConfigRequest::getBody() const +{ + return body_; +} + +void UpdateGeoBlockingConfigRequest::setBody(const GeoBlockingConfigInfo& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateGeoBlockingConfigRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateGeoBlockingConfigRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateGeoBlockingConfigResponse.cpp b/live/src/v1/model/UpdateGeoBlockingConfigResponse.cpp new file mode 100644 index 000000000..85c8e06c8 --- /dev/null +++ b/live/src/v1/model/UpdateGeoBlockingConfigResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/UpdateGeoBlockingConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateGeoBlockingConfigResponse::UpdateGeoBlockingConfigResponse() +{ + xRequestId_ = ""; + xRequestIdIsSet_ = false; +} + +UpdateGeoBlockingConfigResponse::~UpdateGeoBlockingConfigResponse() = default; + +void UpdateGeoBlockingConfigResponse::validate() +{ +} + +web::json::value UpdateGeoBlockingConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xRequestIdIsSet_) { + val[utility::conversions::to_string_t("X-Request-Id")] = ModelBase::toJson(xRequestId_); + } + + return val; +} +bool UpdateGeoBlockingConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Request-Id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Request-Id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXRequestId(refVal); + } + } + return ok; +} + + +std::string UpdateGeoBlockingConfigResponse::getXRequestId() const +{ + return xRequestId_; +} + +void UpdateGeoBlockingConfigResponse::setXRequestId(const std::string& value) +{ + xRequestId_ = value; + xRequestIdIsSet_ = true; +} + +bool UpdateGeoBlockingConfigResponse::xRequestIdIsSet() const +{ + return xRequestIdIsSet_; +} + +void UpdateGeoBlockingConfigResponse::unsetxRequestId() +{ + xRequestIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateIpAuthListRequest.cpp b/live/src/v1/model/UpdateIpAuthListRequest.cpp new file mode 100644 index 000000000..201513e1b --- /dev/null +++ b/live/src/v1/model/UpdateIpAuthListRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/live/v1/model/UpdateIpAuthListRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateIpAuthListRequest::UpdateIpAuthListRequest() +{ + bodyIsSet_ = false; +} + +UpdateIpAuthListRequest::~UpdateIpAuthListRequest() = default; + +void UpdateIpAuthListRequest::validate() +{ +} + +web::json::value UpdateIpAuthListRequest::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 UpdateIpAuthListRequest::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()) + { + IPAuthInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +IPAuthInfo UpdateIpAuthListRequest::getBody() const +{ + return body_; +} + +void UpdateIpAuthListRequest::setBody(const IPAuthInfo& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateIpAuthListRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateIpAuthListRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdateIpAuthListResponse.cpp b/live/src/v1/model/UpdateIpAuthListResponse.cpp new file mode 100644 index 000000000..79e073c1c --- /dev/null +++ b/live/src/v1/model/UpdateIpAuthListResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/live/v1/model/UpdateIpAuthListResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdateIpAuthListResponse::UpdateIpAuthListResponse() +{ + xRequestId_ = ""; + xRequestIdIsSet_ = false; +} + +UpdateIpAuthListResponse::~UpdateIpAuthListResponse() = default; + +void UpdateIpAuthListResponse::validate() +{ +} + +web::json::value UpdateIpAuthListResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xRequestIdIsSet_) { + val[utility::conversions::to_string_t("X-Request-Id")] = ModelBase::toJson(xRequestId_); + } + + return val; +} +bool UpdateIpAuthListResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Request-Id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Request-Id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXRequestId(refVal); + } + } + return ok; +} + + +std::string UpdateIpAuthListResponse::getXRequestId() const +{ + return xRequestId_; +} + +void UpdateIpAuthListResponse::setXRequestId(const std::string& value) +{ + xRequestId_ = value; + xRequestIdIsSet_ = true; +} + +bool UpdateIpAuthListResponse::xRequestIdIsSet() const +{ + return xRequestIdIsSet_; +} + +void UpdateIpAuthListResponse::unsetxRequestId() +{ + xRequestIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdatePublishTemplateRequest.cpp b/live/src/v1/model/UpdatePublishTemplateRequest.cpp new file mode 100644 index 000000000..73b758906 --- /dev/null +++ b/live/src/v1/model/UpdatePublishTemplateRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/live/v1/model/UpdatePublishTemplateRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdatePublishTemplateRequest::UpdatePublishTemplateRequest() +{ + domain_ = ""; + domainIsSet_ = false; + bodyIsSet_ = false; +} + +UpdatePublishTemplateRequest::~UpdatePublishTemplateRequest() = default; + +void UpdatePublishTemplateRequest::validate() +{ +} + +web::json::value UpdatePublishTemplateRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdatePublishTemplateRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(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()) + { + CallbackUrl refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdatePublishTemplateRequest::getDomain() const +{ + return domain_; +} + +void UpdatePublishTemplateRequest::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool UpdatePublishTemplateRequest::domainIsSet() const +{ + return domainIsSet_; +} + +void UpdatePublishTemplateRequest::unsetdomain() +{ + domainIsSet_ = false; +} + +CallbackUrl UpdatePublishTemplateRequest::getBody() const +{ + return body_; +} + +void UpdatePublishTemplateRequest::setBody(const CallbackUrl& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdatePublishTemplateRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdatePublishTemplateRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdatePublishTemplateResponse.cpp b/live/src/v1/model/UpdatePublishTemplateResponse.cpp new file mode 100644 index 000000000..e2b58b500 --- /dev/null +++ b/live/src/v1/model/UpdatePublishTemplateResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/live/v1/model/UpdatePublishTemplateResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdatePublishTemplateResponse::UpdatePublishTemplateResponse() +{ +} + +UpdatePublishTemplateResponse::~UpdatePublishTemplateResponse() = default; + +void UpdatePublishTemplateResponse::validate() +{ +} + +web::json::value UpdatePublishTemplateResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool UpdatePublishTemplateResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdatePullSourcesConfigRequest.cpp b/live/src/v1/model/UpdatePullSourcesConfigRequest.cpp new file mode 100644 index 000000000..d6df1d2d4 --- /dev/null +++ b/live/src/v1/model/UpdatePullSourcesConfigRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/live/v1/model/UpdatePullSourcesConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdatePullSourcesConfigRequest::UpdatePullSourcesConfigRequest() +{ + bodyIsSet_ = false; +} + +UpdatePullSourcesConfigRequest::~UpdatePullSourcesConfigRequest() = default; + +void UpdatePullSourcesConfigRequest::validate() +{ +} + +web::json::value UpdatePullSourcesConfigRequest::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 UpdatePullSourcesConfigRequest::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()) + { + ModifyPullSourcesConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +ModifyPullSourcesConfig UpdatePullSourcesConfigRequest::getBody() const +{ + return body_; +} + +void UpdatePullSourcesConfigRequest::setBody(const ModifyPullSourcesConfig& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdatePullSourcesConfigRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdatePullSourcesConfigRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/UpdatePullSourcesConfigResponse.cpp b/live/src/v1/model/UpdatePullSourcesConfigResponse.cpp new file mode 100644 index 000000000..53c0d7186 --- /dev/null +++ b/live/src/v1/model/UpdatePullSourcesConfigResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/live/v1/model/UpdatePullSourcesConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +UpdatePullSourcesConfigResponse::UpdatePullSourcesConfigResponse() +{ +} + +UpdatePullSourcesConfigResponse::~UpdatePullSourcesConfigResponse() = default; + +void UpdatePullSourcesConfigResponse::validate() +{ +} + +web::json::value UpdatePullSourcesConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool UpdatePullSourcesConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/lts/include/huaweicloud/lts/v2/LtsClient.h b/lts/include/huaweicloud/lts/v2/LtsClient.h index b40abb1e1..36b37d49e 100644 --- a/lts/include/huaweicloud/lts/v2/LtsClient.h +++ b/lts/include/huaweicloud/lts/v2/LtsClient.h @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -86,6 +88,7 @@ #include #include #include +#include #include #include #include @@ -136,6 +139,7 @@ #include #include #include +#include #include #include #include @@ -250,6 +254,14 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsClient : public Client std::shared_ptr createAccessConfig( CreateAccessConfigRequest &request ); + // 新建跨账号日志接入 + // + // 新建跨账号日志接入 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createAgencyAccess( + CreateAgencyAccessRequest &request + ); // 创建仪表盘 // // 创建仪表盘 diff --git a/lts/include/huaweicloud/lts/v2/LtsMeta.h b/lts/include/huaweicloud/lts/v2/LtsMeta.h index e1a179343..f9fe30b8d 100644 --- a/lts/include/huaweicloud/lts/v2/LtsMeta.h +++ b/lts/include/huaweicloud/lts/v2/LtsMeta.h @@ -14,6 +14,7 @@ using namespace HuaweiCloud::Sdk::Core::Http; class HUAWEICLOUD_LTS_V2_EXPORT LtsMeta { public: static HttpRequestDef genRequestDefForCreateAccessConfig(); + static HttpRequestDef genRequestDefForCreateAgencyAccess(); static HttpRequestDef genRequestDefForCreateDashBoard(); static HttpRequestDef genRequestDefForCreateDashboardGroup(); static HttpRequestDef genRequestDefForCreateHostGroup(); diff --git a/lts/include/huaweicloud/lts/v2/LtsRegion.h b/lts/include/huaweicloud/lts/v2/LtsRegion.h index 222d226f1..1abe802ff 100644 --- a/lts/include/huaweicloud/lts/v2/LtsRegion.h +++ b/lts/include/huaweicloud/lts/v2/LtsRegion.h @@ -106,6 +106,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsRegion { { "https://lts.tr-west-1.myhuaweicloud.com" }); + regions["me-east-1"] = Region("me-east-1", + { + "https://lts.me-east-1.myhuaweicloud.com" + }); return regions; } private: diff --git a/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessRequest.h b/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessRequest.h new file mode 100644 index 000000000..20f9a30f6 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT CreateAgencyAccessRequest + : public ModelBase +{ +public: + CreateAgencyAccessRequest(); + virtual ~CreateAgencyAccessRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateAgencyAccessRequest members + + /// + /// 该字段填为:application/json;charset=utf8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// + /// + + PreviewAgencyLogAccessReqListBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const PreviewAgencyLogAccessReqListBody& value); + + +protected: + std::string contentType_; + bool contentTypeIsSet_; + PreviewAgencyLogAccessReqListBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateAgencyAccessRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessResponse.h b/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessResponse.h new file mode 100644 index 000000000..6143d45cf --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/CreateAgencyAccessResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT CreateAgencyAccessResponse + : public ModelBase, public HttpResponse +{ +public: + CreateAgencyAccessResponse(); + virtual ~CreateAgencyAccessResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateAgencyAccessResponse members + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateAgencyAccessResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/CreateKeywordsAlarmRuleRequestBody.h b/lts/include/huaweicloud/lts/v2/model/CreateKeywordsAlarmRuleRequestBody.h index 85693a2c3..934b12f8f 100644 --- a/lts/include/huaweicloud/lts/v2/model/CreateKeywordsAlarmRuleRequestBody.h +++ b/lts/include/huaweicloud/lts/v2/model/CreateKeywordsAlarmRuleRequestBody.h @@ -43,7 +43,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateKeywordsAlarmRuleRequestBody /// CreateKeywordsAlarmRuleRequestBody members /// - /// 关键词告警名称 + /// 关键词告警名称 >不能以点和下划线开头或以点结尾。 /// std::string getKeywordsAlarmRuleName() const; @@ -150,6 +150,24 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateKeywordsAlarmRuleRequestBody void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string keywordsAlarmRuleName_; @@ -176,6 +194,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateKeywordsAlarmRuleRequestBody bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleFrequency.h b/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleFrequency.h new file mode 100644 index 000000000..ebbfe3f45 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleFrequency.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateSqlAlarmRuleFrequency_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateSqlAlarmRuleFrequency_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT CreateSqlAlarmRuleFrequency + : public ModelBase +{ +public: + CreateSqlAlarmRuleFrequency(); + virtual ~CreateSqlAlarmRuleFrequency(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateSqlAlarmRuleFrequency members + + /// + /// 时间类型。 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// 当字段type为\"CRON\"时取该字段。 + /// + + std::string getCronExpr() const; + bool cronExprIsSet() const; + void unsetcronExpr(); + void setCronExpr(const std::string& value); + + /// + /// 当字段type为\"DAILY\"或者\"WEEKLY\"时取该字段。 DAILY:最小值:0,最大值:23 WEEKLY:最小值:0,最大值:23 + /// + + int32_t getHourOfDay() const; + bool hourOfDayIsSet() const; + void unsethourOfDay(); + void setHourOfDay(int32_t value); + + /// + /// 当字段type为\"WEEKLY\"时取该字段(周日~周六)。 + /// + + int32_t getDayOfWeek() const; + bool dayOfWeekIsSet() const; + void unsetdayOfWeek(); + void setDayOfWeek(int32_t value); + + /// + /// 当字段type为\"FIXED_RATE\"时取该字段(当fixed_rate_unit单位为minute,最大值60;当fixed_rate_unit单位为hour,最大值24)。 + /// + + int32_t getFixedRate() const; + bool fixedRateIsSet() const; + void unsetfixedRate(); + void setFixedRate(int32_t value); + + /// + /// 时间单位。 + /// + + std::string getFixedRateUnit() const; + bool fixedRateUnitIsSet() const; + void unsetfixedRateUnit(); + void setFixedRateUnit(const std::string& value); + + +protected: + std::string type_; + bool typeIsSet_; + std::string cronExpr_; + bool cronExprIsSet_; + int32_t hourOfDay_; + bool hourOfDayIsSet_; + int32_t dayOfWeek_; + bool dayOfWeekIsSet_; + int32_t fixedRate_; + bool fixedRateIsSet_; + std::string fixedRateUnit_; + bool fixedRateUnitIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateSqlAlarmRuleFrequency_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleRequestBody.h b/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleRequestBody.h index 558b956d8..1eb3cd86b 100644 --- a/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleRequestBody.h +++ b/lts/include/huaweicloud/lts/v2/model/CreateSqlAlarmRuleRequestBody.h @@ -9,11 +9,11 @@ #include #include +#include #include #include #include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -51,6 +51,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateSqlAlarmRuleRequestBody void unsetsqlAlarmRuleName(); void setSqlAlarmRuleName(const std::string& value); + /// + /// 是否管道符sql查询 + /// + + bool isIsCssSql() const; + bool isCssSqlIsSet() const; + void unsetisCssSql(); + void setIsCssSql(bool value); + /// /// SQL告警信息描述 /// @@ -73,10 +82,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateSqlAlarmRuleRequestBody /// /// - Frequency getFrequency() const; + CreateSqlAlarmRuleFrequency getFrequency() const; bool frequencyIsSet() const; void unsetfrequency(); - void setFrequency(const Frequency& value); + void setFrequency(const CreateSqlAlarmRuleFrequency& value); /// /// 条件表达式 @@ -159,15 +168,35 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateSqlAlarmRuleRequestBody void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string sqlAlarmRuleName_; bool sqlAlarmRuleNameIsSet_; + bool isCssSql_; + bool isCssSqlIsSet_; std::string sqlAlarmRuleDescription_; bool sqlAlarmRuleDescriptionIsSet_; std::vector sqlRequests_; bool sqlRequestsIsSet_; - Frequency frequency_; + CreateSqlAlarmRuleFrequency frequency_; bool frequencyIsSet_; std::string conditionExpression_; bool conditionExpressionIsSet_; @@ -187,6 +216,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateSqlAlarmRuleRequestBody bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/FrequencyRespBody.h b/lts/include/huaweicloud/lts/v2/model/FrequencyRespBody.h new file mode 100644 index 000000000..2e4432eb4 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/FrequencyRespBody.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_FrequencyRespBody_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_FrequencyRespBody_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT FrequencyRespBody + : public ModelBase +{ +public: + FrequencyRespBody(); + virtual ~FrequencyRespBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// FrequencyRespBody members + + /// + /// 时间类型。 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// 当字段type为\"CRON\"时取该字段。 + /// + + std::string getCronExpr() const; + bool cronExprIsSet() const; + void unsetcronExpr(); + void setCronExpr(const std::string& value); + + /// + /// 当字段type为\"DAILY\"或者\"WEEKLY\"时取该字段。 + /// + + int32_t getHourOfDay() const; + bool hourOfDayIsSet() const; + void unsethourOfDay(); + void setHourOfDay(int32_t value); + + /// + /// 当字段type为\"WEEKLY\"时取该字段(周日~周六)。 + /// + + int32_t getDayOfWeek() const; + bool dayOfWeekIsSet() const; + void unsetdayOfWeek(); + void setDayOfWeek(int32_t value); + + /// + /// 当字段type为\"FIXED_RATE\"时取该字段(当fixed_rate_unit单位为minute,最大值60;当fixed_rate_unit单位为hour,最大值24)。 + /// + + int32_t getFixedRate() const; + bool fixedRateIsSet() const; + void unsetfixedRate(); + void setFixedRate(int32_t value); + + /// + /// 时间单位枚举值: + /// + + std::string getFixedRateUnit() const; + bool fixedRateUnitIsSet() const; + void unsetfixedRateUnit(); + void setFixedRateUnit(const std::string& value); + + +protected: + std::string type_; + bool typeIsSet_; + std::string cronExpr_; + bool cronExprIsSet_; + int32_t hourOfDay_; + bool hourOfDayIsSet_; + int32_t dayOfWeek_; + bool dayOfWeekIsSet_; + int32_t fixedRate_; + bool fixedRateIsSet_; + std::string fixedRateUnit_; + bool fixedRateUnitIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_FrequencyRespBody_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/KeywordsAlarmRuleRespList.h b/lts/include/huaweicloud/lts/v2/model/KeywordsAlarmRuleRespList.h index 5327ce368..5605fa903 100644 --- a/lts/include/huaweicloud/lts/v2/model/KeywordsAlarmRuleRespList.h +++ b/lts/include/huaweicloud/lts/v2/model/KeywordsAlarmRuleRespList.h @@ -133,7 +133,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setDomainId(const std::string& value); /// - /// 创建时间(毫秒时间戳) + /// 创建时间(毫秒时间戳) /// int64_t getCreateTime() const; @@ -142,7 +142,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setCreateTime(int64_t value); /// - /// 更新时间(毫秒时间戳) + /// 更新时间(毫秒时间戳) /// int64_t getUpdateTime() const; @@ -151,7 +151,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setUpdateTime(int64_t value); /// - /// 主题 + /// 通知主题 /// std::vector& getTopics(); @@ -160,7 +160,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setTopics(const std::vector& value); /// - /// + /// 消息模板名称 /// std::string getTemplateName() const; @@ -169,7 +169,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setTemplateName(const std::string& value); /// - /// + /// 告警状态 /// std::string getStatus() const; @@ -178,7 +178,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setStatus(const std::string& value); /// - /// 触发条件:触发次数;默认为1 + /// 触发条件:触发周期;默认为1 /// int32_t getTriggerConditionCount() const; @@ -187,7 +187,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void setTriggerConditionCount(int32_t value); /// - /// 触发条件:触发周期;默认为1 + /// 触发条件:触发次数;默认为1 /// int32_t getTriggerConditionFrequency() const; @@ -213,6 +213,24 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string projectId_; @@ -253,6 +271,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT KeywordsAlarmRuleRespList bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/KeywordsResBody.h b/lts/include/huaweicloud/lts/v2/model/KeywordsResBody.h new file mode 100644 index 000000000..261a0f46e --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/KeywordsResBody.h @@ -0,0 +1,152 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_KeywordsResBody_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_KeywordsResBody_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT KeywordsResBody + : public ModelBase +{ +public: + KeywordsResBody(); + virtual ~KeywordsResBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// KeywordsResBody members + + /// + /// 日志流id + /// + + std::string getLogStreamId() const; + bool logStreamIdIsSet() const; + void unsetlogStreamId(); + void setLogStreamId(const std::string& value); + + /// + /// 日志流名称 + /// + + std::string getLogStreamName() const; + bool logStreamNameIsSet() const; + void unsetlogStreamName(); + void setLogStreamName(const std::string& value); + + /// + /// 日志组id + /// + + std::string getLogGroupId() const; + bool logGroupIdIsSet() const; + void unsetlogGroupId(); + void setLogGroupId(const std::string& value); + + /// + /// 日志组名称 + /// + + std::string getLogGroupName() const; + bool logGroupNameIsSet() const; + void unsetlogGroupName(); + void setLogGroupName(const std::string& value); + + /// + /// 关键词 + /// + + std::string getKeywords() const; + bool keywordsIsSet() const; + void unsetkeywords(); + void setKeywords(const std::string& value); + + /// + /// 条件 + /// + + std::string getCondition() const; + bool conditionIsSet() const; + void unsetcondition(); + void setCondition(const std::string& value); + + /// + /// 行数 + /// + + int32_t getNumber() const; + bool numberIsSet() const; + void unsetnumber(); + void setNumber(int32_t value); + + /// + /// 查询执行任务时最近数据的时间范围,最大值为60 + /// + + int32_t getSearchTimeRange() const; + bool searchTimeRangeIsSet() const; + void unsetsearchTimeRange(); + void setSearchTimeRange(int32_t value); + + /// + /// 查询时间单位 + /// + + std::string getSearchTimeRangeUnit() const; + bool searchTimeRangeUnitIsSet() const; + void unsetsearchTimeRangeUnit(); + void setSearchTimeRangeUnit(const std::string& value); + + +protected: + std::string logStreamId_; + bool logStreamIdIsSet_; + std::string logStreamName_; + bool logStreamNameIsSet_; + std::string logGroupId_; + bool logGroupIdIsSet_; + std::string logGroupName_; + bool logGroupNameIsSet_; + std::string keywords_; + bool keywordsIsSet_; + std::string condition_; + bool conditionIsSet_; + int32_t number_; + bool numberIsSet_; + int32_t searchTimeRange_; + bool searchTimeRangeIsSet_; + std::string searchTimeRangeUnit_; + bool searchTimeRangeUnitIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_KeywordsResBody_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/LTSAccessConfigInfoRespon200.h b/lts/include/huaweicloud/lts/v2/model/LTSAccessConfigInfoRespon200.h new file mode 100644 index 000000000..387d33e09 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/LTSAccessConfigInfoRespon200.h @@ -0,0 +1,165 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSAccessConfigInfoRespon200_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSAccessConfigInfoRespon200_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT LTSAccessConfigInfoRespon200 + : public ModelBase +{ +public: + LTSAccessConfigInfoRespon200(); + virtual ~LTSAccessConfigInfoRespon200(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// LTSAccessConfigInfoRespon200 members + + /// + /// 跨账号日志接入id + /// + + std::string getAccessConfigId() const; + bool accessConfigIdIsSet() const; + void unsetaccessConfigId(); + void setAccessConfigId(const std::string& value); + + /// + /// 项目ID + /// + + std::string getProjectId() const; + bool projectIdIsSet() const; + void unsetprojectId(); + void setProjectId(const std::string& value); + + /// + /// 跨账号日志接入名称 + /// + + std::string getAccessConfigName() const; + bool accessConfigNameIsSet() const; + void unsetaccessConfigName(); + void setAccessConfigName(const std::string& value); + + /// + /// 跨账号日志接入类型 + /// + + Object getAccessConfigType() const; + bool accessConfigTypeIsSet() const; + void unsetaccessConfigType(); + void setAccessConfigType(const Object& value); + + /// + /// 日志组ID + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志组名称 + /// + + std::string getLogGroupName() const; + bool logGroupNameIsSet() const; + void unsetlogGroupName(); + void setLogGroupName(const std::string& value); + + /// + /// 日志流ID + /// + + std::string getLogStreamId() const; + bool logStreamIdIsSet() const; + void unsetlogStreamId(); + void setLogStreamId(const std::string& value); + + /// + /// 日志流名称 + /// + + std::string getLogStreamName() const; + bool logStreamNameIsSet() const; + void unsetlogStreamName(); + void setLogStreamName(const std::string& value); + + /// + /// 创建时间 + /// + + int64_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int64_t value); + + /// + /// + /// + + PreviewAgencyLogAccessReqBody getAgencyLogAccess() const; + bool agencyLogAccessIsSet() const; + void unsetagencyLogAccess(); + void setAgencyLogAccess(const PreviewAgencyLogAccessReqBody& value); + + +protected: + std::string accessConfigId_; + bool accessConfigIdIsSet_; + std::string projectId_; + bool projectIdIsSet_; + std::string accessConfigName_; + bool accessConfigNameIsSet_; + Object accessConfigType_; + bool accessConfigTypeIsSet_; + std::string groupId_; + bool groupIdIsSet_; + std::string logGroupName_; + bool logGroupNameIsSet_; + std::string logStreamId_; + bool logStreamIdIsSet_; + std::string logStreamName_; + bool logStreamNameIsSet_; + int64_t createTime_; + bool createTimeIsSet_; + PreviewAgencyLogAccessReqBody agencyLogAccess_; + bool agencyLogAccessIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSAccessConfigInfoRespon200_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqBody.h b/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqBody.h new file mode 100644 index 000000000..d30a55124 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqBody.h @@ -0,0 +1,207 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqBody_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqBody_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT PreviewAgencyLogAccessReqBody + : public ModelBase +{ +public: + PreviewAgencyLogAccessReqBody(); + virtual ~PreviewAgencyLogAccessReqBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PreviewAgencyLogAccessReqBody members + + /// + /// 日志访问类型 + /// + + std::string getAgencyAccessType() const; + bool agencyAccessTypeIsSet() const; + void unsetagencyAccessType(); + void setAgencyAccessType(const std::string& value); + + /// + /// 跨账号日志接入配置名称 + /// + + std::string getAgencyLogAccess() const; + bool agencyLogAccessIsSet() const; + void unsetagencyLogAccess(); + void setAgencyLogAccess(const std::string& value); + + /// + /// 委托日志流名称 + /// + + std::string getLogAgencyStreamName() const; + bool logAgencyStreamNameIsSet() const; + void unsetlogAgencyStreamName(); + void setLogAgencyStreamName(const std::string& value); + + /// + /// 委托日志流id + /// + + std::string getLogAgencyStreamId() const; + bool logAgencyStreamIdIsSet() const; + void unsetlogAgencyStreamId(); + void setLogAgencyStreamId(const std::string& value); + + /// + /// 委托日志组名称 + /// + + std::string getLogAgencyGroupName() const; + bool logAgencyGroupNameIsSet() const; + void unsetlogAgencyGroupName(); + void setLogAgencyGroupName(const std::string& value); + + /// + /// 委托日志组id + /// + + std::string getLogAgencyGroupId() const; + bool logAgencyGroupIdIsSet() const; + void unsetlogAgencyGroupId(); + void setLogAgencyGroupId(const std::string& value); + + /// + /// 被委托日志流名称 + /// + + std::string getLogBeAgencystreamName() const; + bool logBeAgencystreamNameIsSet() const; + void unsetlogBeAgencystreamName(); + void setLogBeAgencystreamName(const std::string& value); + + /// + /// 被委托日志流id + /// + + std::string getLogBeAgencystreamId() const; + bool logBeAgencystreamIdIsSet() const; + void unsetlogBeAgencystreamId(); + void setLogBeAgencystreamId(const std::string& value); + + /// + /// 被委托日志组名称 + /// + + std::string getLogBeAgencygroupName() const; + bool logBeAgencygroupNameIsSet() const; + void unsetlogBeAgencygroupName(); + void setLogBeAgencygroupName(const std::string& value); + + /// + /// 被委托日志组id + /// + + std::string getLogBeAgencygroupId() const; + bool logBeAgencygroupIdIsSet() const; + void unsetlogBeAgencygroupId(); + void setLogBeAgencygroupId(const std::string& value); + + /// + /// 被委托项目id + /// + + std::string getBeAgencyProjectId() const; + bool beAgencyProjectIdIsSet() const; + void unsetbeAgencyProjectId(); + void setBeAgencyProjectId(const std::string& value); + + /// + /// 委托项目id + /// + + std::string getAgencyProjectId() const; + bool agencyProjectIdIsSet() const; + void unsetagencyProjectId(); + void setAgencyProjectId(const std::string& value); + + /// + /// 委托账号名称 + /// + + std::string getAgencyDomainName() const; + bool agencyDomainNameIsSet() const; + void unsetagencyDomainName(); + void setAgencyDomainName(const std::string& value); + + /// + /// 委托名称 + /// + + std::string getAgencyName() const; + bool agencyNameIsSet() const; + void unsetagencyName(); + void setAgencyName(const std::string& value); + + +protected: + std::string agencyAccessType_; + bool agencyAccessTypeIsSet_; + std::string agencyLogAccess_; + bool agencyLogAccessIsSet_; + std::string logAgencyStreamName_; + bool logAgencyStreamNameIsSet_; + std::string logAgencyStreamId_; + bool logAgencyStreamIdIsSet_; + std::string logAgencyGroupName_; + bool logAgencyGroupNameIsSet_; + std::string logAgencyGroupId_; + bool logAgencyGroupIdIsSet_; + std::string logBeAgencystreamName_; + bool logBeAgencystreamNameIsSet_; + std::string logBeAgencystreamId_; + bool logBeAgencystreamIdIsSet_; + std::string logBeAgencygroupName_; + bool logBeAgencygroupNameIsSet_; + std::string logBeAgencygroupId_; + bool logBeAgencygroupIdIsSet_; + std::string beAgencyProjectId_; + bool beAgencyProjectIdIsSet_; + std::string agencyProjectId_; + bool agencyProjectIdIsSet_; + std::string agencyDomainName_; + bool agencyDomainNameIsSet_; + std::string agencyName_; + bool agencyNameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqBody_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqListBody.h b/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqListBody.h new file mode 100644 index 000000000..b294a3eac --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqListBody.h @@ -0,0 +1,65 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqListBody_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqListBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LTS_V2_EXPORT PreviewAgencyLogAccessReqListBody + : public ModelBase +{ +public: + PreviewAgencyLogAccessReqListBody(); + virtual ~PreviewAgencyLogAccessReqListBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PreviewAgencyLogAccessReqListBody members + + /// + /// 预览代理列表 + /// + + std::vector& getPreviewAgencyList(); + bool previewAgencyListIsSet() const; + void unsetpreviewAgencyList(); + void setPreviewAgencyList(const std::vector& value); + + +protected: + std::vector previewAgencyList_; + bool previewAgencyListIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_PreviewAgencyLogAccessReqListBody_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/SqlAlarmRuleRespList.h b/lts/include/huaweicloud/lts/v2/model/SqlAlarmRuleRespList.h index 0ad979f0c..1cc63978f 100644 --- a/lts/include/huaweicloud/lts/v2/model/SqlAlarmRuleRespList.h +++ b/lts/include/huaweicloud/lts/v2/model/SqlAlarmRuleRespList.h @@ -12,8 +12,8 @@ #include #include #include +#include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -51,6 +51,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void unsetsqlAlarmRuleName(); void setSqlAlarmRuleName(const std::string& value); + /// + /// 是否管道符sql查询 + /// + + bool isIsCssSql() const; + bool isCssSqlIsSet() const; + void unsetisCssSql(); + void setIsCssSql(bool value); + /// /// SQL告警规则id /// @@ -82,10 +91,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList /// /// - Frequency getFrequency() const; + FrequencyRespBody getFrequency() const; bool frequencyIsSet() const; void unsetfrequency(); - void setFrequency(const Frequency& value); + void setFrequency(const FrequencyRespBody& value); /// /// 条件表达式 @@ -133,7 +142,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void setDomainId(const std::string& value); /// - /// 创建时间(毫秒时间戳) + /// 创建时间(毫秒时间戳) /// int64_t getCreateTime() const; @@ -142,7 +151,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void setCreateTime(int64_t value); /// - /// 更新时间(毫秒时间戳) + /// 更新时间(毫秒时间戳) /// int64_t getUpdateTime() const; @@ -151,7 +160,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void setUpdateTime(int64_t value); /// - /// + /// 消息模板名称 /// std::string getTemplateName() const; @@ -160,7 +169,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void setTemplateName(const std::string& value); /// - /// + /// 告警状态 /// std::string getStatus() const; @@ -169,7 +178,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void setStatus(const std::string& value); /// - /// 触发条件:触发次数;默认为1 + /// 触发条件:触发周期;默认为1 /// int32_t getTriggerConditionCount() const; @@ -204,17 +213,37 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string sqlAlarmRuleName_; bool sqlAlarmRuleNameIsSet_; + bool isCssSql_; + bool isCssSqlIsSet_; std::string sqlAlarmRuleId_; bool sqlAlarmRuleIdIsSet_; std::string sqlAlarmRuleDescription_; bool sqlAlarmRuleDescriptionIsSet_; std::vector sqlRequests_; bool sqlRequestsIsSet_; - Frequency frequency_; + FrequencyRespBody frequency_; bool frequencyIsSet_; std::string conditionExpression_; bool conditionExpressionIsSet_; @@ -242,6 +271,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT SqlAlarmRuleRespList bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleRequestBody.h b/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleRequestBody.h index 1ffe07d66..77c2895aa 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleRequestBody.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleRequestBody.h @@ -168,6 +168,24 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleRequestBody void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string keywordsAlarmRuleId_; @@ -198,6 +216,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleRequestBody bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleResponse.h b/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleResponse.h index 2b77d51f6..d17e94a05 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleResponse.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateKeywordsAlarmRuleResponse.h @@ -10,10 +10,10 @@ #include #include -#include +#include #include +#include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -73,19 +73,19 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse /// 关键词详细信息 /// - std::vector& getKeywordsRequests(); + std::vector& getKeywordsRequests(); bool keywordsRequestsIsSet() const; void unsetkeywordsRequests(); - void setKeywordsRequests(const std::vector& value); + void setKeywordsRequests(const std::vector& value); /// /// /// - Frequency getFrequency() const; + FrequencyRespBody getFrequency() const; bool frequencyIsSet() const; void unsetfrequency(); - void setFrequency(const Frequency& value); + void setFrequency(const FrequencyRespBody& value); /// /// 告警级别 @@ -133,7 +133,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse void setUpdateTime(int64_t value); /// - /// 语言 + /// 邮件附加信息语言 /// std::string getLanguage() const; @@ -151,7 +151,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse void setProjectId(const std::string& value); /// - /// 主题信息 + /// 通知主题 /// std::vector& getTopics(); @@ -160,7 +160,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse void setTopics(const std::vector& value); /// - /// 暂无 + /// 情况表述 /// std::string getConditionExpression() const; @@ -169,7 +169,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse void setConditionExpression(const std::string& value); /// - /// 暂无 + /// 索引id /// std::string getIndexId() const; @@ -177,6 +177,24 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse void unsetindexId(); void setIndexId(const std::string& value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string keywordsAlarmRuleId_; @@ -185,9 +203,9 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse bool keywordsAlarmRuleNameIsSet_; std::string keywordsAlarmRuleDescription_; bool keywordsAlarmRuleDescriptionIsSet_; - std::vector keywordsRequests_; + std::vector keywordsRequests_; bool keywordsRequestsIsSet_; - Frequency frequency_; + FrequencyRespBody frequency_; bool frequencyIsSet_; std::string keywordsAlarmLevel_; bool keywordsAlarmLevelIsSet_; @@ -209,6 +227,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateKeywordsAlarmRuleResponse bool conditionExpressionIsSet_; std::string indexId_; bool indexIdIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleRequestBody.h b/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleRequestBody.h index ff484e075..57fd967fd 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleRequestBody.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleRequestBody.h @@ -9,11 +9,11 @@ #include #include +#include #include #include #include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -60,6 +60,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleRequestBody void unsetsqlAlarmRuleName(); void setSqlAlarmRuleName(const std::string& value); + /// + /// 是否管道符sql查询 + /// + + bool isIsCssSql() const; + bool isCssSqlIsSet() const; + void unsetisCssSql(); + void setIsCssSql(bool value); + /// /// SQL告警信息描述 /// @@ -82,10 +91,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleRequestBody /// /// - Frequency getFrequency() const; + CreateSqlAlarmRuleFrequency getFrequency() const; bool frequencyIsSet() const; void unsetfrequency(); - void setFrequency(const Frequency& value); + void setFrequency(const CreateSqlAlarmRuleFrequency& value); /// /// 条件表达式 @@ -177,17 +186,37 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleRequestBody void unsetrecoveryPolicy(); void setRecoveryPolicy(int32_t value); + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: std::string sqlAlarmRuleId_; bool sqlAlarmRuleIdIsSet_; std::string sqlAlarmRuleName_; bool sqlAlarmRuleNameIsSet_; + bool isCssSql_; + bool isCssSqlIsSet_; std::string sqlAlarmRuleDescription_; bool sqlAlarmRuleDescriptionIsSet_; std::vector sqlRequests_; bool sqlRequestsIsSet_; - Frequency frequency_; + CreateSqlAlarmRuleFrequency frequency_; bool frequencyIsSet_; std::string conditionExpression_; bool conditionExpressionIsSet_; @@ -209,6 +238,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleRequestBody bool whetherRecoveryPolicyIsSet_; int32_t recoveryPolicy_; bool recoveryPolicyIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleResponse.h b/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleResponse.h index fe86e577a..ae76f5086 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleResponse.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateSqlAlarmRuleResponse.h @@ -12,8 +12,8 @@ #include #include #include +#include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -43,34 +43,34 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse /// UpdateSqlAlarmRuleResponse members /// - /// 测试 + /// SQL告警名称 /// - std::string getId() const; - bool idIsSet() const; - void unsetid(); - void setId(const std::string& value); + std::string getSqlAlarmRuleName() const; + bool sqlAlarmRuleNameIsSet() const; + void unsetsqlAlarmRuleName(); + void setSqlAlarmRuleName(const std::string& value); /// - /// 测试 + /// 是否管道符sql查询 /// - std::string getIndexId() const; - bool indexIdIsSet() const; - void unsetindexId(); - void setIndexId(const std::string& value); + bool isIsCssSql() const; + bool isCssSqlIsSet() const; + void unsetisCssSql(); + void setIsCssSql(bool value); /// - /// 测试 + /// 索引id /// - std::string getLanguage() const; - bool languageIsSet() const; - void unsetlanguage(); - void setLanguage(const std::string& value); + std::string getIndexId() const; + bool indexIdIsSet() const; + void unsetindexId(); + void setIndexId(const std::string& value); /// - /// 测试 + /// 项目id /// std::string getProjectId() const; @@ -78,15 +78,6 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse void unsetprojectId(); void setProjectId(const std::string& value); - /// - /// SQL告警名称 - /// - - std::string getSqlAlarmRuleName() const; - bool sqlAlarmRuleNameIsSet() const; - void unsetsqlAlarmRuleName(); - void setSqlAlarmRuleName(const std::string& value); - /// /// SQL告警规则id /// @@ -118,10 +109,10 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse /// /// - Frequency getFrequency() const; + FrequencyRespBody getFrequency() const; bool frequencyIsSet() const; void unsetfrequency(); - void setFrequency(const Frequency& value); + void setFrequency(const FrequencyRespBody& value); /// /// 条件表达式 @@ -160,7 +151,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse void setDomainId(const std::string& value); /// - /// 创建时间(毫秒时间戳) + /// 创建时间(毫秒时间戳) /// int64_t getCreateTime() const; @@ -169,7 +160,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse void setCreateTime(int64_t value); /// - /// 更新时间(毫秒时间戳) + /// 更新时间(毫秒时间戳) /// int64_t getUpdateTime() const; @@ -186,25 +177,59 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse void unsettopics(); void setTopics(const std::vector& value); + /// + /// 邮件附加信息语言 + /// + + std::string getLanguage() const; + bool languageIsSet() const; + void unsetlanguage(); + void setLanguage(const std::string& value); + + /// + /// 规则ID。 + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 通知频率,单位(分钟) + /// + + int32_t getNotificationFrequency() const; + bool notificationFrequencyIsSet() const; + void unsetnotificationFrequency(); + void setNotificationFrequency(int32_t value); + + /// + /// 告警行动规则名称 >alarm_action_rule_name和notification_save_rule可以选填一个,如果都填,优先选择alarm_action_rule_name + /// + + std::string getAlarmActionRuleName() const; + bool alarmActionRuleNameIsSet() const; + void unsetalarmActionRuleName(); + void setAlarmActionRuleName(const std::string& value); + protected: - std::string id_; - bool idIsSet_; + std::string sqlAlarmRuleName_; + bool sqlAlarmRuleNameIsSet_; + bool isCssSql_; + bool isCssSqlIsSet_; std::string indexId_; bool indexIdIsSet_; - std::string language_; - bool languageIsSet_; std::string projectId_; bool projectIdIsSet_; - std::string sqlAlarmRuleName_; - bool sqlAlarmRuleNameIsSet_; std::string sqlAlarmRuleId_; bool sqlAlarmRuleIdIsSet_; std::string sqlAlarmRuleDescription_; bool sqlAlarmRuleDescriptionIsSet_; std::vector sqlRequests_; bool sqlRequestsIsSet_; - Frequency frequency_; + FrequencyRespBody frequency_; bool frequencyIsSet_; std::string conditionExpression_; bool conditionExpressionIsSet_; @@ -220,6 +245,14 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateSqlAlarmRuleResponse bool updateTimeIsSet_; std::vector topics_; bool topicsIsSet_; + std::string language_; + bool languageIsSet_; + std::string id_; + bool idIsSet_; + int32_t notificationFrequency_; + bool notificationFrequencyIsSet_; + std::string alarmActionRuleName_; + bool alarmActionRuleNameIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/lts/src/v2/LtsClient.cpp b/lts/src/v2/LtsClient.cpp index 1426df0a7..dd19e5e15 100644 --- a/lts/src/v2/LtsClient.cpp +++ b/lts/src/v2/LtsClient.cpp @@ -76,6 +76,50 @@ std::shared_ptr LtsClient::createAccessConfig(Create return localVarResult; } +std::shared_ptr LtsClient::createAgencyAccess(CreateAgencyAccessRequest &request) +{ + std::string localVarPath = "/v2.0/{project_id}/lts/createAgencyAccess"; + + 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;charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + 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("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForCreateAgencyAccess()); + + 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 LtsClient::createDashBoard(CreateDashBoardRequest &request) { std::string localVarPath = "/v2/{project_id}/dashboard"; diff --git a/lts/src/v2/LtsMeta.cpp b/lts/src/v2/LtsMeta.cpp index 22be21c95..9811ff8a3 100644 --- a/lts/src/v2/LtsMeta.cpp +++ b/lts/src/v2/LtsMeta.cpp @@ -22,6 +22,23 @@ HttpRequestDef LtsMeta::genRequestDefForCreateAccessConfig() { return reqDefBuilder; } +HttpRequestDef LtsMeta::genRequestDefForCreateAgencyAccess() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef LtsMeta::genRequestDefForCreateDashBoard() { HttpRequestDef reqDefBuilder; FieldDef headerParamContentType; diff --git a/lts/src/v2/model/CreateAgencyAccessRequest.cpp b/lts/src/v2/model/CreateAgencyAccessRequest.cpp new file mode 100644 index 000000000..9f900ce21 --- /dev/null +++ b/lts/src/v2/model/CreateAgencyAccessRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/lts/v2/model/CreateAgencyAccessRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +CreateAgencyAccessRequest::CreateAgencyAccessRequest() +{ + contentType_ = ""; + contentTypeIsSet_ = false; + bodyIsSet_ = false; +} + +CreateAgencyAccessRequest::~CreateAgencyAccessRequest() = default; + +void CreateAgencyAccessRequest::validate() +{ +} + +web::json::value CreateAgencyAccessRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool CreateAgencyAccessRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("Content-Type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("Content-Type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContentType(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()) + { + PreviewAgencyLogAccessReqListBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateAgencyAccessRequest::getContentType() const +{ + return contentType_; +} + +void CreateAgencyAccessRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool CreateAgencyAccessRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void CreateAgencyAccessRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +PreviewAgencyLogAccessReqListBody CreateAgencyAccessRequest::getBody() const +{ + return body_; +} + +void CreateAgencyAccessRequest::setBody(const PreviewAgencyLogAccessReqListBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateAgencyAccessRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateAgencyAccessRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/CreateAgencyAccessResponse.cpp b/lts/src/v2/model/CreateAgencyAccessResponse.cpp new file mode 100644 index 000000000..6812243af --- /dev/null +++ b/lts/src/v2/model/CreateAgencyAccessResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/lts/v2/model/CreateAgencyAccessResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +CreateAgencyAccessResponse::CreateAgencyAccessResponse() +{ + bodyIsSet_ = false; +} + +CreateAgencyAccessResponse::~CreateAgencyAccessResponse() = default; + +void CreateAgencyAccessResponse::validate() +{ +} + +web::json::value CreateAgencyAccessResponse::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 CreateAgencyAccessResponse::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()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::vector& CreateAgencyAccessResponse::getBody() +{ + return body_; +} + +void CreateAgencyAccessResponse::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateAgencyAccessResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateAgencyAccessResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/CreateKeywordsAlarmRuleRequestBody.cpp b/lts/src/v2/model/CreateKeywordsAlarmRuleRequestBody.cpp index 15972c495..6fe28e9cd 100644 --- a/lts/src/v2/model/CreateKeywordsAlarmRuleRequestBody.cpp +++ b/lts/src/v2/model/CreateKeywordsAlarmRuleRequestBody.cpp @@ -33,6 +33,10 @@ CreateKeywordsAlarmRuleRequestBody::CreateKeywordsAlarmRuleRequestBody() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } CreateKeywordsAlarmRuleRequestBody::~CreateKeywordsAlarmRuleRequestBody() = default; @@ -81,6 +85,12 @@ web::json::value CreateKeywordsAlarmRuleRequestBody::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -196,6 +206,24 @@ bool CreateKeywordsAlarmRuleRequestBody::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -452,6 +480,48 @@ void CreateKeywordsAlarmRuleRequestBody::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t CreateKeywordsAlarmRuleRequestBody::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void CreateKeywordsAlarmRuleRequestBody::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool CreateKeywordsAlarmRuleRequestBody::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void CreateKeywordsAlarmRuleRequestBody::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string CreateKeywordsAlarmRuleRequestBody::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void CreateKeywordsAlarmRuleRequestBody::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool CreateKeywordsAlarmRuleRequestBody::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void CreateKeywordsAlarmRuleRequestBody::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/CreateSqlAlarmRuleFrequency.cpp b/lts/src/v2/model/CreateSqlAlarmRuleFrequency.cpp new file mode 100644 index 000000000..a30d52013 --- /dev/null +++ b/lts/src/v2/model/CreateSqlAlarmRuleFrequency.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/lts/v2/model/CreateSqlAlarmRuleFrequency.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +CreateSqlAlarmRuleFrequency::CreateSqlAlarmRuleFrequency() +{ + type_ = ""; + typeIsSet_ = false; + cronExpr_ = ""; + cronExprIsSet_ = false; + hourOfDay_ = 0; + hourOfDayIsSet_ = false; + dayOfWeek_ = 0; + dayOfWeekIsSet_ = false; + fixedRate_ = 0; + fixedRateIsSet_ = false; + fixedRateUnit_ = ""; + fixedRateUnitIsSet_ = false; +} + +CreateSqlAlarmRuleFrequency::~CreateSqlAlarmRuleFrequency() = default; + +void CreateSqlAlarmRuleFrequency::validate() +{ +} + +web::json::value CreateSqlAlarmRuleFrequency::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(cronExprIsSet_) { + val[utility::conversions::to_string_t("cron_expr")] = ModelBase::toJson(cronExpr_); + } + if(hourOfDayIsSet_) { + val[utility::conversions::to_string_t("hour_of_day")] = ModelBase::toJson(hourOfDay_); + } + if(dayOfWeekIsSet_) { + val[utility::conversions::to_string_t("day_of_week")] = ModelBase::toJson(dayOfWeek_); + } + if(fixedRateIsSet_) { + val[utility::conversions::to_string_t("fixed_rate")] = ModelBase::toJson(fixedRate_); + } + if(fixedRateUnitIsSet_) { + val[utility::conversions::to_string_t("fixed_rate_unit")] = ModelBase::toJson(fixedRateUnit_); + } + + return val; +} +bool CreateSqlAlarmRuleFrequency::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cron_expr"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cron_expr")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCronExpr(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("hour_of_day"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hour_of_day")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHourOfDay(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("day_of_week"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("day_of_week")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDayOfWeek(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fixed_rate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fixed_rate")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFixedRate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fixed_rate_unit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fixed_rate_unit")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFixedRateUnit(refVal); + } + } + return ok; +} + + +std::string CreateSqlAlarmRuleFrequency::getType() const +{ + return type_; +} + +void CreateSqlAlarmRuleFrequency::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::typeIsSet() const +{ + return typeIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsettype() +{ + typeIsSet_ = false; +} + +std::string CreateSqlAlarmRuleFrequency::getCronExpr() const +{ + return cronExpr_; +} + +void CreateSqlAlarmRuleFrequency::setCronExpr(const std::string& value) +{ + cronExpr_ = value; + cronExprIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::cronExprIsSet() const +{ + return cronExprIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsetcronExpr() +{ + cronExprIsSet_ = false; +} + +int32_t CreateSqlAlarmRuleFrequency::getHourOfDay() const +{ + return hourOfDay_; +} + +void CreateSqlAlarmRuleFrequency::setHourOfDay(int32_t value) +{ + hourOfDay_ = value; + hourOfDayIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::hourOfDayIsSet() const +{ + return hourOfDayIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsethourOfDay() +{ + hourOfDayIsSet_ = false; +} + +int32_t CreateSqlAlarmRuleFrequency::getDayOfWeek() const +{ + return dayOfWeek_; +} + +void CreateSqlAlarmRuleFrequency::setDayOfWeek(int32_t value) +{ + dayOfWeek_ = value; + dayOfWeekIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::dayOfWeekIsSet() const +{ + return dayOfWeekIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsetdayOfWeek() +{ + dayOfWeekIsSet_ = false; +} + +int32_t CreateSqlAlarmRuleFrequency::getFixedRate() const +{ + return fixedRate_; +} + +void CreateSqlAlarmRuleFrequency::setFixedRate(int32_t value) +{ + fixedRate_ = value; + fixedRateIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::fixedRateIsSet() const +{ + return fixedRateIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsetfixedRate() +{ + fixedRateIsSet_ = false; +} + +std::string CreateSqlAlarmRuleFrequency::getFixedRateUnit() const +{ + return fixedRateUnit_; +} + +void CreateSqlAlarmRuleFrequency::setFixedRateUnit(const std::string& value) +{ + fixedRateUnit_ = value; + fixedRateUnitIsSet_ = true; +} + +bool CreateSqlAlarmRuleFrequency::fixedRateUnitIsSet() const +{ + return fixedRateUnitIsSet_; +} + +void CreateSqlAlarmRuleFrequency::unsetfixedRateUnit() +{ + fixedRateUnitIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/CreateSqlAlarmRuleRequestBody.cpp b/lts/src/v2/model/CreateSqlAlarmRuleRequestBody.cpp index 76d0702fa..76f71e3bc 100644 --- a/lts/src/v2/model/CreateSqlAlarmRuleRequestBody.cpp +++ b/lts/src/v2/model/CreateSqlAlarmRuleRequestBody.cpp @@ -14,6 +14,8 @@ CreateSqlAlarmRuleRequestBody::CreateSqlAlarmRuleRequestBody() { sqlAlarmRuleName_ = ""; sqlAlarmRuleNameIsSet_ = false; + isCssSql_ = false; + isCssSqlIsSet_ = false; sqlAlarmRuleDescription_ = ""; sqlAlarmRuleDescriptionIsSet_ = false; sqlRequestsIsSet_ = false; @@ -35,6 +37,10 @@ CreateSqlAlarmRuleRequestBody::CreateSqlAlarmRuleRequestBody() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } CreateSqlAlarmRuleRequestBody::~CreateSqlAlarmRuleRequestBody() = default; @@ -50,6 +56,9 @@ web::json::value CreateSqlAlarmRuleRequestBody::toJson() const if(sqlAlarmRuleNameIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_name")] = ModelBase::toJson(sqlAlarmRuleName_); } + if(isCssSqlIsSet_) { + val[utility::conversions::to_string_t("is_css_sql")] = ModelBase::toJson(isCssSql_); + } if(sqlAlarmRuleDescriptionIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_description")] = ModelBase::toJson(sqlAlarmRuleDescription_); } @@ -86,6 +95,12 @@ web::json::value CreateSqlAlarmRuleRequestBody::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -102,6 +117,15 @@ bool CreateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) setSqlAlarmRuleName(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_css_sql"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_css_sql")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCssSql(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_description"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_description")); if(!fieldValue.is_null()) @@ -124,7 +148,7 @@ bool CreateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency")); if(!fieldValue.is_null()) { - Frequency refVal; + CreateSqlAlarmRuleFrequency refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setFrequency(refVal); } @@ -210,6 +234,24 @@ bool CreateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -235,6 +277,27 @@ void CreateSqlAlarmRuleRequestBody::unsetsqlAlarmRuleName() sqlAlarmRuleNameIsSet_ = false; } +bool CreateSqlAlarmRuleRequestBody::isIsCssSql() const +{ + return isCssSql_; +} + +void CreateSqlAlarmRuleRequestBody::setIsCssSql(bool value) +{ + isCssSql_ = value; + isCssSqlIsSet_ = true; +} + +bool CreateSqlAlarmRuleRequestBody::isCssSqlIsSet() const +{ + return isCssSqlIsSet_; +} + +void CreateSqlAlarmRuleRequestBody::unsetisCssSql() +{ + isCssSqlIsSet_ = false; +} + std::string CreateSqlAlarmRuleRequestBody::getSqlAlarmRuleDescription() const { return sqlAlarmRuleDescription_; @@ -277,12 +340,12 @@ void CreateSqlAlarmRuleRequestBody::unsetsqlRequests() sqlRequestsIsSet_ = false; } -Frequency CreateSqlAlarmRuleRequestBody::getFrequency() const +CreateSqlAlarmRuleFrequency CreateSqlAlarmRuleRequestBody::getFrequency() const { return frequency_; } -void CreateSqlAlarmRuleRequestBody::setFrequency(const Frequency& value) +void CreateSqlAlarmRuleRequestBody::setFrequency(const CreateSqlAlarmRuleFrequency& value) { frequency_ = value; frequencyIsSet_ = true; @@ -487,6 +550,48 @@ void CreateSqlAlarmRuleRequestBody::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t CreateSqlAlarmRuleRequestBody::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void CreateSqlAlarmRuleRequestBody::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool CreateSqlAlarmRuleRequestBody::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void CreateSqlAlarmRuleRequestBody::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string CreateSqlAlarmRuleRequestBody::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void CreateSqlAlarmRuleRequestBody::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool CreateSqlAlarmRuleRequestBody::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void CreateSqlAlarmRuleRequestBody::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/FrequencyRespBody.cpp b/lts/src/v2/model/FrequencyRespBody.cpp new file mode 100644 index 000000000..a1c443d8a --- /dev/null +++ b/lts/src/v2/model/FrequencyRespBody.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/lts/v2/model/FrequencyRespBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +FrequencyRespBody::FrequencyRespBody() +{ + type_ = ""; + typeIsSet_ = false; + cronExpr_ = ""; + cronExprIsSet_ = false; + hourOfDay_ = 0; + hourOfDayIsSet_ = false; + dayOfWeek_ = 0; + dayOfWeekIsSet_ = false; + fixedRate_ = 0; + fixedRateIsSet_ = false; + fixedRateUnit_ = ""; + fixedRateUnitIsSet_ = false; +} + +FrequencyRespBody::~FrequencyRespBody() = default; + +void FrequencyRespBody::validate() +{ +} + +web::json::value FrequencyRespBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(cronExprIsSet_) { + val[utility::conversions::to_string_t("cron_expr")] = ModelBase::toJson(cronExpr_); + } + if(hourOfDayIsSet_) { + val[utility::conversions::to_string_t("hour_of_day")] = ModelBase::toJson(hourOfDay_); + } + if(dayOfWeekIsSet_) { + val[utility::conversions::to_string_t("day_of_week")] = ModelBase::toJson(dayOfWeek_); + } + if(fixedRateIsSet_) { + val[utility::conversions::to_string_t("fixed_rate")] = ModelBase::toJson(fixedRate_); + } + if(fixedRateUnitIsSet_) { + val[utility::conversions::to_string_t("fixed_rate_unit")] = ModelBase::toJson(fixedRateUnit_); + } + + return val; +} +bool FrequencyRespBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cron_expr"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cron_expr")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCronExpr(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("hour_of_day"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hour_of_day")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHourOfDay(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("day_of_week"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("day_of_week")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDayOfWeek(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fixed_rate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fixed_rate")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFixedRate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fixed_rate_unit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fixed_rate_unit")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFixedRateUnit(refVal); + } + } + return ok; +} + + +std::string FrequencyRespBody::getType() const +{ + return type_; +} + +void FrequencyRespBody::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool FrequencyRespBody::typeIsSet() const +{ + return typeIsSet_; +} + +void FrequencyRespBody::unsettype() +{ + typeIsSet_ = false; +} + +std::string FrequencyRespBody::getCronExpr() const +{ + return cronExpr_; +} + +void FrequencyRespBody::setCronExpr(const std::string& value) +{ + cronExpr_ = value; + cronExprIsSet_ = true; +} + +bool FrequencyRespBody::cronExprIsSet() const +{ + return cronExprIsSet_; +} + +void FrequencyRespBody::unsetcronExpr() +{ + cronExprIsSet_ = false; +} + +int32_t FrequencyRespBody::getHourOfDay() const +{ + return hourOfDay_; +} + +void FrequencyRespBody::setHourOfDay(int32_t value) +{ + hourOfDay_ = value; + hourOfDayIsSet_ = true; +} + +bool FrequencyRespBody::hourOfDayIsSet() const +{ + return hourOfDayIsSet_; +} + +void FrequencyRespBody::unsethourOfDay() +{ + hourOfDayIsSet_ = false; +} + +int32_t FrequencyRespBody::getDayOfWeek() const +{ + return dayOfWeek_; +} + +void FrequencyRespBody::setDayOfWeek(int32_t value) +{ + dayOfWeek_ = value; + dayOfWeekIsSet_ = true; +} + +bool FrequencyRespBody::dayOfWeekIsSet() const +{ + return dayOfWeekIsSet_; +} + +void FrequencyRespBody::unsetdayOfWeek() +{ + dayOfWeekIsSet_ = false; +} + +int32_t FrequencyRespBody::getFixedRate() const +{ + return fixedRate_; +} + +void FrequencyRespBody::setFixedRate(int32_t value) +{ + fixedRate_ = value; + fixedRateIsSet_ = true; +} + +bool FrequencyRespBody::fixedRateIsSet() const +{ + return fixedRateIsSet_; +} + +void FrequencyRespBody::unsetfixedRate() +{ + fixedRateIsSet_ = false; +} + +std::string FrequencyRespBody::getFixedRateUnit() const +{ + return fixedRateUnit_; +} + +void FrequencyRespBody::setFixedRateUnit(const std::string& value) +{ + fixedRateUnit_ = value; + fixedRateUnitIsSet_ = true; +} + +bool FrequencyRespBody::fixedRateUnitIsSet() const +{ + return fixedRateUnitIsSet_; +} + +void FrequencyRespBody::unsetfixedRateUnit() +{ + fixedRateUnitIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/KeywordsAlarmRuleRespList.cpp b/lts/src/v2/model/KeywordsAlarmRuleRespList.cpp index ca18180f5..8dd32ce01 100644 --- a/lts/src/v2/model/KeywordsAlarmRuleRespList.cpp +++ b/lts/src/v2/model/KeywordsAlarmRuleRespList.cpp @@ -47,6 +47,10 @@ KeywordsAlarmRuleRespList::KeywordsAlarmRuleRespList() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } KeywordsAlarmRuleRespList::~KeywordsAlarmRuleRespList() = default; @@ -116,6 +120,12 @@ web::json::value KeywordsAlarmRuleRespList::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -294,6 +304,24 @@ bool KeywordsAlarmRuleRespList::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -697,6 +725,48 @@ void KeywordsAlarmRuleRespList::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t KeywordsAlarmRuleRespList::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void KeywordsAlarmRuleRespList::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool KeywordsAlarmRuleRespList::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void KeywordsAlarmRuleRespList::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string KeywordsAlarmRuleRespList::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void KeywordsAlarmRuleRespList::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool KeywordsAlarmRuleRespList::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void KeywordsAlarmRuleRespList::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/KeywordsResBody.cpp b/lts/src/v2/model/KeywordsResBody.cpp new file mode 100644 index 000000000..1cf47f3dd --- /dev/null +++ b/lts/src/v2/model/KeywordsResBody.cpp @@ -0,0 +1,359 @@ + + +#include "huaweicloud/lts/v2/model/KeywordsResBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +KeywordsResBody::KeywordsResBody() +{ + logStreamId_ = ""; + logStreamIdIsSet_ = false; + logStreamName_ = ""; + logStreamNameIsSet_ = false; + logGroupId_ = ""; + logGroupIdIsSet_ = false; + logGroupName_ = ""; + logGroupNameIsSet_ = false; + keywords_ = ""; + keywordsIsSet_ = false; + condition_ = ""; + conditionIsSet_ = false; + number_ = 0; + numberIsSet_ = false; + searchTimeRange_ = 0; + searchTimeRangeIsSet_ = false; + searchTimeRangeUnit_ = ""; + searchTimeRangeUnitIsSet_ = false; +} + +KeywordsResBody::~KeywordsResBody() = default; + +void KeywordsResBody::validate() +{ +} + +web::json::value KeywordsResBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(logStreamIdIsSet_) { + val[utility::conversions::to_string_t("log_stream_id")] = ModelBase::toJson(logStreamId_); + } + if(logStreamNameIsSet_) { + val[utility::conversions::to_string_t("log_stream_name")] = ModelBase::toJson(logStreamName_); + } + if(logGroupIdIsSet_) { + val[utility::conversions::to_string_t("log_group_id")] = ModelBase::toJson(logGroupId_); + } + if(logGroupNameIsSet_) { + val[utility::conversions::to_string_t("log_group_name")] = ModelBase::toJson(logGroupName_); + } + if(keywordsIsSet_) { + val[utility::conversions::to_string_t("keywords")] = ModelBase::toJson(keywords_); + } + if(conditionIsSet_) { + val[utility::conversions::to_string_t("condition")] = ModelBase::toJson(condition_); + } + if(numberIsSet_) { + val[utility::conversions::to_string_t("number")] = ModelBase::toJson(number_); + } + if(searchTimeRangeIsSet_) { + val[utility::conversions::to_string_t("search_time_range")] = ModelBase::toJson(searchTimeRange_); + } + if(searchTimeRangeUnitIsSet_) { + val[utility::conversions::to_string_t("search_time_range_unit")] = ModelBase::toJson(searchTimeRangeUnit_); + } + + return val; +} +bool KeywordsResBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("log_stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_stream_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_stream_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogStreamName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("keywords"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("keywords")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setKeywords(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("condition"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("condition")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCondition(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("number"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("number")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNumber(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("search_time_range"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("search_time_range")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSearchTimeRange(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("search_time_range_unit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("search_time_range_unit")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSearchTimeRangeUnit(refVal); + } + } + return ok; +} + + +std::string KeywordsResBody::getLogStreamId() const +{ + return logStreamId_; +} + +void KeywordsResBody::setLogStreamId(const std::string& value) +{ + logStreamId_ = value; + logStreamIdIsSet_ = true; +} + +bool KeywordsResBody::logStreamIdIsSet() const +{ + return logStreamIdIsSet_; +} + +void KeywordsResBody::unsetlogStreamId() +{ + logStreamIdIsSet_ = false; +} + +std::string KeywordsResBody::getLogStreamName() const +{ + return logStreamName_; +} + +void KeywordsResBody::setLogStreamName(const std::string& value) +{ + logStreamName_ = value; + logStreamNameIsSet_ = true; +} + +bool KeywordsResBody::logStreamNameIsSet() const +{ + return logStreamNameIsSet_; +} + +void KeywordsResBody::unsetlogStreamName() +{ + logStreamNameIsSet_ = false; +} + +std::string KeywordsResBody::getLogGroupId() const +{ + return logGroupId_; +} + +void KeywordsResBody::setLogGroupId(const std::string& value) +{ + logGroupId_ = value; + logGroupIdIsSet_ = true; +} + +bool KeywordsResBody::logGroupIdIsSet() const +{ + return logGroupIdIsSet_; +} + +void KeywordsResBody::unsetlogGroupId() +{ + logGroupIdIsSet_ = false; +} + +std::string KeywordsResBody::getLogGroupName() const +{ + return logGroupName_; +} + +void KeywordsResBody::setLogGroupName(const std::string& value) +{ + logGroupName_ = value; + logGroupNameIsSet_ = true; +} + +bool KeywordsResBody::logGroupNameIsSet() const +{ + return logGroupNameIsSet_; +} + +void KeywordsResBody::unsetlogGroupName() +{ + logGroupNameIsSet_ = false; +} + +std::string KeywordsResBody::getKeywords() const +{ + return keywords_; +} + +void KeywordsResBody::setKeywords(const std::string& value) +{ + keywords_ = value; + keywordsIsSet_ = true; +} + +bool KeywordsResBody::keywordsIsSet() const +{ + return keywordsIsSet_; +} + +void KeywordsResBody::unsetkeywords() +{ + keywordsIsSet_ = false; +} + +std::string KeywordsResBody::getCondition() const +{ + return condition_; +} + +void KeywordsResBody::setCondition(const std::string& value) +{ + condition_ = value; + conditionIsSet_ = true; +} + +bool KeywordsResBody::conditionIsSet() const +{ + return conditionIsSet_; +} + +void KeywordsResBody::unsetcondition() +{ + conditionIsSet_ = false; +} + +int32_t KeywordsResBody::getNumber() const +{ + return number_; +} + +void KeywordsResBody::setNumber(int32_t value) +{ + number_ = value; + numberIsSet_ = true; +} + +bool KeywordsResBody::numberIsSet() const +{ + return numberIsSet_; +} + +void KeywordsResBody::unsetnumber() +{ + numberIsSet_ = false; +} + +int32_t KeywordsResBody::getSearchTimeRange() const +{ + return searchTimeRange_; +} + +void KeywordsResBody::setSearchTimeRange(int32_t value) +{ + searchTimeRange_ = value; + searchTimeRangeIsSet_ = true; +} + +bool KeywordsResBody::searchTimeRangeIsSet() const +{ + return searchTimeRangeIsSet_; +} + +void KeywordsResBody::unsetsearchTimeRange() +{ + searchTimeRangeIsSet_ = false; +} + +std::string KeywordsResBody::getSearchTimeRangeUnit() const +{ + return searchTimeRangeUnit_; +} + +void KeywordsResBody::setSearchTimeRangeUnit(const std::string& value) +{ + searchTimeRangeUnit_ = value; + searchTimeRangeUnitIsSet_ = true; +} + +bool KeywordsResBody::searchTimeRangeUnitIsSet() const +{ + return searchTimeRangeUnitIsSet_; +} + +void KeywordsResBody::unsetsearchTimeRangeUnit() +{ + searchTimeRangeUnitIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/LTSAccessConfigInfoRespon200.cpp b/lts/src/v2/model/LTSAccessConfigInfoRespon200.cpp new file mode 100644 index 000000000..bc005aa98 --- /dev/null +++ b/lts/src/v2/model/LTSAccessConfigInfoRespon200.cpp @@ -0,0 +1,392 @@ + + +#include "huaweicloud/lts/v2/model/LTSAccessConfigInfoRespon200.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +LTSAccessConfigInfoRespon200::LTSAccessConfigInfoRespon200() +{ + accessConfigId_ = ""; + accessConfigIdIsSet_ = false; + projectId_ = ""; + projectIdIsSet_ = false; + accessConfigName_ = ""; + accessConfigNameIsSet_ = false; + accessConfigTypeIsSet_ = false; + groupId_ = ""; + groupIdIsSet_ = false; + logGroupName_ = ""; + logGroupNameIsSet_ = false; + logStreamId_ = ""; + logStreamIdIsSet_ = false; + logStreamName_ = ""; + logStreamNameIsSet_ = false; + createTime_ = 0L; + createTimeIsSet_ = false; + agencyLogAccessIsSet_ = false; +} + +LTSAccessConfigInfoRespon200::~LTSAccessConfigInfoRespon200() = default; + +void LTSAccessConfigInfoRespon200::validate() +{ +} + +web::json::value LTSAccessConfigInfoRespon200::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(accessConfigIdIsSet_) { + val[utility::conversions::to_string_t("access_config_id")] = ModelBase::toJson(accessConfigId_); + } + if(projectIdIsSet_) { + val[utility::conversions::to_string_t("project_id")] = ModelBase::toJson(projectId_); + } + if(accessConfigNameIsSet_) { + val[utility::conversions::to_string_t("access_config_name")] = ModelBase::toJson(accessConfigName_); + } + if(accessConfigTypeIsSet_) { + val[utility::conversions::to_string_t("access_config_type")] = ModelBase::toJson(accessConfigType_); + } + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(logGroupNameIsSet_) { + val[utility::conversions::to_string_t("log_group_name")] = ModelBase::toJson(logGroupName_); + } + if(logStreamIdIsSet_) { + val[utility::conversions::to_string_t("log_stream_id")] = ModelBase::toJson(logStreamId_); + } + if(logStreamNameIsSet_) { + val[utility::conversions::to_string_t("log_stream_name")] = ModelBase::toJson(logStreamName_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(agencyLogAccessIsSet_) { + val[utility::conversions::to_string_t("agency_log_access")] = ModelBase::toJson(agencyLogAccess_); + } + + return val; +} +bool LTSAccessConfigInfoRespon200::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("access_config_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("access_config_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccessConfigId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("access_config_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("access_config_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccessConfigName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("access_config_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("access_config_type")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccessConfigType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_stream_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_stream_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogStreamName(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()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("agency_log_access"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_log_access")); + if(!fieldValue.is_null()) + { + PreviewAgencyLogAccessReqBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyLogAccess(refVal); + } + } + return ok; +} + + +std::string LTSAccessConfigInfoRespon200::getAccessConfigId() const +{ + return accessConfigId_; +} + +void LTSAccessConfigInfoRespon200::setAccessConfigId(const std::string& value) +{ + accessConfigId_ = value; + accessConfigIdIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::accessConfigIdIsSet() const +{ + return accessConfigIdIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetaccessConfigId() +{ + accessConfigIdIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getProjectId() const +{ + return projectId_; +} + +void LTSAccessConfigInfoRespon200::setProjectId(const std::string& value) +{ + projectId_ = value; + projectIdIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::projectIdIsSet() const +{ + return projectIdIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetprojectId() +{ + projectIdIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getAccessConfigName() const +{ + return accessConfigName_; +} + +void LTSAccessConfigInfoRespon200::setAccessConfigName(const std::string& value) +{ + accessConfigName_ = value; + accessConfigNameIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::accessConfigNameIsSet() const +{ + return accessConfigNameIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetaccessConfigName() +{ + accessConfigNameIsSet_ = false; +} + +Object LTSAccessConfigInfoRespon200::getAccessConfigType() const +{ + return accessConfigType_; +} + +void LTSAccessConfigInfoRespon200::setAccessConfigType(const Object& value) +{ + accessConfigType_ = value; + accessConfigTypeIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::accessConfigTypeIsSet() const +{ + return accessConfigTypeIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetaccessConfigType() +{ + accessConfigTypeIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getGroupId() const +{ + return groupId_; +} + +void LTSAccessConfigInfoRespon200::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getLogGroupName() const +{ + return logGroupName_; +} + +void LTSAccessConfigInfoRespon200::setLogGroupName(const std::string& value) +{ + logGroupName_ = value; + logGroupNameIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::logGroupNameIsSet() const +{ + return logGroupNameIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetlogGroupName() +{ + logGroupNameIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getLogStreamId() const +{ + return logStreamId_; +} + +void LTSAccessConfigInfoRespon200::setLogStreamId(const std::string& value) +{ + logStreamId_ = value; + logStreamIdIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::logStreamIdIsSet() const +{ + return logStreamIdIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetlogStreamId() +{ + logStreamIdIsSet_ = false; +} + +std::string LTSAccessConfigInfoRespon200::getLogStreamName() const +{ + return logStreamName_; +} + +void LTSAccessConfigInfoRespon200::setLogStreamName(const std::string& value) +{ + logStreamName_ = value; + logStreamNameIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::logStreamNameIsSet() const +{ + return logStreamNameIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetlogStreamName() +{ + logStreamNameIsSet_ = false; +} + +int64_t LTSAccessConfigInfoRespon200::getCreateTime() const +{ + return createTime_; +} + +void LTSAccessConfigInfoRespon200::setCreateTime(int64_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +PreviewAgencyLogAccessReqBody LTSAccessConfigInfoRespon200::getAgencyLogAccess() const +{ + return agencyLogAccess_; +} + +void LTSAccessConfigInfoRespon200::setAgencyLogAccess(const PreviewAgencyLogAccessReqBody& value) +{ + agencyLogAccess_ = value; + agencyLogAccessIsSet_ = true; +} + +bool LTSAccessConfigInfoRespon200::agencyLogAccessIsSet() const +{ + return agencyLogAccessIsSet_; +} + +void LTSAccessConfigInfoRespon200::unsetagencyLogAccess() +{ + agencyLogAccessIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/PreviewAgencyLogAccessReqBody.cpp b/lts/src/v2/model/PreviewAgencyLogAccessReqBody.cpp new file mode 100644 index 000000000..392d64a73 --- /dev/null +++ b/lts/src/v2/model/PreviewAgencyLogAccessReqBody.cpp @@ -0,0 +1,534 @@ + + +#include "huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +PreviewAgencyLogAccessReqBody::PreviewAgencyLogAccessReqBody() +{ + agencyAccessType_ = ""; + agencyAccessTypeIsSet_ = false; + agencyLogAccess_ = ""; + agencyLogAccessIsSet_ = false; + logAgencyStreamName_ = ""; + logAgencyStreamNameIsSet_ = false; + logAgencyStreamId_ = ""; + logAgencyStreamIdIsSet_ = false; + logAgencyGroupName_ = ""; + logAgencyGroupNameIsSet_ = false; + logAgencyGroupId_ = ""; + logAgencyGroupIdIsSet_ = false; + logBeAgencystreamName_ = ""; + logBeAgencystreamNameIsSet_ = false; + logBeAgencystreamId_ = ""; + logBeAgencystreamIdIsSet_ = false; + logBeAgencygroupName_ = ""; + logBeAgencygroupNameIsSet_ = false; + logBeAgencygroupId_ = ""; + logBeAgencygroupIdIsSet_ = false; + beAgencyProjectId_ = ""; + beAgencyProjectIdIsSet_ = false; + agencyProjectId_ = ""; + agencyProjectIdIsSet_ = false; + agencyDomainName_ = ""; + agencyDomainNameIsSet_ = false; + agencyName_ = ""; + agencyNameIsSet_ = false; +} + +PreviewAgencyLogAccessReqBody::~PreviewAgencyLogAccessReqBody() = default; + +void PreviewAgencyLogAccessReqBody::validate() +{ +} + +web::json::value PreviewAgencyLogAccessReqBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(agencyAccessTypeIsSet_) { + val[utility::conversions::to_string_t("agency_access_type")] = ModelBase::toJson(agencyAccessType_); + } + if(agencyLogAccessIsSet_) { + val[utility::conversions::to_string_t("agency_log_access")] = ModelBase::toJson(agencyLogAccess_); + } + if(logAgencyStreamNameIsSet_) { + val[utility::conversions::to_string_t("log_agencyStream_name")] = ModelBase::toJson(logAgencyStreamName_); + } + if(logAgencyStreamIdIsSet_) { + val[utility::conversions::to_string_t("log_agencyStream_id")] = ModelBase::toJson(logAgencyStreamId_); + } + if(logAgencyGroupNameIsSet_) { + val[utility::conversions::to_string_t("log_agencyGroup_name")] = ModelBase::toJson(logAgencyGroupName_); + } + if(logAgencyGroupIdIsSet_) { + val[utility::conversions::to_string_t("log_agencyGroup_id")] = ModelBase::toJson(logAgencyGroupId_); + } + if(logBeAgencystreamNameIsSet_) { + val[utility::conversions::to_string_t("log_beAgencystream_name")] = ModelBase::toJson(logBeAgencystreamName_); + } + if(logBeAgencystreamIdIsSet_) { + val[utility::conversions::to_string_t("log_beAgencystream_id")] = ModelBase::toJson(logBeAgencystreamId_); + } + if(logBeAgencygroupNameIsSet_) { + val[utility::conversions::to_string_t("log_beAgencygroup_name")] = ModelBase::toJson(logBeAgencygroupName_); + } + if(logBeAgencygroupIdIsSet_) { + val[utility::conversions::to_string_t("log_beAgencygroup_id")] = ModelBase::toJson(logBeAgencygroupId_); + } + if(beAgencyProjectIdIsSet_) { + val[utility::conversions::to_string_t("be_agency_project_id")] = ModelBase::toJson(beAgencyProjectId_); + } + if(agencyProjectIdIsSet_) { + val[utility::conversions::to_string_t("agency_project_id")] = ModelBase::toJson(agencyProjectId_); + } + if(agencyDomainNameIsSet_) { + val[utility::conversions::to_string_t("agency_domain_name")] = ModelBase::toJson(agencyDomainName_); + } + if(agencyNameIsSet_) { + val[utility::conversions::to_string_t("agency_name")] = ModelBase::toJson(agencyName_); + } + + return val; +} +bool PreviewAgencyLogAccessReqBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("agency_access_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_access_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyAccessType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("agency_log_access"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_log_access")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyLogAccess(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_agencyStream_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_agencyStream_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogAgencyStreamName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_agencyStream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_agencyStream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogAgencyStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_agencyGroup_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_agencyGroup_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogAgencyGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_agencyGroup_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_agencyGroup_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogAgencyGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_beAgencystream_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_beAgencystream_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogBeAgencystreamName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_beAgencystream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_beAgencystream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogBeAgencystreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_beAgencygroup_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_beAgencygroup_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogBeAgencygroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_beAgencygroup_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_beAgencygroup_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogBeAgencygroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("be_agency_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("be_agency_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBeAgencyProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("agency_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("agency_domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("agency_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("agency_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAgencyName(refVal); + } + } + return ok; +} + + +std::string PreviewAgencyLogAccessReqBody::getAgencyAccessType() const +{ + return agencyAccessType_; +} + +void PreviewAgencyLogAccessReqBody::setAgencyAccessType(const std::string& value) +{ + agencyAccessType_ = value; + agencyAccessTypeIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::agencyAccessTypeIsSet() const +{ + return agencyAccessTypeIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetagencyAccessType() +{ + agencyAccessTypeIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getAgencyLogAccess() const +{ + return agencyLogAccess_; +} + +void PreviewAgencyLogAccessReqBody::setAgencyLogAccess(const std::string& value) +{ + agencyLogAccess_ = value; + agencyLogAccessIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::agencyLogAccessIsSet() const +{ + return agencyLogAccessIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetagencyLogAccess() +{ + agencyLogAccessIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogAgencyStreamName() const +{ + return logAgencyStreamName_; +} + +void PreviewAgencyLogAccessReqBody::setLogAgencyStreamName(const std::string& value) +{ + logAgencyStreamName_ = value; + logAgencyStreamNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logAgencyStreamNameIsSet() const +{ + return logAgencyStreamNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogAgencyStreamName() +{ + logAgencyStreamNameIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogAgencyStreamId() const +{ + return logAgencyStreamId_; +} + +void PreviewAgencyLogAccessReqBody::setLogAgencyStreamId(const std::string& value) +{ + logAgencyStreamId_ = value; + logAgencyStreamIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logAgencyStreamIdIsSet() const +{ + return logAgencyStreamIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogAgencyStreamId() +{ + logAgencyStreamIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogAgencyGroupName() const +{ + return logAgencyGroupName_; +} + +void PreviewAgencyLogAccessReqBody::setLogAgencyGroupName(const std::string& value) +{ + logAgencyGroupName_ = value; + logAgencyGroupNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logAgencyGroupNameIsSet() const +{ + return logAgencyGroupNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogAgencyGroupName() +{ + logAgencyGroupNameIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogAgencyGroupId() const +{ + return logAgencyGroupId_; +} + +void PreviewAgencyLogAccessReqBody::setLogAgencyGroupId(const std::string& value) +{ + logAgencyGroupId_ = value; + logAgencyGroupIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logAgencyGroupIdIsSet() const +{ + return logAgencyGroupIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogAgencyGroupId() +{ + logAgencyGroupIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogBeAgencystreamName() const +{ + return logBeAgencystreamName_; +} + +void PreviewAgencyLogAccessReqBody::setLogBeAgencystreamName(const std::string& value) +{ + logBeAgencystreamName_ = value; + logBeAgencystreamNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logBeAgencystreamNameIsSet() const +{ + return logBeAgencystreamNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogBeAgencystreamName() +{ + logBeAgencystreamNameIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogBeAgencystreamId() const +{ + return logBeAgencystreamId_; +} + +void PreviewAgencyLogAccessReqBody::setLogBeAgencystreamId(const std::string& value) +{ + logBeAgencystreamId_ = value; + logBeAgencystreamIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logBeAgencystreamIdIsSet() const +{ + return logBeAgencystreamIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogBeAgencystreamId() +{ + logBeAgencystreamIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogBeAgencygroupName() const +{ + return logBeAgencygroupName_; +} + +void PreviewAgencyLogAccessReqBody::setLogBeAgencygroupName(const std::string& value) +{ + logBeAgencygroupName_ = value; + logBeAgencygroupNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logBeAgencygroupNameIsSet() const +{ + return logBeAgencygroupNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogBeAgencygroupName() +{ + logBeAgencygroupNameIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getLogBeAgencygroupId() const +{ + return logBeAgencygroupId_; +} + +void PreviewAgencyLogAccessReqBody::setLogBeAgencygroupId(const std::string& value) +{ + logBeAgencygroupId_ = value; + logBeAgencygroupIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::logBeAgencygroupIdIsSet() const +{ + return logBeAgencygroupIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetlogBeAgencygroupId() +{ + logBeAgencygroupIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getBeAgencyProjectId() const +{ + return beAgencyProjectId_; +} + +void PreviewAgencyLogAccessReqBody::setBeAgencyProjectId(const std::string& value) +{ + beAgencyProjectId_ = value; + beAgencyProjectIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::beAgencyProjectIdIsSet() const +{ + return beAgencyProjectIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetbeAgencyProjectId() +{ + beAgencyProjectIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getAgencyProjectId() const +{ + return agencyProjectId_; +} + +void PreviewAgencyLogAccessReqBody::setAgencyProjectId(const std::string& value) +{ + agencyProjectId_ = value; + agencyProjectIdIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::agencyProjectIdIsSet() const +{ + return agencyProjectIdIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetagencyProjectId() +{ + agencyProjectIdIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getAgencyDomainName() const +{ + return agencyDomainName_; +} + +void PreviewAgencyLogAccessReqBody::setAgencyDomainName(const std::string& value) +{ + agencyDomainName_ = value; + agencyDomainNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::agencyDomainNameIsSet() const +{ + return agencyDomainNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetagencyDomainName() +{ + agencyDomainNameIsSet_ = false; +} + +std::string PreviewAgencyLogAccessReqBody::getAgencyName() const +{ + return agencyName_; +} + +void PreviewAgencyLogAccessReqBody::setAgencyName(const std::string& value) +{ + agencyName_ = value; + agencyNameIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqBody::agencyNameIsSet() const +{ + return agencyNameIsSet_; +} + +void PreviewAgencyLogAccessReqBody::unsetagencyName() +{ + agencyNameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/PreviewAgencyLogAccessReqListBody.cpp b/lts/src/v2/model/PreviewAgencyLogAccessReqListBody.cpp new file mode 100644 index 000000000..91c0950c2 --- /dev/null +++ b/lts/src/v2/model/PreviewAgencyLogAccessReqListBody.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/lts/v2/model/PreviewAgencyLogAccessReqListBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +PreviewAgencyLogAccessReqListBody::PreviewAgencyLogAccessReqListBody() +{ + previewAgencyListIsSet_ = false; +} + +PreviewAgencyLogAccessReqListBody::~PreviewAgencyLogAccessReqListBody() = default; + +void PreviewAgencyLogAccessReqListBody::validate() +{ +} + +web::json::value PreviewAgencyLogAccessReqListBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(previewAgencyListIsSet_) { + val[utility::conversions::to_string_t("preview_agency_list")] = ModelBase::toJson(previewAgencyList_); + } + + return val; +} +bool PreviewAgencyLogAccessReqListBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("preview_agency_list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("preview_agency_list")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPreviewAgencyList(refVal); + } + } + return ok; +} + + +std::vector& PreviewAgencyLogAccessReqListBody::getPreviewAgencyList() +{ + return previewAgencyList_; +} + +void PreviewAgencyLogAccessReqListBody::setPreviewAgencyList(const std::vector& value) +{ + previewAgencyList_ = value; + previewAgencyListIsSet_ = true; +} + +bool PreviewAgencyLogAccessReqListBody::previewAgencyListIsSet() const +{ + return previewAgencyListIsSet_; +} + +void PreviewAgencyLogAccessReqListBody::unsetpreviewAgencyList() +{ + previewAgencyListIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/SqlAlarmRuleRespList.cpp b/lts/src/v2/model/SqlAlarmRuleRespList.cpp index 7df0bd2f1..79af1f837 100644 --- a/lts/src/v2/model/SqlAlarmRuleRespList.cpp +++ b/lts/src/v2/model/SqlAlarmRuleRespList.cpp @@ -14,6 +14,8 @@ SqlAlarmRuleRespList::SqlAlarmRuleRespList() { sqlAlarmRuleName_ = ""; sqlAlarmRuleNameIsSet_ = false; + isCssSql_ = false; + isCssSqlIsSet_ = false; sqlAlarmRuleId_ = ""; sqlAlarmRuleIdIsSet_ = false; sqlAlarmRuleDescription_ = ""; @@ -45,6 +47,10 @@ SqlAlarmRuleRespList::SqlAlarmRuleRespList() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } SqlAlarmRuleRespList::~SqlAlarmRuleRespList() = default; @@ -60,6 +66,9 @@ web::json::value SqlAlarmRuleRespList::toJson() const if(sqlAlarmRuleNameIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_name")] = ModelBase::toJson(sqlAlarmRuleName_); } + if(isCssSqlIsSet_) { + val[utility::conversions::to_string_t("is_css_sql")] = ModelBase::toJson(isCssSql_); + } if(sqlAlarmRuleIdIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_id")] = ModelBase::toJson(sqlAlarmRuleId_); } @@ -111,6 +120,12 @@ web::json::value SqlAlarmRuleRespList::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -127,6 +142,15 @@ bool SqlAlarmRuleRespList::fromJson(const web::json::value& val) setSqlAlarmRuleName(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_css_sql"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_css_sql")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCssSql(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_id"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_id")); if(!fieldValue.is_null()) @@ -158,7 +182,7 @@ bool SqlAlarmRuleRespList::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency")); if(!fieldValue.is_null()) { - Frequency refVal; + FrequencyRespBody refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setFrequency(refVal); } @@ -280,6 +304,24 @@ bool SqlAlarmRuleRespList::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -305,6 +347,27 @@ void SqlAlarmRuleRespList::unsetsqlAlarmRuleName() sqlAlarmRuleNameIsSet_ = false; } +bool SqlAlarmRuleRespList::isIsCssSql() const +{ + return isCssSql_; +} + +void SqlAlarmRuleRespList::setIsCssSql(bool value) +{ + isCssSql_ = value; + isCssSqlIsSet_ = true; +} + +bool SqlAlarmRuleRespList::isCssSqlIsSet() const +{ + return isCssSqlIsSet_; +} + +void SqlAlarmRuleRespList::unsetisCssSql() +{ + isCssSqlIsSet_ = false; +} + std::string SqlAlarmRuleRespList::getSqlAlarmRuleId() const { return sqlAlarmRuleId_; @@ -368,12 +431,12 @@ void SqlAlarmRuleRespList::unsetsqlRequests() sqlRequestsIsSet_ = false; } -Frequency SqlAlarmRuleRespList::getFrequency() const +FrequencyRespBody SqlAlarmRuleRespList::getFrequency() const { return frequency_; } -void SqlAlarmRuleRespList::setFrequency(const Frequency& value) +void SqlAlarmRuleRespList::setFrequency(const FrequencyRespBody& value) { frequency_ = value; frequencyIsSet_ = true; @@ -662,6 +725,48 @@ void SqlAlarmRuleRespList::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t SqlAlarmRuleRespList::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void SqlAlarmRuleRespList::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool SqlAlarmRuleRespList::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void SqlAlarmRuleRespList::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string SqlAlarmRuleRespList::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void SqlAlarmRuleRespList::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool SqlAlarmRuleRespList::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void SqlAlarmRuleRespList::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/UpdateKeywordsAlarmRuleRequestBody.cpp b/lts/src/v2/model/UpdateKeywordsAlarmRuleRequestBody.cpp index f8dca9926..65b35d4fa 100644 --- a/lts/src/v2/model/UpdateKeywordsAlarmRuleRequestBody.cpp +++ b/lts/src/v2/model/UpdateKeywordsAlarmRuleRequestBody.cpp @@ -37,6 +37,10 @@ UpdateKeywordsAlarmRuleRequestBody::UpdateKeywordsAlarmRuleRequestBody() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } UpdateKeywordsAlarmRuleRequestBody::~UpdateKeywordsAlarmRuleRequestBody() = default; @@ -91,6 +95,12 @@ web::json::value UpdateKeywordsAlarmRuleRequestBody::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -224,6 +234,24 @@ bool UpdateKeywordsAlarmRuleRequestBody::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -522,6 +550,48 @@ void UpdateKeywordsAlarmRuleRequestBody::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t UpdateKeywordsAlarmRuleRequestBody::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void UpdateKeywordsAlarmRuleRequestBody::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool UpdateKeywordsAlarmRuleRequestBody::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void UpdateKeywordsAlarmRuleRequestBody::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string UpdateKeywordsAlarmRuleRequestBody::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void UpdateKeywordsAlarmRuleRequestBody::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool UpdateKeywordsAlarmRuleRequestBody::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void UpdateKeywordsAlarmRuleRequestBody::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/UpdateKeywordsAlarmRuleResponse.cpp b/lts/src/v2/model/UpdateKeywordsAlarmRuleResponse.cpp index 22cd0e947..86e51f53b 100644 --- a/lts/src/v2/model/UpdateKeywordsAlarmRuleResponse.cpp +++ b/lts/src/v2/model/UpdateKeywordsAlarmRuleResponse.cpp @@ -39,6 +39,10 @@ UpdateKeywordsAlarmRuleResponse::UpdateKeywordsAlarmRuleResponse() conditionExpressionIsSet_ = false; indexId_ = ""; indexIdIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } UpdateKeywordsAlarmRuleResponse::~UpdateKeywordsAlarmRuleResponse() = default; @@ -96,6 +100,12 @@ web::json::value UpdateKeywordsAlarmRuleResponse::toJson() const if(indexIdIsSet_) { val[utility::conversions::to_string_t("indexId")] = ModelBase::toJson(indexId_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -134,7 +144,7 @@ bool UpdateKeywordsAlarmRuleResponse::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("keywords_requests")); if(!fieldValue.is_null()) { - std::vector refVal; + std::vector refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setKeywordsRequests(refVal); } @@ -143,7 +153,7 @@ bool UpdateKeywordsAlarmRuleResponse::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency")); if(!fieldValue.is_null()) { - Frequency refVal; + FrequencyRespBody refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setFrequency(refVal); } @@ -238,6 +248,24 @@ bool UpdateKeywordsAlarmRuleResponse::fromJson(const web::json::value& val) setIndexId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -305,12 +333,12 @@ void UpdateKeywordsAlarmRuleResponse::unsetkeywordsAlarmRuleDescription() keywordsAlarmRuleDescriptionIsSet_ = false; } -std::vector& UpdateKeywordsAlarmRuleResponse::getKeywordsRequests() +std::vector& UpdateKeywordsAlarmRuleResponse::getKeywordsRequests() { return keywordsRequests_; } -void UpdateKeywordsAlarmRuleResponse::setKeywordsRequests(const std::vector& value) +void UpdateKeywordsAlarmRuleResponse::setKeywordsRequests(const std::vector& value) { keywordsRequests_ = value; keywordsRequestsIsSet_ = true; @@ -326,12 +354,12 @@ void UpdateKeywordsAlarmRuleResponse::unsetkeywordsRequests() keywordsRequestsIsSet_ = false; } -Frequency UpdateKeywordsAlarmRuleResponse::getFrequency() const +FrequencyRespBody UpdateKeywordsAlarmRuleResponse::getFrequency() const { return frequency_; } -void UpdateKeywordsAlarmRuleResponse::setFrequency(const Frequency& value) +void UpdateKeywordsAlarmRuleResponse::setFrequency(const FrequencyRespBody& value) { frequency_ = value; frequencyIsSet_ = true; @@ -557,6 +585,48 @@ void UpdateKeywordsAlarmRuleResponse::unsetindexId() indexIdIsSet_ = false; } +int32_t UpdateKeywordsAlarmRuleResponse::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void UpdateKeywordsAlarmRuleResponse::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool UpdateKeywordsAlarmRuleResponse::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void UpdateKeywordsAlarmRuleResponse::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string UpdateKeywordsAlarmRuleResponse::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void UpdateKeywordsAlarmRuleResponse::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool UpdateKeywordsAlarmRuleResponse::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void UpdateKeywordsAlarmRuleResponse::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/UpdateSqlAlarmRuleRequestBody.cpp b/lts/src/v2/model/UpdateSqlAlarmRuleRequestBody.cpp index bdb868779..8493b80dd 100644 --- a/lts/src/v2/model/UpdateSqlAlarmRuleRequestBody.cpp +++ b/lts/src/v2/model/UpdateSqlAlarmRuleRequestBody.cpp @@ -16,6 +16,8 @@ UpdateSqlAlarmRuleRequestBody::UpdateSqlAlarmRuleRequestBody() sqlAlarmRuleIdIsSet_ = false; sqlAlarmRuleName_ = ""; sqlAlarmRuleNameIsSet_ = false; + isCssSql_ = false; + isCssSqlIsSet_ = false; sqlAlarmRuleDescription_ = ""; sqlAlarmRuleDescriptionIsSet_ = false; sqlRequestsIsSet_ = false; @@ -39,6 +41,10 @@ UpdateSqlAlarmRuleRequestBody::UpdateSqlAlarmRuleRequestBody() whetherRecoveryPolicyIsSet_ = false; recoveryPolicy_ = 0; recoveryPolicyIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } UpdateSqlAlarmRuleRequestBody::~UpdateSqlAlarmRuleRequestBody() = default; @@ -57,6 +63,9 @@ web::json::value UpdateSqlAlarmRuleRequestBody::toJson() const if(sqlAlarmRuleNameIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_name")] = ModelBase::toJson(sqlAlarmRuleName_); } + if(isCssSqlIsSet_) { + val[utility::conversions::to_string_t("is_css_sql")] = ModelBase::toJson(isCssSql_); + } if(sqlAlarmRuleDescriptionIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_description")] = ModelBase::toJson(sqlAlarmRuleDescription_); } @@ -96,6 +105,12 @@ web::json::value UpdateSqlAlarmRuleRequestBody::toJson() const if(recoveryPolicyIsSet_) { val[utility::conversions::to_string_t("recovery_policy")] = ModelBase::toJson(recoveryPolicy_); } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -121,6 +136,15 @@ bool UpdateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) setSqlAlarmRuleName(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_css_sql"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_css_sql")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCssSql(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_description"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_description")); if(!fieldValue.is_null()) @@ -143,7 +167,7 @@ bool UpdateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency")); if(!fieldValue.is_null()) { - Frequency refVal; + CreateSqlAlarmRuleFrequency refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setFrequency(refVal); } @@ -238,6 +262,24 @@ bool UpdateSqlAlarmRuleRequestBody::fromJson(const web::json::value& val) setRecoveryPolicy(refVal); } } + if(val.has_field(utility::conversions::to_string_t("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } @@ -284,6 +326,27 @@ void UpdateSqlAlarmRuleRequestBody::unsetsqlAlarmRuleName() sqlAlarmRuleNameIsSet_ = false; } +bool UpdateSqlAlarmRuleRequestBody::isIsCssSql() const +{ + return isCssSql_; +} + +void UpdateSqlAlarmRuleRequestBody::setIsCssSql(bool value) +{ + isCssSql_ = value; + isCssSqlIsSet_ = true; +} + +bool UpdateSqlAlarmRuleRequestBody::isCssSqlIsSet() const +{ + return isCssSqlIsSet_; +} + +void UpdateSqlAlarmRuleRequestBody::unsetisCssSql() +{ + isCssSqlIsSet_ = false; +} + std::string UpdateSqlAlarmRuleRequestBody::getSqlAlarmRuleDescription() const { return sqlAlarmRuleDescription_; @@ -326,12 +389,12 @@ void UpdateSqlAlarmRuleRequestBody::unsetsqlRequests() sqlRequestsIsSet_ = false; } -Frequency UpdateSqlAlarmRuleRequestBody::getFrequency() const +CreateSqlAlarmRuleFrequency UpdateSqlAlarmRuleRequestBody::getFrequency() const { return frequency_; } -void UpdateSqlAlarmRuleRequestBody::setFrequency(const Frequency& value) +void UpdateSqlAlarmRuleRequestBody::setFrequency(const CreateSqlAlarmRuleFrequency& value) { frequency_ = value; frequencyIsSet_ = true; @@ -557,6 +620,48 @@ void UpdateSqlAlarmRuleRequestBody::unsetrecoveryPolicy() recoveryPolicyIsSet_ = false; } +int32_t UpdateSqlAlarmRuleRequestBody::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void UpdateSqlAlarmRuleRequestBody::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool UpdateSqlAlarmRuleRequestBody::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void UpdateSqlAlarmRuleRequestBody::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string UpdateSqlAlarmRuleRequestBody::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void UpdateSqlAlarmRuleRequestBody::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool UpdateSqlAlarmRuleRequestBody::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void UpdateSqlAlarmRuleRequestBody::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/UpdateSqlAlarmRuleResponse.cpp b/lts/src/v2/model/UpdateSqlAlarmRuleResponse.cpp index 0779d1072..cd444e0aa 100644 --- a/lts/src/v2/model/UpdateSqlAlarmRuleResponse.cpp +++ b/lts/src/v2/model/UpdateSqlAlarmRuleResponse.cpp @@ -12,16 +12,14 @@ namespace Model { UpdateSqlAlarmRuleResponse::UpdateSqlAlarmRuleResponse() { - id_ = ""; - idIsSet_ = false; + sqlAlarmRuleName_ = ""; + sqlAlarmRuleNameIsSet_ = false; + isCssSql_ = false; + isCssSqlIsSet_ = false; indexId_ = ""; indexIdIsSet_ = false; - language_ = ""; - languageIsSet_ = false; projectId_ = ""; projectIdIsSet_ = false; - sqlAlarmRuleName_ = ""; - sqlAlarmRuleNameIsSet_ = false; sqlAlarmRuleId_ = ""; sqlAlarmRuleIdIsSet_ = false; sqlAlarmRuleDescription_ = ""; @@ -41,6 +39,14 @@ UpdateSqlAlarmRuleResponse::UpdateSqlAlarmRuleResponse() updateTime_ = 0L; updateTimeIsSet_ = false; topicsIsSet_ = false; + language_ = ""; + languageIsSet_ = false; + id_ = ""; + idIsSet_ = false; + notificationFrequency_ = 0; + notificationFrequencyIsSet_ = false; + alarmActionRuleName_ = ""; + alarmActionRuleNameIsSet_ = false; } UpdateSqlAlarmRuleResponse::~UpdateSqlAlarmRuleResponse() = default; @@ -53,21 +59,18 @@ web::json::value UpdateSqlAlarmRuleResponse::toJson() const { web::json::value val = web::json::value::object(); - if(idIsSet_) { - val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + if(sqlAlarmRuleNameIsSet_) { + val[utility::conversions::to_string_t("sql_alarm_rule_name")] = ModelBase::toJson(sqlAlarmRuleName_); + } + if(isCssSqlIsSet_) { + val[utility::conversions::to_string_t("is_css_sql")] = ModelBase::toJson(isCssSql_); } if(indexIdIsSet_) { val[utility::conversions::to_string_t("indexId")] = ModelBase::toJson(indexId_); } - if(languageIsSet_) { - val[utility::conversions::to_string_t("language")] = ModelBase::toJson(language_); - } if(projectIdIsSet_) { val[utility::conversions::to_string_t("projectId")] = ModelBase::toJson(projectId_); } - if(sqlAlarmRuleNameIsSet_) { - val[utility::conversions::to_string_t("sql_alarm_rule_name")] = ModelBase::toJson(sqlAlarmRuleName_); - } if(sqlAlarmRuleIdIsSet_) { val[utility::conversions::to_string_t("sql_alarm_rule_id")] = ModelBase::toJson(sqlAlarmRuleId_); } @@ -101,6 +104,18 @@ web::json::value UpdateSqlAlarmRuleResponse::toJson() const if(topicsIsSet_) { val[utility::conversions::to_string_t("topics")] = ModelBase::toJson(topics_); } + if(languageIsSet_) { + val[utility::conversions::to_string_t("language")] = ModelBase::toJson(language_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(notificationFrequencyIsSet_) { + val[utility::conversions::to_string_t("notification_frequency")] = ModelBase::toJson(notificationFrequency_); + } + if(alarmActionRuleNameIsSet_) { + val[utility::conversions::to_string_t("alarm_action_rule_name")] = ModelBase::toJson(alarmActionRuleName_); + } return val; } @@ -108,31 +123,31 @@ bool UpdateSqlAlarmRuleResponse::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(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_name")); if(!fieldValue.is_null()) { std::string refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setId(refVal); + setSqlAlarmRuleName(refVal); } } - if(val.has_field(utility::conversions::to_string_t("indexId"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("indexId")); + if(val.has_field(utility::conversions::to_string_t("is_css_sql"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_css_sql")); if(!fieldValue.is_null()) { - std::string refVal; + bool refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setIndexId(refVal); + setIsCssSql(refVal); } } - if(val.has_field(utility::conversions::to_string_t("language"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("language")); + if(val.has_field(utility::conversions::to_string_t("indexId"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("indexId")); if(!fieldValue.is_null()) { std::string refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setLanguage(refVal); + setIndexId(refVal); } } if(val.has_field(utility::conversions::to_string_t("projectId"))) { @@ -144,15 +159,6 @@ bool UpdateSqlAlarmRuleResponse::fromJson(const web::json::value& val) setProjectId(refVal); } } - if(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_name"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_name")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setSqlAlarmRuleName(refVal); - } - } if(val.has_field(utility::conversions::to_string_t("sql_alarm_rule_id"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sql_alarm_rule_id")); if(!fieldValue.is_null()) @@ -184,7 +190,7 @@ bool UpdateSqlAlarmRuleResponse::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency")); if(!fieldValue.is_null()) { - Frequency refVal; + FrequencyRespBody refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setFrequency(refVal); } @@ -252,71 +258,107 @@ bool UpdateSqlAlarmRuleResponse::fromJson(const web::json::value& val) setTopics(refVal); } } + if(val.has_field(utility::conversions::to_string_t("language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLanguage(refVal); + } + } + 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("notification_frequency"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notification_frequency")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotificationFrequency(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_action_rule_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_action_rule_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmActionRuleName(refVal); + } + } return ok; } -std::string UpdateSqlAlarmRuleResponse::getId() const +std::string UpdateSqlAlarmRuleResponse::getSqlAlarmRuleName() const { - return id_; + return sqlAlarmRuleName_; } -void UpdateSqlAlarmRuleResponse::setId(const std::string& value) +void UpdateSqlAlarmRuleResponse::setSqlAlarmRuleName(const std::string& value) { - id_ = value; - idIsSet_ = true; + sqlAlarmRuleName_ = value; + sqlAlarmRuleNameIsSet_ = true; } -bool UpdateSqlAlarmRuleResponse::idIsSet() const +bool UpdateSqlAlarmRuleResponse::sqlAlarmRuleNameIsSet() const { - return idIsSet_; + return sqlAlarmRuleNameIsSet_; } -void UpdateSqlAlarmRuleResponse::unsetid() +void UpdateSqlAlarmRuleResponse::unsetsqlAlarmRuleName() { - idIsSet_ = false; + sqlAlarmRuleNameIsSet_ = false; } -std::string UpdateSqlAlarmRuleResponse::getIndexId() const +bool UpdateSqlAlarmRuleResponse::isIsCssSql() const { - return indexId_; + return isCssSql_; } -void UpdateSqlAlarmRuleResponse::setIndexId(const std::string& value) +void UpdateSqlAlarmRuleResponse::setIsCssSql(bool value) { - indexId_ = value; - indexIdIsSet_ = true; + isCssSql_ = value; + isCssSqlIsSet_ = true; } -bool UpdateSqlAlarmRuleResponse::indexIdIsSet() const +bool UpdateSqlAlarmRuleResponse::isCssSqlIsSet() const { - return indexIdIsSet_; + return isCssSqlIsSet_; } -void UpdateSqlAlarmRuleResponse::unsetindexId() +void UpdateSqlAlarmRuleResponse::unsetisCssSql() { - indexIdIsSet_ = false; + isCssSqlIsSet_ = false; } -std::string UpdateSqlAlarmRuleResponse::getLanguage() const +std::string UpdateSqlAlarmRuleResponse::getIndexId() const { - return language_; + return indexId_; } -void UpdateSqlAlarmRuleResponse::setLanguage(const std::string& value) +void UpdateSqlAlarmRuleResponse::setIndexId(const std::string& value) { - language_ = value; - languageIsSet_ = true; + indexId_ = value; + indexIdIsSet_ = true; } -bool UpdateSqlAlarmRuleResponse::languageIsSet() const +bool UpdateSqlAlarmRuleResponse::indexIdIsSet() const { - return languageIsSet_; + return indexIdIsSet_; } -void UpdateSqlAlarmRuleResponse::unsetlanguage() +void UpdateSqlAlarmRuleResponse::unsetindexId() { - languageIsSet_ = false; + indexIdIsSet_ = false; } std::string UpdateSqlAlarmRuleResponse::getProjectId() const @@ -340,27 +382,6 @@ void UpdateSqlAlarmRuleResponse::unsetprojectId() projectIdIsSet_ = false; } -std::string UpdateSqlAlarmRuleResponse::getSqlAlarmRuleName() const -{ - return sqlAlarmRuleName_; -} - -void UpdateSqlAlarmRuleResponse::setSqlAlarmRuleName(const std::string& value) -{ - sqlAlarmRuleName_ = value; - sqlAlarmRuleNameIsSet_ = true; -} - -bool UpdateSqlAlarmRuleResponse::sqlAlarmRuleNameIsSet() const -{ - return sqlAlarmRuleNameIsSet_; -} - -void UpdateSqlAlarmRuleResponse::unsetsqlAlarmRuleName() -{ - sqlAlarmRuleNameIsSet_ = false; -} - std::string UpdateSqlAlarmRuleResponse::getSqlAlarmRuleId() const { return sqlAlarmRuleId_; @@ -424,12 +445,12 @@ void UpdateSqlAlarmRuleResponse::unsetsqlRequests() sqlRequestsIsSet_ = false; } -Frequency UpdateSqlAlarmRuleResponse::getFrequency() const +FrequencyRespBody UpdateSqlAlarmRuleResponse::getFrequency() const { return frequency_; } -void UpdateSqlAlarmRuleResponse::setFrequency(const Frequency& value) +void UpdateSqlAlarmRuleResponse::setFrequency(const FrequencyRespBody& value) { frequency_ = value; frequencyIsSet_ = true; @@ -592,6 +613,90 @@ void UpdateSqlAlarmRuleResponse::unsettopics() topicsIsSet_ = false; } +std::string UpdateSqlAlarmRuleResponse::getLanguage() const +{ + return language_; +} + +void UpdateSqlAlarmRuleResponse::setLanguage(const std::string& value) +{ + language_ = value; + languageIsSet_ = true; +} + +bool UpdateSqlAlarmRuleResponse::languageIsSet() const +{ + return languageIsSet_; +} + +void UpdateSqlAlarmRuleResponse::unsetlanguage() +{ + languageIsSet_ = false; +} + +std::string UpdateSqlAlarmRuleResponse::getId() const +{ + return id_; +} + +void UpdateSqlAlarmRuleResponse::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool UpdateSqlAlarmRuleResponse::idIsSet() const +{ + return idIsSet_; +} + +void UpdateSqlAlarmRuleResponse::unsetid() +{ + idIsSet_ = false; +} + +int32_t UpdateSqlAlarmRuleResponse::getNotificationFrequency() const +{ + return notificationFrequency_; +} + +void UpdateSqlAlarmRuleResponse::setNotificationFrequency(int32_t value) +{ + notificationFrequency_ = value; + notificationFrequencyIsSet_ = true; +} + +bool UpdateSqlAlarmRuleResponse::notificationFrequencyIsSet() const +{ + return notificationFrequencyIsSet_; +} + +void UpdateSqlAlarmRuleResponse::unsetnotificationFrequency() +{ + notificationFrequencyIsSet_ = false; +} + +std::string UpdateSqlAlarmRuleResponse::getAlarmActionRuleName() const +{ + return alarmActionRuleName_; +} + +void UpdateSqlAlarmRuleResponse::setAlarmActionRuleName(const std::string& value) +{ + alarmActionRuleName_ = value; + alarmActionRuleNameIsSet_ = true; +} + +bool UpdateSqlAlarmRuleResponse::alarmActionRuleNameIsSet() const +{ + return alarmActionRuleNameIsSet_; +} + +void UpdateSqlAlarmRuleResponse::unsetalarmActionRuleName() +{ + alarmActionRuleNameIsSet_ = false; +} + } } } diff --git a/rds/include/huaweicloud/rds/v3/RdsClient.h b/rds/include/huaweicloud/rds/v3/RdsClient.h index a38bb5d27..bd87f2f56 100644 --- a/rds/include/huaweicloud/rds/v3/RdsClient.h +++ b/rds/include/huaweicloud/rds/v3/RdsClient.h @@ -6,6 +6,7 @@ #include +#include #include #include #include @@ -65,6 +66,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -126,6 +130,8 @@ #include #include #include +#include +#include #include #include #include @@ -209,6 +215,8 @@ #include #include #include +#include +#include #include #include #include @@ -670,6 +678,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr deleteJob( DeleteJobRequest &request ); + // + // + // 解除LTS配置信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteLogLtsConfigs( + DeleteLogLtsConfigsRequest &request + ); // 删除手动备份 // // 删除手动备份。 @@ -872,6 +888,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr listJobInfoDetail( ListJobInfoDetailRequest &request ); + // + // + // 获取LTS配置信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listLogLtsConfigs( + ListLogLtsConfigsRequest &request + ); // 查询跨区域备份列表 // // 查询跨区域备份列表。 @@ -1126,6 +1150,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr setBinlogClearPolicy( SetBinlogClearPolicyRequest &request ); + // + // + // 关联LTS配置信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr setLogLtsConfigs( + SetLogLtsConfigsRequest &request + ); // 设置跨区域备份策略 // // 设置跨区域备份策略。 diff --git a/rds/include/huaweicloud/rds/v3/RdsMeta.h b/rds/include/huaweicloud/rds/v3/RdsMeta.h index 7016cd903..3fbcdac42 100644 --- a/rds/include/huaweicloud/rds/v3/RdsMeta.h +++ b/rds/include/huaweicloud/rds/v3/RdsMeta.h @@ -34,6 +34,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForDeleteConfiguration(); static HttpRequestDef genRequestDefForDeleteInstance(); static HttpRequestDef genRequestDefForDeleteJob(); + static HttpRequestDef genRequestDefForDeleteLogLtsConfigs(); static HttpRequestDef genRequestDefForDeleteManualBackup(); static HttpRequestDef genRequestDefForDeletePostgresqlHbaConf(); static HttpRequestDef genRequestDefForDownloadSlowlog(); @@ -59,6 +60,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForListInstancesSupportFastRestore(); static HttpRequestDef genRequestDefForListJobInfo(); static HttpRequestDef genRequestDefForListJobInfoDetail(); + static HttpRequestDef genRequestDefForListLogLtsConfigs(); static HttpRequestDef genRequestDefForListOffSiteBackups(); static HttpRequestDef genRequestDefForListOffSiteInstances(); static HttpRequestDef genRequestDefForListOffSiteRestoreTimes(); @@ -90,6 +92,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForSetAutoEnlargePolicy(); static HttpRequestDef genRequestDefForSetBackupPolicy(); static HttpRequestDef genRequestDefForSetBinlogClearPolicy(); + static HttpRequestDef genRequestDefForSetLogLtsConfigs(); static HttpRequestDef genRequestDefForSetOffSiteBackupPolicy(); static HttpRequestDef genRequestDefForSetSecondLevelMonitor(); static HttpRequestDef genRequestDefForSetSecurityGroup(); diff --git a/rds/include/huaweicloud/rds/v3/model/AddLogConfigResponseBody.h b/rds/include/huaweicloud/rds/v3/model/AddLogConfigResponseBody.h new file mode 100644 index 000000000..b0013d0b3 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/AddLogConfigResponseBody.h @@ -0,0 +1,65 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigResponseBody_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigResponseBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT AddLogConfigResponseBody + : public ModelBase +{ +public: + AddLogConfigResponseBody(); + virtual ~AddLogConfigResponseBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AddLogConfigResponseBody members + + /// + /// 实例日志配置信息。 + /// + + std::vector& getLogConfigs(); + bool logConfigsIsSet() const; + void unsetlogConfigs(); + void setLogConfigs(const std::vector& value); + + +protected: + std::vector logConfigs_; + bool logConfigsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigResponseBody_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/AddLogConfigs.h b/rds/include/huaweicloud/rds/v3/model/AddLogConfigs.h new file mode 100644 index 000000000..853c4999d --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/AddLogConfigs.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigs_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigs_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT AddLogConfigs + : public ModelBase +{ +public: + AddLogConfigs(); + virtual ~AddLogConfigs(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AddLogConfigs members + + /// + /// 实例ID。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 日志类型。 + /// + + std::string getLogType() const; + bool logTypeIsSet() const; + void unsetlogType(); + void setLogType(const std::string& value); + + /// + /// LTS日志组ID。 + /// + + std::string getLtsGroupId() const; + bool ltsGroupIdIsSet() const; + void unsetltsGroupId(); + void setLtsGroupId(const std::string& value); + + /// + /// LTS日志流ID。 + /// + + std::string getLtsStreamId() const; + bool ltsStreamIdIsSet() const; + void unsetltsStreamId(); + void setLtsStreamId(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string logType_; + bool logTypeIsSet_; + std::string ltsGroupId_; + bool ltsGroupIdIsSet_; + std::string ltsStreamId_; + bool ltsStreamIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_AddLogConfigs_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/Datastore.h b/rds/include/huaweicloud/rds/v3/model/Datastore.h index 644d68245..379b6b25e 100644 --- a/rds/include/huaweicloud/rds/v3/model/Datastore.h +++ b/rds/include/huaweicloud/rds/v3/model/Datastore.h @@ -57,7 +57,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT Datastore void setVersion(const std::string& value); /// - /// 数据库完整版本号。仅在数据库引擎是”PostgreSQL”时返回。 + /// 数据库完整版本号。仅在数据库引擎是”MySQL”和”PostgreSQL”时返回。 /// std::string getCompleteVersion() const; diff --git a/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigResponseBody.h b/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigResponseBody.h new file mode 100644 index 000000000..772370a88 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigResponseBody.h @@ -0,0 +1,65 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigResponseBody_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigResponseBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT DeleteLogConfigResponseBody + : public ModelBase +{ +public: + DeleteLogConfigResponseBody(); + virtual ~DeleteLogConfigResponseBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteLogConfigResponseBody members + + /// + /// 实例日志配置信息。 + /// + + std::vector& getLogConfigs(); + bool logConfigsIsSet() const; + void unsetlogConfigs(); + void setLogConfigs(const std::vector& value); + + +protected: + std::vector logConfigs_; + bool logConfigsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigResponseBody_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigs.h b/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigs.h new file mode 100644 index 000000000..fc1542fef --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/DeleteLogConfigs.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigs_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigs_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT DeleteLogConfigs + : public ModelBase +{ +public: + DeleteLogConfigs(); + virtual ~DeleteLogConfigs(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteLogConfigs members + + /// + /// 实例ID。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 日志类型。 + /// + + std::string getLogType() const; + bool logTypeIsSet() const; + void unsetlogType(); + void setLogType(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string logType_; + bool logTypeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogConfigs_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsRequest.h b/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsRequest.h new file mode 100644 index 000000000..d4b47ef0f --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT DeleteLogLtsConfigsRequest + : public ModelBase +{ +public: + DeleteLogLtsConfigsRequest(); + virtual ~DeleteLogLtsConfigsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteLogLtsConfigsRequest members + + /// + /// 引擎。 + /// + + std::string getEngine() const; + bool engineIsSet() const; + void unsetengine(); + void setEngine(const std::string& value); + + /// + /// 语言。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + DeleteLogConfigResponseBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const DeleteLogConfigResponseBody& value); + + +protected: + std::string engine_; + bool engineIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + DeleteLogConfigResponseBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteLogLtsConfigsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsResponse.h b/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsResponse.h new file mode 100644 index 000000000..70d03f6af --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/DeleteLogLtsConfigsResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT DeleteLogLtsConfigsResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteLogLtsConfigsResponse(); + virtual ~DeleteLogLtsConfigsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteLogLtsConfigsResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_DeleteLogLtsConfigsResponse_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsRequest.h b/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsRequest.h new file mode 100644 index 000000000..e2edadfef --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsRequest.h @@ -0,0 +1,159 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ListLogLtsConfigsRequest + : public ModelBase +{ +public: + ListLogLtsConfigsRequest(); + virtual ~ListLogLtsConfigsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListLogLtsConfigsRequest members + + /// + /// 引擎。 + /// + + std::string getEngine() const; + bool engineIsSet() const; + void unsetengine(); + void setEngine(const std::string& value); + + /// + /// 企业项目ID。默认为空。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 实例ID。默认为空。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 实例名称。默认为空。 + /// + + std::string getInstanceName() const; + bool instanceNameIsSet() const; + void unsetinstanceName(); + void setInstanceName(const std::string& value); + + /// + /// 查询记录数。默认10。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 索引位置,偏移量。默认0。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 排序 + /// + + std::string getSort() const; + bool sortIsSet() const; + void unsetsort(); + void setSort(const std::string& value); + + /// + /// 实例状态 + /// + + std::string getInstanceStatus() const; + bool instanceStatusIsSet() const; + void unsetinstanceStatus(); + void setInstanceStatus(const std::string& value); + + /// + /// 语言。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + +protected: + std::string engine_; + bool engineIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::string instanceId_; + bool instanceIdIsSet_; + std::string instanceName_; + bool instanceNameIsSet_; + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string sort_; + bool sortIsSet_; + std::string instanceStatus_; + bool instanceStatusIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListLogLtsConfigsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsResponse.h b/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsResponse.h new file mode 100644 index 000000000..7c9fb2ad5 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ListLogLtsConfigsResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ListLogLtsConfigsResponse + : public ModelBase, public HttpResponse +{ +public: + ListLogLtsConfigsResponse(); + virtual ~ListLogLtsConfigsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListLogLtsConfigsResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ListLogLtsConfigsResponse_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsRequest.h b/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsRequest.h new file mode 100644 index 000000000..582a1ce4e --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT SetLogLtsConfigsRequest + : public ModelBase +{ +public: + SetLogLtsConfigsRequest(); + virtual ~SetLogLtsConfigsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SetLogLtsConfigsRequest members + + /// + /// 引擎。 + /// + + std::string getEngine() const; + bool engineIsSet() const; + void unsetengine(); + void setEngine(const std::string& value); + + /// + /// 语言。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + AddLogConfigResponseBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const AddLogConfigResponseBody& value); + + +protected: + std::string engine_; + bool engineIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + AddLogConfigResponseBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + SetLogLtsConfigsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsResponse.h b/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsResponse.h new file mode 100644 index 000000000..dc082e433 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/SetLogLtsConfigsResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT SetLogLtsConfigsResponse + : public ModelBase, public HttpResponse +{ +public: + SetLogLtsConfigsResponse(); + virtual ~SetLogLtsConfigsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SetLogLtsConfigsResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_SetLogLtsConfigsResponse_H_ diff --git a/rds/src/v3/RdsClient.cpp b/rds/src/v3/RdsClient.cpp index f335d7120..33ff6d518 100644 --- a/rds/src/v3/RdsClient.cpp +++ b/rds/src/v3/RdsClient.cpp @@ -924,6 +924,51 @@ std::shared_ptr RdsClient::deleteJob(DeleteJobRequest &reques return localVarResult; } +std::shared_ptr RdsClient::deleteLogLtsConfigs(DeleteLogLtsConfigsRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/{engine}/instances/logs/lts-configs"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["engine"] = parameterToString(request.getEngine()); + + 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, RdsMeta::genRequestDefForDeleteLogLtsConfigs()); + + 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 RdsClient::deleteManualBackup(DeleteManualBackupRequest &request) { std::string localVarPath = "/v3/{project_id}/backups/{backup_id}"; @@ -1971,6 +2016,60 @@ std::shared_ptr RdsClient::listJobInfoDetail(ListJobI return localVarResult; } +std::shared_ptr RdsClient::listLogLtsConfigs(ListLogLtsConfigsRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/{engine}/instances/logs/lts-configs"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["engine"] = parameterToString(request.getEngine()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.instanceIdIsSet()) { + localVarQueryParams["instance_id"] = parameterToString(request.getInstanceId()); + } + if (request.instanceNameIsSet()) { + localVarQueryParams["instance_name"] = parameterToString(request.getInstanceName()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.sortIsSet()) { + localVarQueryParams["sort"] = parameterToString(request.getSort()); + } + if (request.instanceStatusIsSet()) { + localVarQueryParams["instance_status"] = parameterToString(request.getInstanceStatus()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, RdsMeta::genRequestDefForListLogLtsConfigs()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr RdsClient::listOffSiteBackups(ListOffSiteBackupsRequest &request) { std::string localVarPath = "/v3/{project_id}/offsite-backups"; @@ -3268,6 +3367,51 @@ std::shared_ptr RdsClient::setBinlogClearPolicy(Se return localVarResult; } +std::shared_ptr RdsClient::setLogLtsConfigs(SetLogLtsConfigsRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/{engine}/instances/logs/lts-configs"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["engine"] = parameterToString(request.getEngine()); + + 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("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, RdsMeta::genRequestDefForSetLogLtsConfigs()); + + 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 RdsClient::setOffSiteBackupPolicy(SetOffSiteBackupPolicyRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/backups/offsite-policy"; diff --git a/rds/src/v3/RdsMeta.cpp b/rds/src/v3/RdsMeta.cpp index e5b42ae48..f5d92bf5c 100644 --- a/rds/src/v3/RdsMeta.cpp +++ b/rds/src/v3/RdsMeta.cpp @@ -273,6 +273,20 @@ HttpRequestDef RdsMeta::genRequestDefForDeleteJob() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForDeleteLogLtsConfigs() { + 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 RdsMeta::genRequestDefForDeleteManualBackup() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -696,6 +710,37 @@ HttpRequestDef RdsMeta::genRequestDefForListJobInfoDetail() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForListLogLtsConfigs() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("InstanceId") + .withJsonTag("instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("InstanceName") + .withJsonTag("instance_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Sort") + .withJsonTag("sort") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("InstanceStatus") + .withJsonTag("instance_status") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef RdsMeta::genRequestDefForListOffSiteBackups() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("InstanceId") @@ -1176,6 +1221,20 @@ HttpRequestDef RdsMeta::genRequestDefForSetBinlogClearPolicy() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForSetLogLtsConfigs() { + 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 RdsMeta::genRequestDefForSetOffSiteBackupPolicy() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/rds/src/v3/model/AddLogConfigResponseBody.cpp b/rds/src/v3/model/AddLogConfigResponseBody.cpp new file mode 100644 index 000000000..213db7e9c --- /dev/null +++ b/rds/src/v3/model/AddLogConfigResponseBody.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/rds/v3/model/AddLogConfigResponseBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +AddLogConfigResponseBody::AddLogConfigResponseBody() +{ + logConfigsIsSet_ = false; +} + +AddLogConfigResponseBody::~AddLogConfigResponseBody() = default; + +void AddLogConfigResponseBody::validate() +{ +} + +web::json::value AddLogConfigResponseBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(logConfigsIsSet_) { + val[utility::conversions::to_string_t("log_configs")] = ModelBase::toJson(logConfigs_); + } + + return val; +} +bool AddLogConfigResponseBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("log_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogConfigs(refVal); + } + } + return ok; +} + + +std::vector& AddLogConfigResponseBody::getLogConfigs() +{ + return logConfigs_; +} + +void AddLogConfigResponseBody::setLogConfigs(const std::vector& value) +{ + logConfigs_ = value; + logConfigsIsSet_ = true; +} + +bool AddLogConfigResponseBody::logConfigsIsSet() const +{ + return logConfigsIsSet_; +} + +void AddLogConfigResponseBody::unsetlogConfigs() +{ + logConfigsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/AddLogConfigs.cpp b/rds/src/v3/model/AddLogConfigs.cpp new file mode 100644 index 000000000..3087d04bf --- /dev/null +++ b/rds/src/v3/model/AddLogConfigs.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/rds/v3/model/AddLogConfigs.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +AddLogConfigs::AddLogConfigs() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + logType_ = ""; + logTypeIsSet_ = false; + ltsGroupId_ = ""; + ltsGroupIdIsSet_ = false; + ltsStreamId_ = ""; + ltsStreamIdIsSet_ = false; +} + +AddLogConfigs::~AddLogConfigs() = default; + +void AddLogConfigs::validate() +{ +} + +web::json::value AddLogConfigs::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(logTypeIsSet_) { + val[utility::conversions::to_string_t("log_type")] = ModelBase::toJson(logType_); + } + if(ltsGroupIdIsSet_) { + val[utility::conversions::to_string_t("lts_group_id")] = ModelBase::toJson(ltsGroupId_); + } + if(ltsStreamIdIsSet_) { + val[utility::conversions::to_string_t("lts_stream_id")] = ModelBase::toJson(ltsStreamId_); + } + + return val; +} +bool AddLogConfigs::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("lts_group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("lts_group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLtsGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("lts_stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("lts_stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLtsStreamId(refVal); + } + } + return ok; +} + + +std::string AddLogConfigs::getInstanceId() const +{ + return instanceId_; +} + +void AddLogConfigs::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool AddLogConfigs::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void AddLogConfigs::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string AddLogConfigs::getLogType() const +{ + return logType_; +} + +void AddLogConfigs::setLogType(const std::string& value) +{ + logType_ = value; + logTypeIsSet_ = true; +} + +bool AddLogConfigs::logTypeIsSet() const +{ + return logTypeIsSet_; +} + +void AddLogConfigs::unsetlogType() +{ + logTypeIsSet_ = false; +} + +std::string AddLogConfigs::getLtsGroupId() const +{ + return ltsGroupId_; +} + +void AddLogConfigs::setLtsGroupId(const std::string& value) +{ + ltsGroupId_ = value; + ltsGroupIdIsSet_ = true; +} + +bool AddLogConfigs::ltsGroupIdIsSet() const +{ + return ltsGroupIdIsSet_; +} + +void AddLogConfigs::unsetltsGroupId() +{ + ltsGroupIdIsSet_ = false; +} + +std::string AddLogConfigs::getLtsStreamId() const +{ + return ltsStreamId_; +} + +void AddLogConfigs::setLtsStreamId(const std::string& value) +{ + ltsStreamId_ = value; + ltsStreamIdIsSet_ = true; +} + +bool AddLogConfigs::ltsStreamIdIsSet() const +{ + return ltsStreamIdIsSet_; +} + +void AddLogConfigs::unsetltsStreamId() +{ + ltsStreamIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/DeleteLogConfigResponseBody.cpp b/rds/src/v3/model/DeleteLogConfigResponseBody.cpp new file mode 100644 index 000000000..945ca010c --- /dev/null +++ b/rds/src/v3/model/DeleteLogConfigResponseBody.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/rds/v3/model/DeleteLogConfigResponseBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +DeleteLogConfigResponseBody::DeleteLogConfigResponseBody() +{ + logConfigsIsSet_ = false; +} + +DeleteLogConfigResponseBody::~DeleteLogConfigResponseBody() = default; + +void DeleteLogConfigResponseBody::validate() +{ +} + +web::json::value DeleteLogConfigResponseBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(logConfigsIsSet_) { + val[utility::conversions::to_string_t("log_configs")] = ModelBase::toJson(logConfigs_); + } + + return val; +} +bool DeleteLogConfigResponseBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("log_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogConfigs(refVal); + } + } + return ok; +} + + +std::vector& DeleteLogConfigResponseBody::getLogConfigs() +{ + return logConfigs_; +} + +void DeleteLogConfigResponseBody::setLogConfigs(const std::vector& value) +{ + logConfigs_ = value; + logConfigsIsSet_ = true; +} + +bool DeleteLogConfigResponseBody::logConfigsIsSet() const +{ + return logConfigsIsSet_; +} + +void DeleteLogConfigResponseBody::unsetlogConfigs() +{ + logConfigsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/DeleteLogConfigs.cpp b/rds/src/v3/model/DeleteLogConfigs.cpp new file mode 100644 index 000000000..affa8134e --- /dev/null +++ b/rds/src/v3/model/DeleteLogConfigs.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/rds/v3/model/DeleteLogConfigs.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +DeleteLogConfigs::DeleteLogConfigs() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + logType_ = ""; + logTypeIsSet_ = false; +} + +DeleteLogConfigs::~DeleteLogConfigs() = default; + +void DeleteLogConfigs::validate() +{ +} + +web::json::value DeleteLogConfigs::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(logTypeIsSet_) { + val[utility::conversions::to_string_t("log_type")] = ModelBase::toJson(logType_); + } + + return val; +} +bool DeleteLogConfigs::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("log_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogType(refVal); + } + } + return ok; +} + + +std::string DeleteLogConfigs::getInstanceId() const +{ + return instanceId_; +} + +void DeleteLogConfigs::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool DeleteLogConfigs::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void DeleteLogConfigs::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string DeleteLogConfigs::getLogType() const +{ + return logType_; +} + +void DeleteLogConfigs::setLogType(const std::string& value) +{ + logType_ = value; + logTypeIsSet_ = true; +} + +bool DeleteLogConfigs::logTypeIsSet() const +{ + return logTypeIsSet_; +} + +void DeleteLogConfigs::unsetlogType() +{ + logTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/DeleteLogLtsConfigsRequest.cpp b/rds/src/v3/model/DeleteLogLtsConfigsRequest.cpp new file mode 100644 index 000000000..e7af14fc7 --- /dev/null +++ b/rds/src/v3/model/DeleteLogLtsConfigsRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/rds/v3/model/DeleteLogLtsConfigsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +DeleteLogLtsConfigsRequest::DeleteLogLtsConfigsRequest() +{ + engine_ = ""; + engineIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +DeleteLogLtsConfigsRequest::~DeleteLogLtsConfigsRequest() = default; + +void DeleteLogLtsConfigsRequest::validate() +{ +} + +web::json::value DeleteLogLtsConfigsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(engineIsSet_) { + val[utility::conversions::to_string_t("engine")] = ModelBase::toJson(engine_); + } + 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 DeleteLogLtsConfigsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("engine"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngine(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()) + { + DeleteLogConfigResponseBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string DeleteLogLtsConfigsRequest::getEngine() const +{ + return engine_; +} + +void DeleteLogLtsConfigsRequest::setEngine(const std::string& value) +{ + engine_ = value; + engineIsSet_ = true; +} + +bool DeleteLogLtsConfigsRequest::engineIsSet() const +{ + return engineIsSet_; +} + +void DeleteLogLtsConfigsRequest::unsetengine() +{ + engineIsSet_ = false; +} + +std::string DeleteLogLtsConfigsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void DeleteLogLtsConfigsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool DeleteLogLtsConfigsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void DeleteLogLtsConfigsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +DeleteLogConfigResponseBody DeleteLogLtsConfigsRequest::getBody() const +{ + return body_; +} + +void DeleteLogLtsConfigsRequest::setBody(const DeleteLogConfigResponseBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteLogLtsConfigsRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteLogLtsConfigsRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/DeleteLogLtsConfigsResponse.cpp b/rds/src/v3/model/DeleteLogLtsConfigsResponse.cpp new file mode 100644 index 000000000..8d6acf806 --- /dev/null +++ b/rds/src/v3/model/DeleteLogLtsConfigsResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/rds/v3/model/DeleteLogLtsConfigsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +DeleteLogLtsConfigsResponse::DeleteLogLtsConfigsResponse() +{ +} + +DeleteLogLtsConfigsResponse::~DeleteLogLtsConfigsResponse() = default; + +void DeleteLogLtsConfigsResponse::validate() +{ +} + +web::json::value DeleteLogLtsConfigsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool DeleteLogLtsConfigsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ListLogLtsConfigsRequest.cpp b/rds/src/v3/model/ListLogLtsConfigsRequest.cpp new file mode 100644 index 000000000..21699d725 --- /dev/null +++ b/rds/src/v3/model/ListLogLtsConfigsRequest.cpp @@ -0,0 +1,359 @@ + + +#include "huaweicloud/rds/v3/model/ListLogLtsConfigsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ListLogLtsConfigsRequest::ListLogLtsConfigsRequest() +{ + engine_ = ""; + engineIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + instanceId_ = ""; + instanceIdIsSet_ = false; + instanceName_ = ""; + instanceNameIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + sort_ = ""; + sortIsSet_ = false; + instanceStatus_ = ""; + instanceStatusIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; +} + +ListLogLtsConfigsRequest::~ListLogLtsConfigsRequest() = default; + +void ListLogLtsConfigsRequest::validate() +{ +} + +web::json::value ListLogLtsConfigsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(engineIsSet_) { + val[utility::conversions::to_string_t("engine")] = ModelBase::toJson(engine_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(instanceNameIsSet_) { + val[utility::conversions::to_string_t("instance_name")] = ModelBase::toJson(instanceName_); + } + 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(sortIsSet_) { + val[utility::conversions::to_string_t("sort")] = ModelBase::toJson(sort_); + } + if(instanceStatusIsSet_) { + val[utility::conversions::to_string_t("instance_status")] = ModelBase::toJson(instanceStatus_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + + return val; +} +bool ListLogLtsConfigsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("engine"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngine(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceName(refVal); + } + } + 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("sort"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSort(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceStatus(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; +} + + +std::string ListLogLtsConfigsRequest::getEngine() const +{ + return engine_; +} + +void ListLogLtsConfigsRequest::setEngine(const std::string& value) +{ + engine_ = value; + engineIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::engineIsSet() const +{ + return engineIsSet_; +} + +void ListLogLtsConfigsRequest::unsetengine() +{ + engineIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListLogLtsConfigsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListLogLtsConfigsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListLogLtsConfigsRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListLogLtsConfigsRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getInstanceName() const +{ + return instanceName_; +} + +void ListLogLtsConfigsRequest::setInstanceName(const std::string& value) +{ + instanceName_ = value; + instanceNameIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::instanceNameIsSet() const +{ + return instanceNameIsSet_; +} + +void ListLogLtsConfigsRequest::unsetinstanceName() +{ + instanceNameIsSet_ = false; +} + +int32_t ListLogLtsConfigsRequest::getLimit() const +{ + return limit_; +} + +void ListLogLtsConfigsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListLogLtsConfigsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListLogLtsConfigsRequest::getOffset() const +{ + return offset_; +} + +void ListLogLtsConfigsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListLogLtsConfigsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getSort() const +{ + return sort_; +} + +void ListLogLtsConfigsRequest::setSort(const std::string& value) +{ + sort_ = value; + sortIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::sortIsSet() const +{ + return sortIsSet_; +} + +void ListLogLtsConfigsRequest::unsetsort() +{ + sortIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getInstanceStatus() const +{ + return instanceStatus_; +} + +void ListLogLtsConfigsRequest::setInstanceStatus(const std::string& value) +{ + instanceStatus_ = value; + instanceStatusIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::instanceStatusIsSet() const +{ + return instanceStatusIsSet_; +} + +void ListLogLtsConfigsRequest::unsetinstanceStatus() +{ + instanceStatusIsSet_ = false; +} + +std::string ListLogLtsConfigsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListLogLtsConfigsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListLogLtsConfigsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListLogLtsConfigsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ListLogLtsConfigsResponse.cpp b/rds/src/v3/model/ListLogLtsConfigsResponse.cpp new file mode 100644 index 000000000..2ff015ff3 --- /dev/null +++ b/rds/src/v3/model/ListLogLtsConfigsResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/rds/v3/model/ListLogLtsConfigsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ListLogLtsConfigsResponse::ListLogLtsConfigsResponse() +{ +} + +ListLogLtsConfigsResponse::~ListLogLtsConfigsResponse() = default; + +void ListLogLtsConfigsResponse::validate() +{ +} + +web::json::value ListLogLtsConfigsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool ListLogLtsConfigsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/rds/src/v3/model/SetLogLtsConfigsRequest.cpp b/rds/src/v3/model/SetLogLtsConfigsRequest.cpp new file mode 100644 index 000000000..6d9ae68ef --- /dev/null +++ b/rds/src/v3/model/SetLogLtsConfigsRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/rds/v3/model/SetLogLtsConfigsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +SetLogLtsConfigsRequest::SetLogLtsConfigsRequest() +{ + engine_ = ""; + engineIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +SetLogLtsConfigsRequest::~SetLogLtsConfigsRequest() = default; + +void SetLogLtsConfigsRequest::validate() +{ +} + +web::json::value SetLogLtsConfigsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(engineIsSet_) { + val[utility::conversions::to_string_t("engine")] = ModelBase::toJson(engine_); + } + 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 SetLogLtsConfigsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("engine"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngine(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()) + { + AddLogConfigResponseBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string SetLogLtsConfigsRequest::getEngine() const +{ + return engine_; +} + +void SetLogLtsConfigsRequest::setEngine(const std::string& value) +{ + engine_ = value; + engineIsSet_ = true; +} + +bool SetLogLtsConfigsRequest::engineIsSet() const +{ + return engineIsSet_; +} + +void SetLogLtsConfigsRequest::unsetengine() +{ + engineIsSet_ = false; +} + +std::string SetLogLtsConfigsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void SetLogLtsConfigsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool SetLogLtsConfigsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void SetLogLtsConfigsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +AddLogConfigResponseBody SetLogLtsConfigsRequest::getBody() const +{ + return body_; +} + +void SetLogLtsConfigsRequest::setBody(const AddLogConfigResponseBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool SetLogLtsConfigsRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void SetLogLtsConfigsRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/SetLogLtsConfigsResponse.cpp b/rds/src/v3/model/SetLogLtsConfigsResponse.cpp new file mode 100644 index 000000000..af4b0a2ba --- /dev/null +++ b/rds/src/v3/model/SetLogLtsConfigsResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/rds/v3/model/SetLogLtsConfigsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +SetLogLtsConfigsResponse::SetLogLtsConfigsResponse() +{ +} + +SetLogLtsConfigsResponse::~SetLogLtsConfigsResponse() = default; + +void SetLogLtsConfigsResponse::validate() +{ +} + +web::json::value SetLogLtsConfigsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool SetLogLtsConfigsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/vpc/include/huaweicloud/vpc/v2/VpcRegion.h b/vpc/include/huaweicloud/vpc/v2/VpcRegion.h index b4845c53c..a8f7f49d0 100644 --- a/vpc/include/huaweicloud/vpc/v2/VpcRegion.h +++ b/vpc/include/huaweicloud/vpc/v2/VpcRegion.h @@ -110,6 +110,10 @@ class HUAWEICLOUD_VPC_V2_EXPORT VpcRegion { { "https://vpc.ae-ad-1.myhuaweicloud.com" }); + regions["eu-west-0"] = Region("eu-west-0", + { + "https://vpc.eu-west-0.myhuaweicloud.com" + }); return regions; } private: