From b7a4430d1e6ec736bba23d0abacdf5ca3459623b Mon Sep 17 00:00:00 2001 From: Huaweicloud-SDK Date: Thu, 12 Dec 2024 16:09:32 +0800 Subject: [PATCH] release 3.1.115 source code --- CHANGELOG.md | 136 ++++++++ CHANGELOG_CN.md | 136 ++++++++ VERSION | 2 +- .../huaweicloud/cdn/v2/model/CacheRules.h | 11 + cdn/src/v2/model/CacheRules.cpp | 35 ++ .../csms/v1/model/ListUsersRequest.h | 12 +- csms/src/v1/CsmsClient.cpp | 4 +- csms/src/v1/CsmsMeta.cpp | 4 +- csms/src/v1/model/ListUsersRequest.cpp | 32 +- .../dds/v3/model/ResizeInstanceOption.h | 12 + dds/src/v3/model/ResizeInstanceOption.cpp | 34 ++ .../gaussdb/v3/model/StarRocksCreateRequest.h | 23 ++ .../model/StarRocksCreateRequest_pay_info.h | 97 ++++++ .../src/v3/model/StarRocksCreateRequest.cpp | 69 ++++ .../model/StarRocksCreateRequest_pay_info.cpp | 184 ++++++++++ lts/include/huaweicloud/lts/v2/LtsClient.h | 11 + lts/include/huaweicloud/lts/v2/LtsMeta.h | 1 + .../lts/v2/model/AccessConfigDeatilCreate.h | 99 ++++++ .../lts/v2/model/AccessConfigDeatilUpdate.h | 88 +++++ .../huaweicloud/lts/v2/model/LTSFieldsInfo.h | 12 + .../lts/v2/model/LTSSubFieldsInfo.h | 131 ++++++++ .../lts/v2/model/ListLogContextRequest.h | 105 ++++++ .../lts/v2/model/ListLogContextRequestBody.h | 97 ++++++ .../lts/v2/model/ListLogContextResponse.h | 112 +++++++ lts/src/v2/LtsClient.cpp | 46 +++ lts/src/v2/LtsMeta.cpp | 14 + lts/src/v2/model/AccessConfigDeatilCreate.cpp | 313 ++++++++++++++++++ lts/src/v2/model/AccessConfigDeatilUpdate.cpp | 278 ++++++++++++++++ lts/src/v2/model/LTSFieldsInfo.cpp | 34 ++ lts/src/v2/model/LTSSubFieldsInfo.cpp | 288 ++++++++++++++++ lts/src/v2/model/ListLogContextRequest.cpp | 183 ++++++++++ .../v2/model/ListLogContextRequestBody.cpp | 184 ++++++++++ lts/src/v2/model/ListLogContextResponse.cpp | 218 ++++++++++++ 33 files changed, 2978 insertions(+), 27 deletions(-) create mode 100644 gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest_pay_info.h create mode 100644 gaussdb/src/v3/model/StarRocksCreateRequest_pay_info.cpp create mode 100644 lts/include/huaweicloud/lts/v2/model/LTSSubFieldsInfo.h create mode 100644 lts/include/huaweicloud/lts/v2/model/ListLogContextRequest.h create mode 100644 lts/include/huaweicloud/lts/v2/model/ListLogContextRequestBody.h create mode 100644 lts/include/huaweicloud/lts/v2/model/ListLogContextResponse.h create mode 100644 lts/src/v2/model/LTSSubFieldsInfo.cpp create mode 100644 lts/src/v2/model/ListLogContextRequest.cpp create mode 100644 lts/src/v2/model/ListLogContextRequestBody.cpp create mode 100644 lts/src/v2/model/ListLogContextResponse.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index 944d23e4b..9aed14233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,139 @@ +# 3.1.115 2024-12-12 + +### HuaweiCloud SDK CDN + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowDomainFullConfig** + - changes of response param + - `+ configs.cache_rules.force_cache` + - **UpdateDomainFullConfig** + - changes of request param + - `+ configs.cache_rules.force_cache` + +### HuaweiCloud SDK CSMS + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListUsers** + - changes of request param + - `+ user_info` + - `- user_name` + +### HuaweiCloud SDK DDS + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ResizeInstance** + - changes of request param + - `+ resize.target_ids` + +### HuaweiCloud SDK GaussDB + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateStarrocksInstance** + - changes of request param + - `+ pay_info` + - `+ region_code` + +### HuaweiCloud SDK LTS + +- _API Version_ + - V2 +- _Features_ + - Support the API `ListLogContext` +- _Bug Fix_ + - None +- _Change_ + - **CreateLogStreamIndex** + - changes of request param + - `+ fields.ltsSubFieldsInfoList` + - `+ fields.fieldType: enum value [json]` + - **ListAccessConfig** + - changes of response param + - `+ result.access_config_detail.repeat_collect` + - `+ result.access_config_detail.system_fields` + - `+ result.access_config_detail.custom_key_value` + - `+ result.access_config_detail.includeLabelsLogical` + - `+ result.access_config_detail.excludeLabelsLogical` + - `+ result.access_config_detail.includeK8sLabelsLogical` + - `+ result.access_config_detail.excludeK8sLabelsLogical` + - `+ result.access_config_detail.includeEnvsLogical` + - `+ result.access_config_detail.excludeEnvsLogical` + - **UpdateAccessConfig** + - changes of request param + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - changes of response param + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - **CreateAccessConfig** + - changes of request param + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - changes of response param + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - **DeleteAccessConfig** + - changes of response param + - `+ result.access_config_detail.repeat_collect` + - `+ result.access_config_detail.system_fields` + - `+ result.access_config_detail.custom_key_value` + - `+ result.access_config_detail.includeLabelsLogical` + - `+ result.access_config_detail.excludeLabelsLogical` + - `+ result.access_config_detail.includeK8sLabelsLogical` + - `+ result.access_config_detail.excludeK8sLabelsLogical` + - `+ result.access_config_detail.includeEnvsLogical` + - `+ result.access_config_detail.excludeEnvsLogical` + # 3.1.114 2024-12-10 ### HuaweiCloud SDK CSMS diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index e7197b38c..3f6d47f6d 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,139 @@ +# 3.1.115 2024-12-12 + +### HuaweiCloud SDK CDN + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowDomainFullConfig** + - 响应参数变更 + - `+ configs.cache_rules.force_cache` + - **UpdateDomainFullConfig** + - 请求参数变更 + - `+ configs.cache_rules.force_cache` + +### HuaweiCloud SDK CSMS + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListUsers** + - 请求参数变更 + - `+ user_info` + - `- user_name` + +### HuaweiCloud SDK DDS + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ResizeInstance** + - 请求参数变更 + - `+ resize.target_ids` + +### HuaweiCloud SDK GaussDB + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateStarrocksInstance** + - 请求参数变更 + - `+ pay_info` + - `+ region_code` + +### HuaweiCloud SDK LTS + +- _接口版本_ + - V2 +- _新增特性_ + - 支持接口`ListLogContext` +- _解决问题_ + - 无 +- _特性变更_ + - **CreateLogStreamIndex** + - 请求参数变更 + - `+ fields.ltsSubFieldsInfoList` + - `+ fields.fieldType: enum value [json]` + - **ListAccessConfig** + - 响应参数变更 + - `+ result.access_config_detail.repeat_collect` + - `+ result.access_config_detail.system_fields` + - `+ result.access_config_detail.custom_key_value` + - `+ result.access_config_detail.includeLabelsLogical` + - `+ result.access_config_detail.excludeLabelsLogical` + - `+ result.access_config_detail.includeK8sLabelsLogical` + - `+ result.access_config_detail.excludeK8sLabelsLogical` + - `+ result.access_config_detail.includeEnvsLogical` + - `+ result.access_config_detail.excludeEnvsLogical` + - **UpdateAccessConfig** + - 请求参数变更 + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - 响应参数变更 + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - **CreateAccessConfig** + - 请求参数变更 + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - 响应参数变更 + - `+ access_config_detail.repeat_collect` + - `+ access_config_detail.system_fields` + - `+ access_config_detail.custom_key_value` + - `+ access_config_detail.includeLabelsLogical` + - `+ access_config_detail.excludeLabelsLogical` + - `+ access_config_detail.includeK8sLabelsLogical` + - `+ access_config_detail.excludeK8sLabelsLogical` + - `+ access_config_detail.includeEnvsLogical` + - `+ access_config_detail.excludeEnvsLogical` + - **DeleteAccessConfig** + - 响应参数变更 + - `+ result.access_config_detail.repeat_collect` + - `+ result.access_config_detail.system_fields` + - `+ result.access_config_detail.custom_key_value` + - `+ result.access_config_detail.includeLabelsLogical` + - `+ result.access_config_detail.excludeLabelsLogical` + - `+ result.access_config_detail.includeK8sLabelsLogical` + - `+ result.access_config_detail.excludeK8sLabelsLogical` + - `+ result.access_config_detail.includeEnvsLogical` + - `+ result.access_config_detail.excludeEnvsLogical` + # 3.1.114 2024-12-10 ### HuaweiCloud SDK CSMS diff --git a/VERSION b/VERSION index c26761982..050e6a76c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.114 +3.1.115 diff --git a/cdn/include/huaweicloud/cdn/v2/model/CacheRules.h b/cdn/include/huaweicloud/cdn/v2/model/CacheRules.h index a9bcd4cef..f2d7abff6 100644 --- a/cdn/include/huaweicloud/cdn/v2/model/CacheRules.h +++ b/cdn/include/huaweicloud/cdn/v2/model/CacheRules.h @@ -92,6 +92,15 @@ class HUAWEICLOUD_CDN_V2_EXPORT CacheRules void unsetfollowOrigin(); void setFollowOrigin(const std::string& value); + /// + /// 强制缓存:CDN节点缓存过期时间是否忽略源站响应头Cache-Control中的no-cache、private、no-store字段,默认关闭强制缓存功能。强制缓存与缓存过期时间来源功能配合使用,具体使用限制及配置效果请参考CDN用户指南的配置节点缓存规则章节。on:打开强制缓存,off:关闭强制缓存 + /// + + std::string getForceCache() const; + bool forceCacheIsSet() const; + void unsetforceCache(); + void setForceCache(const std::string& value); + /// /// URL参数: - del_params:忽略指定URL参数, - reserve_params:保留指定URL参数, - ignore_url_params:忽略全部URL参数, - full_url:使用完整URL参数。 > 不传此参数时,默认为full_url。 /// @@ -124,6 +133,8 @@ class HUAWEICLOUD_CDN_V2_EXPORT CacheRules bool priorityIsSet_; std::string followOrigin_; bool followOriginIsSet_; + std::string forceCache_; + bool forceCacheIsSet_; std::string urlParameterType_; bool urlParameterTypeIsSet_; std::string urlParameterValue_; diff --git a/cdn/src/v2/model/CacheRules.cpp b/cdn/src/v2/model/CacheRules.cpp index 8345dd614..b2db45fdf 100644 --- a/cdn/src/v2/model/CacheRules.cpp +++ b/cdn/src/v2/model/CacheRules.cpp @@ -24,6 +24,8 @@ CacheRules::CacheRules() priorityIsSet_ = false; followOrigin_ = ""; followOriginIsSet_ = false; + forceCache_ = ""; + forceCacheIsSet_ = false; urlParameterType_ = ""; urlParameterTypeIsSet_ = false; urlParameterValue_ = ""; @@ -58,6 +60,9 @@ web::json::value CacheRules::toJson() const if(followOriginIsSet_) { val[utility::conversions::to_string_t("follow_origin")] = ModelBase::toJson(followOrigin_); } + if(forceCacheIsSet_) { + val[utility::conversions::to_string_t("force_cache")] = ModelBase::toJson(forceCache_); + } if(urlParameterTypeIsSet_) { val[utility::conversions::to_string_t("url_parameter_type")] = ModelBase::toJson(urlParameterType_); } @@ -125,6 +130,15 @@ bool CacheRules::fromJson(const web::json::value& val) setFollowOrigin(refVal); } } + if(val.has_field(utility::conversions::to_string_t("force_cache"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("force_cache")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setForceCache(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("url_parameter_type"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("url_parameter_type")); if(!fieldValue.is_null()) @@ -273,6 +287,27 @@ void CacheRules::unsetfollowOrigin() followOriginIsSet_ = false; } +std::string CacheRules::getForceCache() const +{ + return forceCache_; +} + +void CacheRules::setForceCache(const std::string& value) +{ + forceCache_ = value; + forceCacheIsSet_ = true; +} + +bool CacheRules::forceCacheIsSet() const +{ + return forceCacheIsSet_; +} + +void CacheRules::unsetforceCache() +{ + forceCacheIsSet_ = false; +} + std::string CacheRules::getUrlParameterType() const { return urlParameterType_; diff --git a/csms/include/huaweicloud/csms/v1/model/ListUsersRequest.h b/csms/include/huaweicloud/csms/v1/model/ListUsersRequest.h index 9bcfd339a..5563c3ab4 100644 --- a/csms/include/huaweicloud/csms/v1/model/ListUsersRequest.h +++ b/csms/include/huaweicloud/csms/v1/model/ListUsersRequest.h @@ -69,10 +69,10 @@ class HUAWEICLOUD_CSMS_V1_EXPORT ListUsersRequest /// 最长64位,用户名,支持模糊查询 /// - std::string getUserName() const; - bool userNameIsSet() const; - void unsetuserName(); - void setUserName(const std::string& value); + std::string getUserInfo() const; + bool userInfoIsSet() const; + void unsetuserInfo(); + void setUserInfo(const std::string& value); protected: @@ -82,8 +82,8 @@ class HUAWEICLOUD_CSMS_V1_EXPORT ListUsersRequest bool offsetIsSet_; int32_t limit_; bool limitIsSet_; - std::string userName_; - bool userNameIsSet_; + std::string userInfo_; + bool userInfoIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/csms/src/v1/CsmsClient.cpp b/csms/src/v1/CsmsClient.cpp index 9a078ca98..2a415cc09 100644 --- a/csms/src/v1/CsmsClient.cpp +++ b/csms/src/v1/CsmsClient.cpp @@ -932,8 +932,8 @@ std::shared_ptr CsmsClient::listUsers(ListUsersRequest &reque if (request.limitIsSet()) { localVarQueryParams["limit"] = parameterToString(request.getLimit()); } - if (request.userNameIsSet()) { - localVarQueryParams["user_name"] = parameterToString(request.getUserName()); + if (request.userInfoIsSet()) { + localVarQueryParams["user_info"] = parameterToString(request.getUserInfo()); } std::string localVarHttpBody; diff --git a/csms/src/v1/CsmsMeta.cpp b/csms/src/v1/CsmsMeta.cpp index 24482095b..a78b8e66c 100644 --- a/csms/src/v1/CsmsMeta.cpp +++ b/csms/src/v1/CsmsMeta.cpp @@ -224,8 +224,8 @@ HttpRequestDef CsmsMeta::genRequestDefForListUsers() { reqDefBuilder.withRequestField(FieldDef().withName("Limit") .withJsonTag("limit") .withLocationType(Query_)); - reqDefBuilder.withRequestField(FieldDef().withName("UserName") - .withJsonTag("user_name") + reqDefBuilder.withRequestField(FieldDef().withName("UserInfo") + .withJsonTag("user_info") .withLocationType(Query_)); return reqDefBuilder; } diff --git a/csms/src/v1/model/ListUsersRequest.cpp b/csms/src/v1/model/ListUsersRequest.cpp index 96f84ab31..700aad671 100644 --- a/csms/src/v1/model/ListUsersRequest.cpp +++ b/csms/src/v1/model/ListUsersRequest.cpp @@ -18,8 +18,8 @@ ListUsersRequest::ListUsersRequest() offsetIsSet_ = false; limit_ = 0; limitIsSet_ = false; - userName_ = ""; - userNameIsSet_ = false; + userInfo_ = ""; + userInfoIsSet_ = false; } ListUsersRequest::~ListUsersRequest() = default; @@ -41,8 +41,8 @@ web::json::value ListUsersRequest::toJson() const if(limitIsSet_) { val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); } - if(userNameIsSet_) { - val[utility::conversions::to_string_t("user_name")] = ModelBase::toJson(userName_); + if(userInfoIsSet_) { + val[utility::conversions::to_string_t("user_info")] = ModelBase::toJson(userInfo_); } return val; @@ -78,13 +78,13 @@ bool ListUsersRequest::fromJson(const web::json::value& val) setLimit(refVal); } } - if(val.has_field(utility::conversions::to_string_t("user_name"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("user_name")); + if(val.has_field(utility::conversions::to_string_t("user_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("user_info")); if(!fieldValue.is_null()) { std::string refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setUserName(refVal); + setUserInfo(refVal); } } return ok; @@ -154,25 +154,25 @@ void ListUsersRequest::unsetlimit() limitIsSet_ = false; } -std::string ListUsersRequest::getUserName() const +std::string ListUsersRequest::getUserInfo() const { - return userName_; + return userInfo_; } -void ListUsersRequest::setUserName(const std::string& value) +void ListUsersRequest::setUserInfo(const std::string& value) { - userName_ = value; - userNameIsSet_ = true; + userInfo_ = value; + userInfoIsSet_ = true; } -bool ListUsersRequest::userNameIsSet() const +bool ListUsersRequest::userInfoIsSet() const { - return userNameIsSet_; + return userInfoIsSet_; } -void ListUsersRequest::unsetuserName() +void ListUsersRequest::unsetuserInfo() { - userNameIsSet_ = false; + userInfoIsSet_ = false; } } diff --git a/dds/include/huaweicloud/dds/v3/model/ResizeInstanceOption.h b/dds/include/huaweicloud/dds/v3/model/ResizeInstanceOption.h index 990f3967e..c3971d57d 100644 --- a/dds/include/huaweicloud/dds/v3/model/ResizeInstanceOption.h +++ b/dds/include/huaweicloud/dds/v3/model/ResizeInstanceOption.h @@ -10,6 +10,7 @@ #include #include +#include namespace HuaweiCloud { namespace Sdk { @@ -56,6 +57,15 @@ class HUAWEICLOUD_DDS_V3_EXPORT ResizeInstanceOption void unsettargetId(); void setTargetId(const std::string& value); + /// + /// 待变更规格的节点组ID列表,可以调用“查询实例列表和详情”接口获取。如果未申请实例,可以调用“创建实例”接口创建。 - 对于集群实例,变更mongos节点规格时,不传该参数;变更单个shard组规格时,不传该参数;变更config组规格时,不传该参数;批量变更多个shard组规格时,取值为相应的多个shard组ID,最多支持16个shard组批量变更。 - 对于副本集实例,不传该参数。 - 对于单节点实例,不传该参数。 + /// + + std::vector& getTargetIds(); + bool targetIdsIsSet() const; + void unsettargetIds(); + void setTargetIds(const std::vector& value); + /// /// 变更至新规格的资源规格编码。 /// @@ -71,6 +81,8 @@ class HUAWEICLOUD_DDS_V3_EXPORT ResizeInstanceOption bool targetTypeIsSet_; std::string targetId_; bool targetIdIsSet_; + std::vector targetIds_; + bool targetIdsIsSet_; std::string targetSpecCode_; bool targetSpecCodeIsSet_; diff --git a/dds/src/v3/model/ResizeInstanceOption.cpp b/dds/src/v3/model/ResizeInstanceOption.cpp index a546f77e7..bc090b045 100644 --- a/dds/src/v3/model/ResizeInstanceOption.cpp +++ b/dds/src/v3/model/ResizeInstanceOption.cpp @@ -16,6 +16,7 @@ ResizeInstanceOption::ResizeInstanceOption() targetTypeIsSet_ = false; targetId_ = ""; targetIdIsSet_ = false; + targetIdsIsSet_ = false; targetSpecCode_ = ""; targetSpecCodeIsSet_ = false; } @@ -36,6 +37,9 @@ web::json::value ResizeInstanceOption::toJson() const if(targetIdIsSet_) { val[utility::conversions::to_string_t("target_id")] = ModelBase::toJson(targetId_); } + if(targetIdsIsSet_) { + val[utility::conversions::to_string_t("target_ids")] = ModelBase::toJson(targetIds_); + } if(targetSpecCodeIsSet_) { val[utility::conversions::to_string_t("target_spec_code")] = ModelBase::toJson(targetSpecCode_); } @@ -64,6 +68,15 @@ bool ResizeInstanceOption::fromJson(const web::json::value& val) setTargetId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("target_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetIds(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("target_spec_code"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_spec_code")); if(!fieldValue.is_null()) @@ -119,6 +132,27 @@ void ResizeInstanceOption::unsettargetId() targetIdIsSet_ = false; } +std::vector& ResizeInstanceOption::getTargetIds() +{ + return targetIds_; +} + +void ResizeInstanceOption::setTargetIds(const std::vector& value) +{ + targetIds_ = value; + targetIdsIsSet_ = true; +} + +bool ResizeInstanceOption::targetIdsIsSet() const +{ + return targetIdsIsSet_; +} + +void ResizeInstanceOption::unsettargetIds() +{ + targetIdsIsSet_ = false; +} + std::string ResizeInstanceOption::getTargetSpecCode() const { return targetSpecCode_; diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h index ab15ee076..8306127af 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -178,6 +179,24 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT StarRocksCreateRequest void unsetsecurityGroupId(); void setSecurityGroupId(const std::string& value); + /// + /// + /// + + StarRocksCreateRequest_pay_info getPayInfo() const; + bool payInfoIsSet() const; + void unsetpayInfo(); + void setPayInfo(const StarRocksCreateRequest_pay_info& value); + + /// + /// 可用区。包周期场景必填。 + /// + + std::string getRegionCode() const; + bool regionCodeIsSet() const; + void unsetregionCode(); + void setRegionCode(const std::string& value); + protected: std::string name_; @@ -210,6 +229,10 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT StarRocksCreateRequest bool tagsInfoIsSet_; std::string securityGroupId_; bool securityGroupIdIsSet_; + StarRocksCreateRequest_pay_info payInfo_; + bool payInfoIsSet_; + std::string regionCode_; + bool regionCodeIsSet_; }; diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest_pay_info.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest_pay_info.h new file mode 100644 index 000000000..ba07f20f3 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest_pay_info.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_StarRocksCreateRequest_pay_info_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_StarRocksCreateRequest_pay_info_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 支付信息。包周期场景必填。 +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT StarRocksCreateRequest_pay_info + : public ModelBase +{ +public: + StarRocksCreateRequest_pay_info(); + virtual ~StarRocksCreateRequest_pay_info(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// StarRocksCreateRequest_pay_info members + + /// + /// 计费模式,默认0。包周期场景必填。 取值范围: - 0:按需计费 - 1:包周期 + /// + + std::string getPayModel() const; + bool payModelIsSet() const; + void unsetpayModel(); + void setPayModel(const std::string& value); + + /// + /// 包周期周期。包周期场景必填。 + /// + + std::string getPeriod() const; + bool periodIsSet() const; + void unsetperiod(); + void setPeriod(const std::string& value); + + /// + /// 包周期周期类型。包周期场景必填。 取值范围: - 2:包月 - 3:包年 + /// + + std::string getPeriodType() const; + bool periodTypeIsSet() const; + void unsetperiodType(); + void setPeriodType(const std::string& value); + + /// + /// 包周期是否自动续费。包周期场景必填。 取值范围: - 1:自动续费 - 0:不自动续费 + /// + + std::string getIsAutoRenew() const; + bool isAutoRenewIsSet() const; + void unsetisAutoRenew(); + void setIsAutoRenew(const std::string& value); + + +protected: + std::string payModel_; + bool payModelIsSet_; + std::string period_; + bool periodIsSet_; + std::string periodType_; + bool periodTypeIsSet_; + std::string isAutoRenew_; + bool isAutoRenewIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_StarRocksCreateRequest_pay_info_H_ diff --git a/gaussdb/src/v3/model/StarRocksCreateRequest.cpp b/gaussdb/src/v3/model/StarRocksCreateRequest.cpp index fa1de2471..78a5f974a 100644 --- a/gaussdb/src/v3/model/StarRocksCreateRequest.cpp +++ b/gaussdb/src/v3/model/StarRocksCreateRequest.cpp @@ -37,6 +37,9 @@ StarRocksCreateRequest::StarRocksCreateRequest() tagsInfoIsSet_ = false; securityGroupId_ = ""; securityGroupIdIsSet_ = false; + payInfoIsSet_ = false; + regionCode_ = ""; + regionCodeIsSet_ = false; } StarRocksCreateRequest::~StarRocksCreateRequest() = default; @@ -94,6 +97,12 @@ web::json::value StarRocksCreateRequest::toJson() const if(securityGroupIdIsSet_) { val[utility::conversions::to_string_t("security_group_id")] = ModelBase::toJson(securityGroupId_); } + if(payInfoIsSet_) { + val[utility::conversions::to_string_t("pay_info")] = ModelBase::toJson(payInfo_); + } + if(regionCodeIsSet_) { + val[utility::conversions::to_string_t("region_code")] = ModelBase::toJson(regionCode_); + } return val; } @@ -236,6 +245,24 @@ bool StarRocksCreateRequest::fromJson(const web::json::value& val) setSecurityGroupId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("pay_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("pay_info")); + if(!fieldValue.is_null()) + { + StarRocksCreateRequest_pay_info refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPayInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("region_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("region_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRegionCode(refVal); + } + } return ok; } @@ -555,6 +582,48 @@ void StarRocksCreateRequest::unsetsecurityGroupId() securityGroupIdIsSet_ = false; } +StarRocksCreateRequest_pay_info StarRocksCreateRequest::getPayInfo() const +{ + return payInfo_; +} + +void StarRocksCreateRequest::setPayInfo(const StarRocksCreateRequest_pay_info& value) +{ + payInfo_ = value; + payInfoIsSet_ = true; +} + +bool StarRocksCreateRequest::payInfoIsSet() const +{ + return payInfoIsSet_; +} + +void StarRocksCreateRequest::unsetpayInfo() +{ + payInfoIsSet_ = false; +} + +std::string StarRocksCreateRequest::getRegionCode() const +{ + return regionCode_; +} + +void StarRocksCreateRequest::setRegionCode(const std::string& value) +{ + regionCode_ = value; + regionCodeIsSet_ = true; +} + +bool StarRocksCreateRequest::regionCodeIsSet() const +{ + return regionCodeIsSet_; +} + +void StarRocksCreateRequest::unsetregionCode() +{ + regionCodeIsSet_ = false; +} + } } } diff --git a/gaussdb/src/v3/model/StarRocksCreateRequest_pay_info.cpp b/gaussdb/src/v3/model/StarRocksCreateRequest_pay_info.cpp new file mode 100644 index 000000000..c93a2362b --- /dev/null +++ b/gaussdb/src/v3/model/StarRocksCreateRequest_pay_info.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/gaussdb/v3/model/StarRocksCreateRequest_pay_info.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +StarRocksCreateRequest_pay_info::StarRocksCreateRequest_pay_info() +{ + payModel_ = ""; + payModelIsSet_ = false; + period_ = ""; + periodIsSet_ = false; + periodType_ = ""; + periodTypeIsSet_ = false; + isAutoRenew_ = ""; + isAutoRenewIsSet_ = false; +} + +StarRocksCreateRequest_pay_info::~StarRocksCreateRequest_pay_info() = default; + +void StarRocksCreateRequest_pay_info::validate() +{ +} + +web::json::value StarRocksCreateRequest_pay_info::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(payModelIsSet_) { + val[utility::conversions::to_string_t("pay_model")] = ModelBase::toJson(payModel_); + } + if(periodIsSet_) { + val[utility::conversions::to_string_t("period")] = ModelBase::toJson(period_); + } + if(periodTypeIsSet_) { + val[utility::conversions::to_string_t("period_type")] = ModelBase::toJson(periodType_); + } + if(isAutoRenewIsSet_) { + val[utility::conversions::to_string_t("is_auto_renew")] = ModelBase::toJson(isAutoRenew_); + } + + return val; +} +bool StarRocksCreateRequest_pay_info::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("pay_model"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("pay_model")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPayModel(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("period"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriod(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("is_auto_renew"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_auto_renew")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsAutoRenew(refVal); + } + } + return ok; +} + + +std::string StarRocksCreateRequest_pay_info::getPayModel() const +{ + return payModel_; +} + +void StarRocksCreateRequest_pay_info::setPayModel(const std::string& value) +{ + payModel_ = value; + payModelIsSet_ = true; +} + +bool StarRocksCreateRequest_pay_info::payModelIsSet() const +{ + return payModelIsSet_; +} + +void StarRocksCreateRequest_pay_info::unsetpayModel() +{ + payModelIsSet_ = false; +} + +std::string StarRocksCreateRequest_pay_info::getPeriod() const +{ + return period_; +} + +void StarRocksCreateRequest_pay_info::setPeriod(const std::string& value) +{ + period_ = value; + periodIsSet_ = true; +} + +bool StarRocksCreateRequest_pay_info::periodIsSet() const +{ + return periodIsSet_; +} + +void StarRocksCreateRequest_pay_info::unsetperiod() +{ + periodIsSet_ = false; +} + +std::string StarRocksCreateRequest_pay_info::getPeriodType() const +{ + return periodType_; +} + +void StarRocksCreateRequest_pay_info::setPeriodType(const std::string& value) +{ + periodType_ = value; + periodTypeIsSet_ = true; +} + +bool StarRocksCreateRequest_pay_info::periodTypeIsSet() const +{ + return periodTypeIsSet_; +} + +void StarRocksCreateRequest_pay_info::unsetperiodType() +{ + periodTypeIsSet_ = false; +} + +std::string StarRocksCreateRequest_pay_info::getIsAutoRenew() const +{ + return isAutoRenew_; +} + +void StarRocksCreateRequest_pay_info::setIsAutoRenew(const std::string& value) +{ + isAutoRenew_ = value; + isAutoRenewIsSet_ = true; +} + +bool StarRocksCreateRequest_pay_info::isAutoRenewIsSet() const +{ + return isAutoRenewIsSet_; +} + +void StarRocksCreateRequest_pay_info::unsetisAutoRenew() +{ + isAutoRenewIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/include/huaweicloud/lts/v2/LtsClient.h b/lts/include/huaweicloud/lts/v2/LtsClient.h index 879ff2b79..2f8a26505 100644 --- a/lts/include/huaweicloud/lts/v2/LtsClient.h +++ b/lts/include/huaweicloud/lts/v2/LtsClient.h @@ -111,6 +111,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -594,6 +597,14 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsClient : public Client std::shared_ptr listKeywordsAlarmRules( ListKeywordsAlarmRulesRequest &request ); + // 查询上下文日志 + // + // 查询上下文日志 该接口用于查询指定日志前(上文)后(下文)的若干条日志。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listLogContext( + ListLogContextRequest &request + ); // 查询账号下所有日志组 // // 该接口用于查询账号下所有日志组。 diff --git a/lts/include/huaweicloud/lts/v2/LtsMeta.h b/lts/include/huaweicloud/lts/v2/LtsMeta.h index be742b2e9..a58fd88e0 100644 --- a/lts/include/huaweicloud/lts/v2/LtsMeta.h +++ b/lts/include/huaweicloud/lts/v2/LtsMeta.h @@ -53,6 +53,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsMeta { static HttpRequestDef genRequestDefForListHost(); static HttpRequestDef genRequestDefForListHostGroup(); static HttpRequestDef genRequestDefForListKeywordsAlarmRules(); + static HttpRequestDef genRequestDefForListLogContext(); static HttpRequestDef genRequestDefForListLogGroups(); static HttpRequestDef genRequestDefForListLogHistogram(); static HttpRequestDef genRequestDefForListLogStream(); diff --git a/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilCreate.h b/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilCreate.h index 4a0c563ac..4737f877b 100644 --- a/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilCreate.h +++ b/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilCreate.h @@ -213,6 +213,87 @@ class HUAWEICLOUD_LTS_V2_EXPORT AccessConfigDeatilCreate void unsetlogK8s(); void setLogK8s(const std::map& value); + /// + /// 是否允许此文件重复采集 + /// + + bool isRepeatCollect() const; + bool repeatCollectIsSet() const; + void unsetrepeatCollect(); + void setRepeatCollect(bool value); + + /// + /// 系统内置字段:配置日志接入规则时,可以配置系统内置字段,上报日志后,每条日志数据的标签数据中将会有系统字段 采集场景为主机文件的内置字段为:hostName、hostId、hostIP、pathFile、hostIPv6、category、collectTime、__host_group__ 采集场景为K8S集群容器文件的内置字段为:hostName、hostId、hostIP、pathFile、hostIPv6、clusterId、podName、appName、containerName、nameSpace、category、collectTime、__host_group__、serviceID、podIp、clusterName、workloadType 若修改时传入此字段,将覆盖原有配置 + /// + + std::vector& getSystemFields(); + bool systemFieldsIsSet() const; + void unsetsystemFields(); + void setSystemFields(const std::vector& value); + + /// + /// 自定义键值对:配置日志接入规则时,可以配置自定义键值对规则,上报日志后,每条日志数据的标签数据中将会有用户自定义的键值对字段,键值对数量不超过20 键的长度限制为128,允许的字符有a-zA-Z0-9_- 值的长度限制为1024 + /// + + std::map& getCustomKeyValue(); + bool customKeyValueIsSet() const; + void unsetcustomKeyValue(); + void setCustomKeyValue(const std::map& value); + + /// + /// 容器 Label白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeLabelsLogical() const; + bool includeLabelsLogicalIsSet() const; + void unsetincludeLabelsLogical(); + void setIncludeLabelsLogical(const std::string& value); + + /// + /// 容器 Label黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeLabelsLogical() const; + bool excludeLabelsLogicalIsSet() const; + void unsetexcludeLabelsLogical(); + void setExcludeLabelsLogical(const std::string& value); + + /// + /// K8S Label白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeK8sLabelsLogical() const; + bool includeK8sLabelsLogicalIsSet() const; + void unsetincludeK8sLabelsLogical(); + void setIncludeK8sLabelsLogical(const std::string& value); + + /// + /// K8S Label黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeK8sLabelsLogical() const; + bool excludeK8sLabelsLogicalIsSet() const; + void unsetexcludeK8sLabelsLogical(); + void setExcludeK8sLabelsLogical(const std::string& value); + + /// + /// 环境变量白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeEnvsLogical() const; + bool includeEnvsLogicalIsSet() const; + void unsetincludeEnvsLogical(); + void setIncludeEnvsLogical(const std::string& value); + + /// + /// 环境变量黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeEnvsLogical() const; + bool excludeEnvsLogicalIsSet() const; + void unsetexcludeEnvsLogical(); + void setExcludeEnvsLogical(const std::string& value); + protected: std::vector paths_; @@ -253,6 +334,24 @@ class HUAWEICLOUD_LTS_V2_EXPORT AccessConfigDeatilCreate bool excludeK8sLabelsIsSet_; std::map logK8s_; bool logK8sIsSet_; + bool repeatCollect_; + bool repeatCollectIsSet_; + std::vector systemFields_; + bool systemFieldsIsSet_; + std::map customKeyValue_; + bool customKeyValueIsSet_; + std::string includeLabelsLogical_; + bool includeLabelsLogicalIsSet_; + std::string excludeLabelsLogical_; + bool excludeLabelsLogicalIsSet_; + std::string includeK8sLabelsLogical_; + bool includeK8sLabelsLogicalIsSet_; + std::string excludeK8sLabelsLogical_; + bool excludeK8sLabelsLogicalIsSet_; + std::string includeEnvsLogical_; + bool includeEnvsLogicalIsSet_; + std::string excludeEnvsLogical_; + bool excludeEnvsLogicalIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilUpdate.h b/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilUpdate.h index a2738d443..9dd0889e2 100644 --- a/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilUpdate.h +++ b/lts/include/huaweicloud/lts/v2/model/AccessConfigDeatilUpdate.h @@ -213,6 +213,78 @@ class HUAWEICLOUD_LTS_V2_EXPORT AccessConfigDeatilUpdate void unsetlogK8s(); void setLogK8s(const std::map& value); + /// + /// 系统内置字段:配置日志接入规则时,可以配置系统内置字段,上报日志后,每条日志数据的标签数据中将会有系统字段 采集场景为主机文件的内置字段为:hostName、hostId、hostIP、pathFile、hostIPv6、category、collectTime、__host_group__ 采集场景为K8S集群容器文件的内置字段为:hostName、hostId、hostIP、pathFile、hostIPv6、clusterId、podName、appName、containerName、nameSpace、category、collectTime、__host_group__、serviceID、podIp、clusterName、workloadType 若修改时传入此字段,将覆盖原有配置 + /// + + std::vector& getSystemFields(); + bool systemFieldsIsSet() const; + void unsetsystemFields(); + void setSystemFields(const std::vector& value); + + /// + /// 自定义键值对:配置日志接入规则时,可以配置自定义键值对规则,上报日志后,每条日志数据的标签数据中将会有用户自定义的键值对字段,键值对数量不超过20 键的长度限制为128,允许的字符有a-zA-Z0-9_- 值的长度限制为1024 若修改时传入此字段,将覆盖原有配置 + /// + + std::map& getCustomKeyValue(); + bool customKeyValueIsSet() const; + void unsetcustomKeyValue(); + void setCustomKeyValue(const std::map& value); + + /// + /// 容器 Label白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeLabelsLogical() const; + bool includeLabelsLogicalIsSet() const; + void unsetincludeLabelsLogical(); + void setIncludeLabelsLogical(const std::string& value); + + /// + /// 容器 Label黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeLabelsLogical() const; + bool excludeLabelsLogicalIsSet() const; + void unsetexcludeLabelsLogical(); + void setExcludeLabelsLogical(const std::string& value); + + /// + /// K8S Label白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeK8sLabelsLogical() const; + bool includeK8sLabelsLogicalIsSet() const; + void unsetincludeK8sLabelsLogical(); + void setIncludeK8sLabelsLogical(const std::string& value); + + /// + /// K8S Label黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeK8sLabelsLogical() const; + bool excludeK8sLabelsLogicalIsSet() const; + void unsetexcludeK8sLabelsLogical(); + void setExcludeK8sLabelsLogical(const std::string& value); + + /// + /// 环境变量白名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getIncludeEnvsLogical() const; + bool includeEnvsLogicalIsSet() const; + void unsetincludeEnvsLogical(); + void setIncludeEnvsLogical(const std::string& value); + + /// + /// 环境变量黑名单,可选为AND,OR,不配置时默认为OR;当存在多个值时的处理逻辑,AND表示同时满足才会生效,OR表示有一项满足就会生效 + /// + + std::string getExcludeEnvsLogical() const; + bool excludeEnvsLogicalIsSet() const; + void unsetexcludeEnvsLogical(); + void setExcludeEnvsLogical(const std::string& value); + protected: std::vector paths_; @@ -253,6 +325,22 @@ class HUAWEICLOUD_LTS_V2_EXPORT AccessConfigDeatilUpdate bool excludeK8sLabelsIsSet_; std::map logK8s_; bool logK8sIsSet_; + std::vector systemFields_; + bool systemFieldsIsSet_; + std::map customKeyValue_; + bool customKeyValueIsSet_; + std::string includeLabelsLogical_; + bool includeLabelsLogicalIsSet_; + std::string excludeLabelsLogical_; + bool excludeLabelsLogicalIsSet_; + std::string includeK8sLabelsLogical_; + bool includeK8sLabelsLogicalIsSet_; + std::string excludeK8sLabelsLogical_; + bool excludeK8sLabelsLogicalIsSet_; + std::string includeEnvsLogical_; + bool includeEnvsLogicalIsSet_; + std::string excludeEnvsLogical_; + bool excludeEnvsLogicalIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/LTSFieldsInfo.h b/lts/include/huaweicloud/lts/v2/model/LTSFieldsInfo.h index 91f79f66b..592480ed6 100644 --- a/lts/include/huaweicloud/lts/v2/model/LTSFieldsInfo.h +++ b/lts/include/huaweicloud/lts/v2/model/LTSFieldsInfo.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace HuaweiCloud { @@ -102,6 +103,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT LTSFieldsInfo void unsetascii(); void setAscii(const std::vector& value); + /// + /// json字段信息 + /// + + std::vector& getLtsSubFieldsInfoList(); + bool ltsSubFieldsInfoListIsSet() const; + void unsetltsSubFieldsInfoList(); + void setLtsSubFieldsInfoList(const std::vector& value); + protected: std::string fieldType_; @@ -118,6 +128,8 @@ class HUAWEICLOUD_LTS_V2_EXPORT LTSFieldsInfo bool quickAnalysisIsSet_; std::vector ascii_; bool asciiIsSet_; + std::vector ltsSubFieldsInfoList_; + bool ltsSubFieldsInfoListIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/LTSSubFieldsInfo.h b/lts/include/huaweicloud/lts/v2/model/LTSSubFieldsInfo.h new file mode 100644 index 000000000..3c352d04b --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/LTSSubFieldsInfo.h @@ -0,0 +1,131 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSSubFieldsInfo_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSSubFieldsInfo_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; +/// +/// json子字段信息 +/// +class HUAWEICLOUD_LTS_V2_EXPORT LTSSubFieldsInfo + : public ModelBase +{ +public: + LTSSubFieldsInfo(); + virtual ~LTSSubFieldsInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// LTSSubFieldsInfo members + + /// + /// 字段类型 + /// + + std::string getFieldType() const; + bool fieldTypeIsSet() const; + void unsetfieldType(); + void setFieldType(const std::string& value); + + /// + /// 字段名称 + /// + + std::string getFieldName() const; + bool fieldNameIsSet() const; + void unsetfieldName(); + void setFieldName(const std::string& value); + + /// + /// 是否大小写敏感 + /// + + bool isCaseSensitive() const; + bool caseSensitiveIsSet() const; + void unsetcaseSensitive(); + void setCaseSensitive(bool value); + + /// + /// 是否包含中文 + /// + + bool isIncludeChinese() const; + bool includeChineseIsSet() const; + void unsetincludeChinese(); + void setIncludeChinese(bool value); + + /// + /// 分词符 + /// + + std::string getTokenizer() const; + bool tokenizerIsSet() const; + void unsettokenizer(); + void setTokenizer(const std::string& value); + + /// + /// 是否快速分析 + /// + + bool isQuickAnalysis() const; + bool quickAnalysisIsSet() const; + void unsetquickAnalysis(); + void setQuickAnalysis(bool value); + + /// + /// 特殊分词符 + /// + + std::vector& getAscii(); + bool asciiIsSet() const; + void unsetascii(); + void setAscii(const std::vector& value); + + +protected: + std::string fieldType_; + bool fieldTypeIsSet_; + std::string fieldName_; + bool fieldNameIsSet_; + bool caseSensitive_; + bool caseSensitiveIsSet_; + bool includeChinese_; + bool includeChineseIsSet_; + std::string tokenizer_; + bool tokenizerIsSet_; + bool quickAnalysis_; + bool quickAnalysisIsSet_; + std::vector ascii_; + bool asciiIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_LTSSubFieldsInfo_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListLogContextRequest.h b/lts/include/huaweicloud/lts/v2/model/ListLogContextRequest.h new file mode 100644 index 000000000..7ec7a8d0f --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListLogContextRequest.h @@ -0,0 +1,105 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequest_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 ListLogContextRequest + : public ModelBase +{ +public: + ListLogContextRequest(); + virtual ~ListLogContextRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListLogContextRequest members + + /// + /// 日志组ID,获取方式请参见:[获取项目ID,获取账号ID,日志组ID、日志流ID](lts_api_0006.xml) + /// + + std::string getLogGroupId() const; + bool logGroupIdIsSet() const; + void unsetlogGroupId(); + void setLogGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:[获取项目ID,获取账号ID,日志组ID、日志流ID](lts_api_0006.xml) + /// + + std::string getLogStreamId() const; + bool logStreamIdIsSet() const; + void unsetlogStreamId(); + void setLogStreamId(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// + /// + + ListLogContextRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ListLogContextRequestBody& value); + + +protected: + std::string logGroupId_; + bool logGroupIdIsSet_; + std::string logStreamId_; + bool logStreamIdIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + ListLogContextRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListLogContextRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListLogContextRequestBody.h b/lts/include/huaweicloud/lts/v2/model/ListLogContextRequestBody.h new file mode 100644 index 000000000..c3db85444 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListLogContextRequestBody.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequestBody_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequestBody_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 ListLogContextRequestBody + : public ModelBase +{ +public: + ListLogContextRequestBody(); + virtual ~ListLogContextRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListLogContextRequestBody members + + /// + /// 日志单行序列号,字段值需要从日志结果中获取,纳秒级时间戳。 + /// + + std::string getLineNum() const; + bool lineNumIsSet() const; + void unsetlineNum(); + void setLineNum(const std::string& value); + + /// + /// 自定义时间特性时间字段,字段值需要从日志结果中获取,毫秒级时间戳。若已开启云端结构化自定义时间功能,需要使用该字段和line_num字段共同进行上下文查询。 + /// + + std::string getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(const std::string& value); + + /// + /// 指定起始日志往前(上文)的日志条数,取值范围 [0, 500] ,默认值100 + /// + + int32_t getBackwardsSize() const; + bool backwardsSizeIsSet() const; + void unsetbackwardsSize(); + void setBackwardsSize(int32_t value); + + /// + /// 指定起始日志往后(下文)的日志条数,取值范围 [0, 500] ,默认值100 + /// + + int32_t getForwardsSize() const; + bool forwardsSizeIsSet() const; + void unsetforwardsSize(); + void setForwardsSize(int32_t value); + + +protected: + std::string lineNum_; + bool lineNumIsSet_; + std::string time_; + bool timeIsSet_; + int32_t backwardsSize_; + bool backwardsSizeIsSet_; + int32_t forwardsSize_; + bool forwardsSizeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextRequestBody_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListLogContextResponse.h b/lts/include/huaweicloud/lts/v2/model/ListLogContextResponse.h new file mode 100644 index 000000000..22b24e184 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListLogContextResponse.h @@ -0,0 +1,112 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextResponse_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 ListLogContextResponse + : public ModelBase, public HttpResponse +{ +public: + ListLogContextResponse(); + virtual ~ListLogContextResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListLogContextResponse members + + /// + /// 上下文日志信息。 + /// + + std::vector& getLogs(); + bool logsIsSet() const; + void unsetlogs(); + void setLogs(const std::vector& value); + + /// + /// 返回的总日志条数,包含请求参数中所指定的起始日志。 + /// + + int32_t getTotalCount() const; + bool totalCountIsSet() const; + void unsettotalCount(); + void setTotalCount(int32_t value); + + /// + /// 向前查询到的日志条数。 + /// + + int32_t getBackwardsCount() const; + bool backwardsCountIsSet() const; + void unsetbackwardsCount(); + void setBackwardsCount(int32_t value); + + /// + /// 向后查询到的日志条数。 + /// + + int32_t getForwardsCount() const; + bool forwardsCountIsSet() const; + void unsetforwardsCount(); + void setForwardsCount(int32_t value); + + /// + /// 是否查询完成。 + /// + + bool isIsQueryComplete() const; + bool isQueryCompleteIsSet() const; + void unsetisQueryComplete(); + void setIsQueryComplete(bool value); + + +protected: + std::vector logs_; + bool logsIsSet_; + int32_t totalCount_; + bool totalCountIsSet_; + int32_t backwardsCount_; + bool backwardsCountIsSet_; + int32_t forwardsCount_; + bool forwardsCountIsSet_; + bool isQueryComplete_; + bool isQueryCompleteIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListLogContextResponse_H_ diff --git a/lts/src/v2/LtsClient.cpp b/lts/src/v2/LtsClient.cpp index c1a0aea1e..af946cd3b 100644 --- a/lts/src/v2/LtsClient.cpp +++ b/lts/src/v2/LtsClient.cpp @@ -1682,6 +1682,52 @@ std::shared_ptr LtsClient::listKeywordsAlarmRule return localVarResult; } +std::shared_ptr LtsClient::listLogContext(ListLogContextRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/context"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["log_group_id"] = parameterToString(request.getLogGroupId()); + localVarPathParams["log_stream_id"] = parameterToString(request.getLogStreamId()); + + 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::genRequestDefForListLogContext()); + + 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::listLogGroups(ListLogGroupsRequest &request) { std::string localVarPath = "/v2/{project_id}/groups"; diff --git a/lts/src/v2/LtsMeta.cpp b/lts/src/v2/LtsMeta.cpp index ca99312c0..9dbcfc6ba 100644 --- a/lts/src/v2/LtsMeta.cpp +++ b/lts/src/v2/LtsMeta.cpp @@ -537,6 +537,20 @@ HttpRequestDef LtsMeta::genRequestDefForListKeywordsAlarmRules() { return reqDefBuilder; } +HttpRequestDef LtsMeta::genRequestDefForListLogContext() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef LtsMeta::genRequestDefForListLogGroups() { HttpRequestDef reqDefBuilder; FieldDef headerParamContentType; diff --git a/lts/src/v2/model/AccessConfigDeatilCreate.cpp b/lts/src/v2/model/AccessConfigDeatilCreate.cpp index 67bf1467a..1a8393068 100644 --- a/lts/src/v2/model/AccessConfigDeatilCreate.cpp +++ b/lts/src/v2/model/AccessConfigDeatilCreate.cpp @@ -37,6 +37,22 @@ AccessConfigDeatilCreate::AccessConfigDeatilCreate() includeK8sLabelsIsSet_ = false; excludeK8sLabelsIsSet_ = false; logK8sIsSet_ = false; + repeatCollect_ = false; + repeatCollectIsSet_ = false; + systemFieldsIsSet_ = false; + customKeyValueIsSet_ = false; + includeLabelsLogical_ = ""; + includeLabelsLogicalIsSet_ = false; + excludeLabelsLogical_ = ""; + excludeLabelsLogicalIsSet_ = false; + includeK8sLabelsLogical_ = ""; + includeK8sLabelsLogicalIsSet_ = false; + excludeK8sLabelsLogical_ = ""; + excludeK8sLabelsLogicalIsSet_ = false; + includeEnvsLogical_ = ""; + includeEnvsLogicalIsSet_ = false; + excludeEnvsLogical_ = ""; + excludeEnvsLogicalIsSet_ = false; } AccessConfigDeatilCreate::~AccessConfigDeatilCreate() = default; @@ -106,6 +122,33 @@ web::json::value AccessConfigDeatilCreate::toJson() const if(logK8sIsSet_) { val[utility::conversions::to_string_t("logK8s")] = ModelBase::toJson(logK8s_); } + if(repeatCollectIsSet_) { + val[utility::conversions::to_string_t("repeat_collect")] = ModelBase::toJson(repeatCollect_); + } + if(systemFieldsIsSet_) { + val[utility::conversions::to_string_t("system_fields")] = ModelBase::toJson(systemFields_); + } + if(customKeyValueIsSet_) { + val[utility::conversions::to_string_t("custom_key_value")] = ModelBase::toJson(customKeyValue_); + } + if(includeLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeLabelsLogical")] = ModelBase::toJson(includeLabelsLogical_); + } + if(excludeLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeLabelsLogical")] = ModelBase::toJson(excludeLabelsLogical_); + } + if(includeK8sLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeK8sLabelsLogical")] = ModelBase::toJson(includeK8sLabelsLogical_); + } + if(excludeK8sLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeK8sLabelsLogical")] = ModelBase::toJson(excludeK8sLabelsLogical_); + } + if(includeEnvsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeEnvsLogical")] = ModelBase::toJson(includeEnvsLogical_); + } + if(excludeEnvsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeEnvsLogical")] = ModelBase::toJson(excludeEnvsLogical_); + } return val; } @@ -284,6 +327,87 @@ bool AccessConfigDeatilCreate::fromJson(const web::json::value& val) setLogK8s(refVal); } } + if(val.has_field(utility::conversions::to_string_t("repeat_collect"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("repeat_collect")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRepeatCollect(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("system_fields"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("system_fields")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSystemFields(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("custom_key_value"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("custom_key_value")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCustomKeyValue(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeK8sLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeK8sLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeK8sLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeK8sLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeK8sLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeK8sLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeEnvsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeEnvsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeEnvsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeEnvsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeEnvsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeEnvsLogical(refVal); + } + } return ok; } @@ -687,6 +811,195 @@ void AccessConfigDeatilCreate::unsetlogK8s() logK8sIsSet_ = false; } +bool AccessConfigDeatilCreate::isRepeatCollect() const +{ + return repeatCollect_; +} + +void AccessConfigDeatilCreate::setRepeatCollect(bool value) +{ + repeatCollect_ = value; + repeatCollectIsSet_ = true; +} + +bool AccessConfigDeatilCreate::repeatCollectIsSet() const +{ + return repeatCollectIsSet_; +} + +void AccessConfigDeatilCreate::unsetrepeatCollect() +{ + repeatCollectIsSet_ = false; +} + +std::vector& AccessConfigDeatilCreate::getSystemFields() +{ + return systemFields_; +} + +void AccessConfigDeatilCreate::setSystemFields(const std::vector& value) +{ + systemFields_ = value; + systemFieldsIsSet_ = true; +} + +bool AccessConfigDeatilCreate::systemFieldsIsSet() const +{ + return systemFieldsIsSet_; +} + +void AccessConfigDeatilCreate::unsetsystemFields() +{ + systemFieldsIsSet_ = false; +} + +std::map& AccessConfigDeatilCreate::getCustomKeyValue() +{ + return customKeyValue_; +} + +void AccessConfigDeatilCreate::setCustomKeyValue(const std::map& value) +{ + customKeyValue_ = value; + customKeyValueIsSet_ = true; +} + +bool AccessConfigDeatilCreate::customKeyValueIsSet() const +{ + return customKeyValueIsSet_; +} + +void AccessConfigDeatilCreate::unsetcustomKeyValue() +{ + customKeyValueIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getIncludeLabelsLogical() const +{ + return includeLabelsLogical_; +} + +void AccessConfigDeatilCreate::setIncludeLabelsLogical(const std::string& value) +{ + includeLabelsLogical_ = value; + includeLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::includeLabelsLogicalIsSet() const +{ + return includeLabelsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetincludeLabelsLogical() +{ + includeLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getExcludeLabelsLogical() const +{ + return excludeLabelsLogical_; +} + +void AccessConfigDeatilCreate::setExcludeLabelsLogical(const std::string& value) +{ + excludeLabelsLogical_ = value; + excludeLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::excludeLabelsLogicalIsSet() const +{ + return excludeLabelsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetexcludeLabelsLogical() +{ + excludeLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getIncludeK8sLabelsLogical() const +{ + return includeK8sLabelsLogical_; +} + +void AccessConfigDeatilCreate::setIncludeK8sLabelsLogical(const std::string& value) +{ + includeK8sLabelsLogical_ = value; + includeK8sLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::includeK8sLabelsLogicalIsSet() const +{ + return includeK8sLabelsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetincludeK8sLabelsLogical() +{ + includeK8sLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getExcludeK8sLabelsLogical() const +{ + return excludeK8sLabelsLogical_; +} + +void AccessConfigDeatilCreate::setExcludeK8sLabelsLogical(const std::string& value) +{ + excludeK8sLabelsLogical_ = value; + excludeK8sLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::excludeK8sLabelsLogicalIsSet() const +{ + return excludeK8sLabelsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetexcludeK8sLabelsLogical() +{ + excludeK8sLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getIncludeEnvsLogical() const +{ + return includeEnvsLogical_; +} + +void AccessConfigDeatilCreate::setIncludeEnvsLogical(const std::string& value) +{ + includeEnvsLogical_ = value; + includeEnvsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::includeEnvsLogicalIsSet() const +{ + return includeEnvsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetincludeEnvsLogical() +{ + includeEnvsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilCreate::getExcludeEnvsLogical() const +{ + return excludeEnvsLogical_; +} + +void AccessConfigDeatilCreate::setExcludeEnvsLogical(const std::string& value) +{ + excludeEnvsLogical_ = value; + excludeEnvsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilCreate::excludeEnvsLogicalIsSet() const +{ + return excludeEnvsLogicalIsSet_; +} + +void AccessConfigDeatilCreate::unsetexcludeEnvsLogical() +{ + excludeEnvsLogicalIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/AccessConfigDeatilUpdate.cpp b/lts/src/v2/model/AccessConfigDeatilUpdate.cpp index 0e3af1fa7..0fa3f4828 100644 --- a/lts/src/v2/model/AccessConfigDeatilUpdate.cpp +++ b/lts/src/v2/model/AccessConfigDeatilUpdate.cpp @@ -37,6 +37,20 @@ AccessConfigDeatilUpdate::AccessConfigDeatilUpdate() includeK8sLabelsIsSet_ = false; excludeK8sLabelsIsSet_ = false; logK8sIsSet_ = false; + systemFieldsIsSet_ = false; + customKeyValueIsSet_ = false; + includeLabelsLogical_ = ""; + includeLabelsLogicalIsSet_ = false; + excludeLabelsLogical_ = ""; + excludeLabelsLogicalIsSet_ = false; + includeK8sLabelsLogical_ = ""; + includeK8sLabelsLogicalIsSet_ = false; + excludeK8sLabelsLogical_ = ""; + excludeK8sLabelsLogicalIsSet_ = false; + includeEnvsLogical_ = ""; + includeEnvsLogicalIsSet_ = false; + excludeEnvsLogical_ = ""; + excludeEnvsLogicalIsSet_ = false; } AccessConfigDeatilUpdate::~AccessConfigDeatilUpdate() = default; @@ -106,6 +120,30 @@ web::json::value AccessConfigDeatilUpdate::toJson() const if(logK8sIsSet_) { val[utility::conversions::to_string_t("logK8s")] = ModelBase::toJson(logK8s_); } + if(systemFieldsIsSet_) { + val[utility::conversions::to_string_t("system_fields")] = ModelBase::toJson(systemFields_); + } + if(customKeyValueIsSet_) { + val[utility::conversions::to_string_t("custom_key_value")] = ModelBase::toJson(customKeyValue_); + } + if(includeLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeLabelsLogical")] = ModelBase::toJson(includeLabelsLogical_); + } + if(excludeLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeLabelsLogical")] = ModelBase::toJson(excludeLabelsLogical_); + } + if(includeK8sLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeK8sLabelsLogical")] = ModelBase::toJson(includeK8sLabelsLogical_); + } + if(excludeK8sLabelsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeK8sLabelsLogical")] = ModelBase::toJson(excludeK8sLabelsLogical_); + } + if(includeEnvsLogicalIsSet_) { + val[utility::conversions::to_string_t("includeEnvsLogical")] = ModelBase::toJson(includeEnvsLogical_); + } + if(excludeEnvsLogicalIsSet_) { + val[utility::conversions::to_string_t("excludeEnvsLogical")] = ModelBase::toJson(excludeEnvsLogical_); + } return val; } @@ -284,6 +322,78 @@ bool AccessConfigDeatilUpdate::fromJson(const web::json::value& val) setLogK8s(refVal); } } + if(val.has_field(utility::conversions::to_string_t("system_fields"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("system_fields")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSystemFields(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("custom_key_value"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("custom_key_value")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCustomKeyValue(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeK8sLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeK8sLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeK8sLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeK8sLabelsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeK8sLabelsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeK8sLabelsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeEnvsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeEnvsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeEnvsLogical(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("excludeEnvsLogical"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("excludeEnvsLogical")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExcludeEnvsLogical(refVal); + } + } return ok; } @@ -687,6 +797,174 @@ void AccessConfigDeatilUpdate::unsetlogK8s() logK8sIsSet_ = false; } +std::vector& AccessConfigDeatilUpdate::getSystemFields() +{ + return systemFields_; +} + +void AccessConfigDeatilUpdate::setSystemFields(const std::vector& value) +{ + systemFields_ = value; + systemFieldsIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::systemFieldsIsSet() const +{ + return systemFieldsIsSet_; +} + +void AccessConfigDeatilUpdate::unsetsystemFields() +{ + systemFieldsIsSet_ = false; +} + +std::map& AccessConfigDeatilUpdate::getCustomKeyValue() +{ + return customKeyValue_; +} + +void AccessConfigDeatilUpdate::setCustomKeyValue(const std::map& value) +{ + customKeyValue_ = value; + customKeyValueIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::customKeyValueIsSet() const +{ + return customKeyValueIsSet_; +} + +void AccessConfigDeatilUpdate::unsetcustomKeyValue() +{ + customKeyValueIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getIncludeLabelsLogical() const +{ + return includeLabelsLogical_; +} + +void AccessConfigDeatilUpdate::setIncludeLabelsLogical(const std::string& value) +{ + includeLabelsLogical_ = value; + includeLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::includeLabelsLogicalIsSet() const +{ + return includeLabelsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetincludeLabelsLogical() +{ + includeLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getExcludeLabelsLogical() const +{ + return excludeLabelsLogical_; +} + +void AccessConfigDeatilUpdate::setExcludeLabelsLogical(const std::string& value) +{ + excludeLabelsLogical_ = value; + excludeLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::excludeLabelsLogicalIsSet() const +{ + return excludeLabelsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetexcludeLabelsLogical() +{ + excludeLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getIncludeK8sLabelsLogical() const +{ + return includeK8sLabelsLogical_; +} + +void AccessConfigDeatilUpdate::setIncludeK8sLabelsLogical(const std::string& value) +{ + includeK8sLabelsLogical_ = value; + includeK8sLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::includeK8sLabelsLogicalIsSet() const +{ + return includeK8sLabelsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetincludeK8sLabelsLogical() +{ + includeK8sLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getExcludeK8sLabelsLogical() const +{ + return excludeK8sLabelsLogical_; +} + +void AccessConfigDeatilUpdate::setExcludeK8sLabelsLogical(const std::string& value) +{ + excludeK8sLabelsLogical_ = value; + excludeK8sLabelsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::excludeK8sLabelsLogicalIsSet() const +{ + return excludeK8sLabelsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetexcludeK8sLabelsLogical() +{ + excludeK8sLabelsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getIncludeEnvsLogical() const +{ + return includeEnvsLogical_; +} + +void AccessConfigDeatilUpdate::setIncludeEnvsLogical(const std::string& value) +{ + includeEnvsLogical_ = value; + includeEnvsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::includeEnvsLogicalIsSet() const +{ + return includeEnvsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetincludeEnvsLogical() +{ + includeEnvsLogicalIsSet_ = false; +} + +std::string AccessConfigDeatilUpdate::getExcludeEnvsLogical() const +{ + return excludeEnvsLogical_; +} + +void AccessConfigDeatilUpdate::setExcludeEnvsLogical(const std::string& value) +{ + excludeEnvsLogical_ = value; + excludeEnvsLogicalIsSet_ = true; +} + +bool AccessConfigDeatilUpdate::excludeEnvsLogicalIsSet() const +{ + return excludeEnvsLogicalIsSet_; +} + +void AccessConfigDeatilUpdate::unsetexcludeEnvsLogical() +{ + excludeEnvsLogicalIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/LTSFieldsInfo.cpp b/lts/src/v2/model/LTSFieldsInfo.cpp index f2e4a754f..f254af6e4 100644 --- a/lts/src/v2/model/LTSFieldsInfo.cpp +++ b/lts/src/v2/model/LTSFieldsInfo.cpp @@ -25,6 +25,7 @@ LTSFieldsInfo::LTSFieldsInfo() quickAnalysis_ = false; quickAnalysisIsSet_ = false; asciiIsSet_ = false; + ltsSubFieldsInfoListIsSet_ = false; } LTSFieldsInfo::~LTSFieldsInfo() = default; @@ -58,6 +59,9 @@ web::json::value LTSFieldsInfo::toJson() const if(asciiIsSet_) { val[utility::conversions::to_string_t("ascii")] = ModelBase::toJson(ascii_); } + if(ltsSubFieldsInfoListIsSet_) { + val[utility::conversions::to_string_t("ltsSubFieldsInfoList")] = ModelBase::toJson(ltsSubFieldsInfoList_); + } return val; } @@ -128,6 +132,15 @@ bool LTSFieldsInfo::fromJson(const web::json::value& val) setAscii(refVal); } } + if(val.has_field(utility::conversions::to_string_t("ltsSubFieldsInfoList"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ltsSubFieldsInfoList")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLtsSubFieldsInfoList(refVal); + } + } return ok; } @@ -279,6 +292,27 @@ void LTSFieldsInfo::unsetascii() asciiIsSet_ = false; } +std::vector& LTSFieldsInfo::getLtsSubFieldsInfoList() +{ + return ltsSubFieldsInfoList_; +} + +void LTSFieldsInfo::setLtsSubFieldsInfoList(const std::vector& value) +{ + ltsSubFieldsInfoList_ = value; + ltsSubFieldsInfoListIsSet_ = true; +} + +bool LTSFieldsInfo::ltsSubFieldsInfoListIsSet() const +{ + return ltsSubFieldsInfoListIsSet_; +} + +void LTSFieldsInfo::unsetltsSubFieldsInfoList() +{ + ltsSubFieldsInfoListIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/LTSSubFieldsInfo.cpp b/lts/src/v2/model/LTSSubFieldsInfo.cpp new file mode 100644 index 000000000..bd4f1012e --- /dev/null +++ b/lts/src/v2/model/LTSSubFieldsInfo.cpp @@ -0,0 +1,288 @@ + + +#include "huaweicloud/lts/v2/model/LTSSubFieldsInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +LTSSubFieldsInfo::LTSSubFieldsInfo() +{ + fieldType_ = ""; + fieldTypeIsSet_ = false; + fieldName_ = ""; + fieldNameIsSet_ = false; + caseSensitive_ = false; + caseSensitiveIsSet_ = false; + includeChinese_ = false; + includeChineseIsSet_ = false; + tokenizer_ = ""; + tokenizerIsSet_ = false; + quickAnalysis_ = false; + quickAnalysisIsSet_ = false; + asciiIsSet_ = false; +} + +LTSSubFieldsInfo::~LTSSubFieldsInfo() = default; + +void LTSSubFieldsInfo::validate() +{ +} + +web::json::value LTSSubFieldsInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fieldTypeIsSet_) { + val[utility::conversions::to_string_t("fieldType")] = ModelBase::toJson(fieldType_); + } + if(fieldNameIsSet_) { + val[utility::conversions::to_string_t("fieldName")] = ModelBase::toJson(fieldName_); + } + if(caseSensitiveIsSet_) { + val[utility::conversions::to_string_t("caseSensitive")] = ModelBase::toJson(caseSensitive_); + } + if(includeChineseIsSet_) { + val[utility::conversions::to_string_t("includeChinese")] = ModelBase::toJson(includeChinese_); + } + if(tokenizerIsSet_) { + val[utility::conversions::to_string_t("tokenizer")] = ModelBase::toJson(tokenizer_); + } + if(quickAnalysisIsSet_) { + val[utility::conversions::to_string_t("quickAnalysis")] = ModelBase::toJson(quickAnalysis_); + } + if(asciiIsSet_) { + val[utility::conversions::to_string_t("ascii")] = ModelBase::toJson(ascii_); + } + + return val; +} +bool LTSSubFieldsInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fieldType"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fieldType")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFieldType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fieldName"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fieldName")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFieldName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("caseSensitive"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("caseSensitive")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCaseSensitive(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("includeChinese"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("includeChinese")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIncludeChinese(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tokenizer"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tokenizer")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTokenizer(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("quickAnalysis"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("quickAnalysis")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setQuickAnalysis(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ascii"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ascii")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAscii(refVal); + } + } + return ok; +} + + +std::string LTSSubFieldsInfo::getFieldType() const +{ + return fieldType_; +} + +void LTSSubFieldsInfo::setFieldType(const std::string& value) +{ + fieldType_ = value; + fieldTypeIsSet_ = true; +} + +bool LTSSubFieldsInfo::fieldTypeIsSet() const +{ + return fieldTypeIsSet_; +} + +void LTSSubFieldsInfo::unsetfieldType() +{ + fieldTypeIsSet_ = false; +} + +std::string LTSSubFieldsInfo::getFieldName() const +{ + return fieldName_; +} + +void LTSSubFieldsInfo::setFieldName(const std::string& value) +{ + fieldName_ = value; + fieldNameIsSet_ = true; +} + +bool LTSSubFieldsInfo::fieldNameIsSet() const +{ + return fieldNameIsSet_; +} + +void LTSSubFieldsInfo::unsetfieldName() +{ + fieldNameIsSet_ = false; +} + +bool LTSSubFieldsInfo::isCaseSensitive() const +{ + return caseSensitive_; +} + +void LTSSubFieldsInfo::setCaseSensitive(bool value) +{ + caseSensitive_ = value; + caseSensitiveIsSet_ = true; +} + +bool LTSSubFieldsInfo::caseSensitiveIsSet() const +{ + return caseSensitiveIsSet_; +} + +void LTSSubFieldsInfo::unsetcaseSensitive() +{ + caseSensitiveIsSet_ = false; +} + +bool LTSSubFieldsInfo::isIncludeChinese() const +{ + return includeChinese_; +} + +void LTSSubFieldsInfo::setIncludeChinese(bool value) +{ + includeChinese_ = value; + includeChineseIsSet_ = true; +} + +bool LTSSubFieldsInfo::includeChineseIsSet() const +{ + return includeChineseIsSet_; +} + +void LTSSubFieldsInfo::unsetincludeChinese() +{ + includeChineseIsSet_ = false; +} + +std::string LTSSubFieldsInfo::getTokenizer() const +{ + return tokenizer_; +} + +void LTSSubFieldsInfo::setTokenizer(const std::string& value) +{ + tokenizer_ = value; + tokenizerIsSet_ = true; +} + +bool LTSSubFieldsInfo::tokenizerIsSet() const +{ + return tokenizerIsSet_; +} + +void LTSSubFieldsInfo::unsettokenizer() +{ + tokenizerIsSet_ = false; +} + +bool LTSSubFieldsInfo::isQuickAnalysis() const +{ + return quickAnalysis_; +} + +void LTSSubFieldsInfo::setQuickAnalysis(bool value) +{ + quickAnalysis_ = value; + quickAnalysisIsSet_ = true; +} + +bool LTSSubFieldsInfo::quickAnalysisIsSet() const +{ + return quickAnalysisIsSet_; +} + +void LTSSubFieldsInfo::unsetquickAnalysis() +{ + quickAnalysisIsSet_ = false; +} + +std::vector& LTSSubFieldsInfo::getAscii() +{ + return ascii_; +} + +void LTSSubFieldsInfo::setAscii(const std::vector& value) +{ + ascii_ = value; + asciiIsSet_ = true; +} + +bool LTSSubFieldsInfo::asciiIsSet() const +{ + return asciiIsSet_; +} + +void LTSSubFieldsInfo::unsetascii() +{ + asciiIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListLogContextRequest.cpp b/lts/src/v2/model/ListLogContextRequest.cpp new file mode 100644 index 000000000..f6413d617 --- /dev/null +++ b/lts/src/v2/model/ListLogContextRequest.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/lts/v2/model/ListLogContextRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListLogContextRequest::ListLogContextRequest() +{ + logGroupId_ = ""; + logGroupIdIsSet_ = false; + logStreamId_ = ""; + logStreamIdIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; + bodyIsSet_ = false; +} + +ListLogContextRequest::~ListLogContextRequest() = default; + +void ListLogContextRequest::validate() +{ +} + +web::json::value ListLogContextRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(logGroupIdIsSet_) { + val[utility::conversions::to_string_t("log_group_id")] = ModelBase::toJson(logGroupId_); + } + if(logStreamIdIsSet_) { + val[utility::conversions::to_string_t("log_stream_id")] = ModelBase::toJson(logStreamId_); + } + 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 ListLogContextRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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_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("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()) + { + ListLogContextRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ListLogContextRequest::getLogGroupId() const +{ + return logGroupId_; +} + +void ListLogContextRequest::setLogGroupId(const std::string& value) +{ + logGroupId_ = value; + logGroupIdIsSet_ = true; +} + +bool ListLogContextRequest::logGroupIdIsSet() const +{ + return logGroupIdIsSet_; +} + +void ListLogContextRequest::unsetlogGroupId() +{ + logGroupIdIsSet_ = false; +} + +std::string ListLogContextRequest::getLogStreamId() const +{ + return logStreamId_; +} + +void ListLogContextRequest::setLogStreamId(const std::string& value) +{ + logStreamId_ = value; + logStreamIdIsSet_ = true; +} + +bool ListLogContextRequest::logStreamIdIsSet() const +{ + return logStreamIdIsSet_; +} + +void ListLogContextRequest::unsetlogStreamId() +{ + logStreamIdIsSet_ = false; +} + +std::string ListLogContextRequest::getContentType() const +{ + return contentType_; +} + +void ListLogContextRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ListLogContextRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ListLogContextRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +ListLogContextRequestBody ListLogContextRequest::getBody() const +{ + return body_; +} + +void ListLogContextRequest::setBody(const ListLogContextRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ListLogContextRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ListLogContextRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListLogContextRequestBody.cpp b/lts/src/v2/model/ListLogContextRequestBody.cpp new file mode 100644 index 000000000..bdc4b89e8 --- /dev/null +++ b/lts/src/v2/model/ListLogContextRequestBody.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/lts/v2/model/ListLogContextRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListLogContextRequestBody::ListLogContextRequestBody() +{ + lineNum_ = ""; + lineNumIsSet_ = false; + time_ = ""; + timeIsSet_ = false; + backwardsSize_ = 0; + backwardsSizeIsSet_ = false; + forwardsSize_ = 0; + forwardsSizeIsSet_ = false; +} + +ListLogContextRequestBody::~ListLogContextRequestBody() = default; + +void ListLogContextRequestBody::validate() +{ +} + +web::json::value ListLogContextRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(lineNumIsSet_) { + val[utility::conversions::to_string_t("line_num")] = ModelBase::toJson(lineNum_); + } + if(timeIsSet_) { + val[utility::conversions::to_string_t("__time__")] = ModelBase::toJson(time_); + } + if(backwardsSizeIsSet_) { + val[utility::conversions::to_string_t("backwardsSize")] = ModelBase::toJson(backwardsSize_); + } + if(forwardsSizeIsSet_) { + val[utility::conversions::to_string_t("forwardsSize")] = ModelBase::toJson(forwardsSize_); + } + + return val; +} +bool ListLogContextRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("line_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("line_num")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLineNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("__time__"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("__time__")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backwardsSize"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backwardsSize")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackwardsSize(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("forwardsSize"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("forwardsSize")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setForwardsSize(refVal); + } + } + return ok; +} + + +std::string ListLogContextRequestBody::getLineNum() const +{ + return lineNum_; +} + +void ListLogContextRequestBody::setLineNum(const std::string& value) +{ + lineNum_ = value; + lineNumIsSet_ = true; +} + +bool ListLogContextRequestBody::lineNumIsSet() const +{ + return lineNumIsSet_; +} + +void ListLogContextRequestBody::unsetlineNum() +{ + lineNumIsSet_ = false; +} + +std::string ListLogContextRequestBody::getTime() const +{ + return time_; +} + +void ListLogContextRequestBody::setTime(const std::string& value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool ListLogContextRequestBody::timeIsSet() const +{ + return timeIsSet_; +} + +void ListLogContextRequestBody::unsettime() +{ + timeIsSet_ = false; +} + +int32_t ListLogContextRequestBody::getBackwardsSize() const +{ + return backwardsSize_; +} + +void ListLogContextRequestBody::setBackwardsSize(int32_t value) +{ + backwardsSize_ = value; + backwardsSizeIsSet_ = true; +} + +bool ListLogContextRequestBody::backwardsSizeIsSet() const +{ + return backwardsSizeIsSet_; +} + +void ListLogContextRequestBody::unsetbackwardsSize() +{ + backwardsSizeIsSet_ = false; +} + +int32_t ListLogContextRequestBody::getForwardsSize() const +{ + return forwardsSize_; +} + +void ListLogContextRequestBody::setForwardsSize(int32_t value) +{ + forwardsSize_ = value; + forwardsSizeIsSet_ = true; +} + +bool ListLogContextRequestBody::forwardsSizeIsSet() const +{ + return forwardsSizeIsSet_; +} + +void ListLogContextRequestBody::unsetforwardsSize() +{ + forwardsSizeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListLogContextResponse.cpp b/lts/src/v2/model/ListLogContextResponse.cpp new file mode 100644 index 000000000..daa2b79a8 --- /dev/null +++ b/lts/src/v2/model/ListLogContextResponse.cpp @@ -0,0 +1,218 @@ + + +#include "huaweicloud/lts/v2/model/ListLogContextResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListLogContextResponse::ListLogContextResponse() +{ + logsIsSet_ = false; + totalCount_ = 0; + totalCountIsSet_ = false; + backwardsCount_ = 0; + backwardsCountIsSet_ = false; + forwardsCount_ = 0; + forwardsCountIsSet_ = false; + isQueryComplete_ = false; + isQueryCompleteIsSet_ = false; +} + +ListLogContextResponse::~ListLogContextResponse() = default; + +void ListLogContextResponse::validate() +{ +} + +web::json::value ListLogContextResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(logsIsSet_) { + val[utility::conversions::to_string_t("logs")] = ModelBase::toJson(logs_); + } + if(totalCountIsSet_) { + val[utility::conversions::to_string_t("total_count")] = ModelBase::toJson(totalCount_); + } + if(backwardsCountIsSet_) { + val[utility::conversions::to_string_t("backwards_count")] = ModelBase::toJson(backwardsCount_); + } + if(forwardsCountIsSet_) { + val[utility::conversions::to_string_t("forwards_count")] = ModelBase::toJson(forwardsCount_); + } + if(isQueryCompleteIsSet_) { + val[utility::conversions::to_string_t("isQueryComplete")] = ModelBase::toJson(isQueryComplete_); + } + + return val; +} +bool ListLogContextResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("logs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("logs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotalCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backwards_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backwards_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackwardsCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("forwards_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("forwards_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setForwardsCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("isQueryComplete"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("isQueryComplete")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsQueryComplete(refVal); + } + } + return ok; +} + + +std::vector& ListLogContextResponse::getLogs() +{ + return logs_; +} + +void ListLogContextResponse::setLogs(const std::vector& value) +{ + logs_ = value; + logsIsSet_ = true; +} + +bool ListLogContextResponse::logsIsSet() const +{ + return logsIsSet_; +} + +void ListLogContextResponse::unsetlogs() +{ + logsIsSet_ = false; +} + +int32_t ListLogContextResponse::getTotalCount() const +{ + return totalCount_; +} + +void ListLogContextResponse::setTotalCount(int32_t value) +{ + totalCount_ = value; + totalCountIsSet_ = true; +} + +bool ListLogContextResponse::totalCountIsSet() const +{ + return totalCountIsSet_; +} + +void ListLogContextResponse::unsettotalCount() +{ + totalCountIsSet_ = false; +} + +int32_t ListLogContextResponse::getBackwardsCount() const +{ + return backwardsCount_; +} + +void ListLogContextResponse::setBackwardsCount(int32_t value) +{ + backwardsCount_ = value; + backwardsCountIsSet_ = true; +} + +bool ListLogContextResponse::backwardsCountIsSet() const +{ + return backwardsCountIsSet_; +} + +void ListLogContextResponse::unsetbackwardsCount() +{ + backwardsCountIsSet_ = false; +} + +int32_t ListLogContextResponse::getForwardsCount() const +{ + return forwardsCount_; +} + +void ListLogContextResponse::setForwardsCount(int32_t value) +{ + forwardsCount_ = value; + forwardsCountIsSet_ = true; +} + +bool ListLogContextResponse::forwardsCountIsSet() const +{ + return forwardsCountIsSet_; +} + +void ListLogContextResponse::unsetforwardsCount() +{ + forwardsCountIsSet_ = false; +} + +bool ListLogContextResponse::isIsQueryComplete() const +{ + return isQueryComplete_; +} + +void ListLogContextResponse::setIsQueryComplete(bool value) +{ + isQueryComplete_ = value; + isQueryCompleteIsSet_ = true; +} + +bool ListLogContextResponse::isQueryCompleteIsSet() const +{ + return isQueryCompleteIsSet_; +} + +void ListLogContextResponse::unsetisQueryComplete() +{ + isQueryCompleteIsSet_ = false; +} + +} +} +} +} +} + +