diff --git a/CHANGELOG.md b/CHANGELOG.md index 228844e4c..d5e726d9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +# 3.1.96 2024-08-01 + +### HuaweiCloud SDK LTS + +- _Features_ + - Support the following APIs: + - `ListConsumerGroup` + - `CreateConsumerGroup` + - `ConsumerGroupHeartBeat` + - `ShowLogStreamShards` + - `ListDetailsConsumerGroup` + - `UpdateCheckPoint` + - `DeleteConsumerGroup` + - `ShowCursorByTime` + - `ShowCursorTime` +- _Bug Fix_ + - None +- _Change_ + - None + # 3.1.95 2024-07-25 ### HuaweiCloud SDK OCR diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 4274bf82c..4d5d5cbcc 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,23 @@ +# 3.1.96 2024-08-01 + +### HuaweiCloud SDK LTS + +- _新增特性_ + - 支持以下接口: + - `ListConsumerGroup` + - `CreateConsumerGroup` + - `ConsumerGroupHeartBeat` + - `ShowLogStreamShards` + - `ListDetailsConsumerGroup` + - `UpdateCheckPoint` + - `DeleteConsumerGroup` + - `ShowCursorByTime` + - `ShowCursorTime` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + # 3.1.95 2024-07-25 ### HuaweiCloud SDK OCR diff --git a/VERSION b/VERSION index f6fc1dc0f..c9f6385c0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.95 +3.1.96 diff --git a/lts/include/huaweicloud/lts/v2/LtsClient.h b/lts/include/huaweicloud/lts/v2/LtsClient.h index 5901f8d74..879ff2b79 100644 --- a/lts/include/huaweicloud/lts/v2/LtsClient.h +++ b/lts/include/huaweicloud/lts/v2/LtsClient.h @@ -211,6 +211,30 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -868,6 +892,79 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsClient : public Client UpdateAomMappingRulesRequest &request ); + // 消费者发送心跳到服务端 + // + // 消费者发送心跳到服务端 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr consumerGroupHeartBeat( + ConsumerGroupHeartBeatRequest &request + ); + // 创建消费组 + // + // 创建消费组 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createConsumerGroup( + CreateConsumerGroupRequest &request + ); + // 删除消费组 + // + // 删除消费组 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteConsumerGroup( + DeleteConsumerGroupRequest &request + ); + // 查询消费组列表 + // + // 查询消费组列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listConsumerGroup( + ListConsumerGroupRequest &request + ); + // 查询消费组详情 + // + // 查询消费组详情 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDetailsConsumerGroup( + ListDetailsConsumerGroupRequest &request + ); + // 通过时间获取消费游标 + // + // 通过时间查询cursor + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showCursorByTime( + ShowCursorByTimeRequest &request + ); + // 通过消费游标获取时间 + // + // 通过cursor查询服务端时间 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showCursorTime( + ShowCursorTimeRequest &request + ); + // 流消费获取Shards + // + // 流消费获取所有的query shards + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showLogStreamShards( + ShowLogStreamShardsRequest &request + ); + // 更新消费组位点 + // + // 更新消费组位点 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateCheckPoint( + UpdateCheckPointRequest &request + ); + // 创建SQL告警规则 // // 该接口用于创建SQL告警,目前每个帐户最多可以创建共200个关键词告警与SQL告警 diff --git a/lts/include/huaweicloud/lts/v2/LtsMeta.h b/lts/include/huaweicloud/lts/v2/LtsMeta.h index d4cdcdcd8..be742b2e9 100644 --- a/lts/include/huaweicloud/lts/v2/LtsMeta.h +++ b/lts/include/huaweicloud/lts/v2/LtsMeta.h @@ -90,6 +90,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT LtsMeta { static HttpRequestDef genRequestDefForShowAomMappingRule(); static HttpRequestDef genRequestDefForShowAomMappingRules(); static HttpRequestDef genRequestDefForUpdateAomMappingRules(); + static HttpRequestDef genRequestDefForConsumerGroupHeartBeat(); + static HttpRequestDef genRequestDefForCreateConsumerGroup(); + static HttpRequestDef genRequestDefForDeleteConsumerGroup(); + static HttpRequestDef genRequestDefForListConsumerGroup(); + static HttpRequestDef genRequestDefForListDetailsConsumerGroup(); + static HttpRequestDef genRequestDefForShowCursorByTime(); + static HttpRequestDef genRequestDefForShowCursorTime(); + static HttpRequestDef genRequestDefForShowLogStreamShards(); + static HttpRequestDef genRequestDefForUpdateCheckPoint(); static HttpRequestDef genRequestDefForCreateSqlAlarmRule(); static HttpRequestDef genRequestDefForDeleteSqlAlarmRule(); static HttpRequestDef genRequestDefForListSqlAlarmRules(); diff --git a/lts/include/huaweicloud/lts/v2/model/ConsumerCheckpointInfo.h b/lts/include/huaweicloud/lts/v2/model/ConsumerCheckpointInfo.h new file mode 100644 index 000000000..699efaaec --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ConsumerCheckpointInfo.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerCheckpointInfo_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerCheckpointInfo_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 ConsumerCheckpointInfo + : public ModelBase +{ +public: + ConsumerCheckpointInfo(); + virtual ~ConsumerCheckpointInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConsumerCheckpointInfo members + + /// + /// 游标值 + /// + + int64_t getCheckpoint() const; + bool checkpointIsSet() const; + void unsetcheckpoint(); + void setCheckpoint(int64_t value); + + /// + /// 消费组名 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 消费者名 + /// + + std::string getConsumerName() const; + bool consumerNameIsSet() const; + void unsetconsumerName(); + void setConsumerName(const std::string& value); + + /// + /// 项目ID + /// + + std::string getProjectId() const; + bool projectIdIsSet() const; + void unsetprojectId(); + void setProjectId(const std::string& value); + + /// + /// 日志Shard ID + /// + + std::string getShardId() const; + bool shardIdIsSet() const; + void unsetshardId(); + void setShardId(const std::string& value); + + /// + /// 更新时间 + /// + + int64_t getUpdateTime() const; + bool updateTimeIsSet() const; + void unsetupdateTime(); + void setUpdateTime(int64_t value); + + +protected: + int64_t checkpoint_; + bool checkpointIsSet_; + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + std::string consumerName_; + bool consumerNameIsSet_; + std::string projectId_; + bool projectIdIsSet_; + std::string shardId_; + bool shardIdIsSet_; + int64_t updateTime_; + bool updateTimeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerCheckpointInfo_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatRequest.h b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatRequest.h new file mode 100644 index 000000000..458d8091a --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatRequest.h @@ -0,0 +1,127 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatRequest_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 ConsumerGroupHeartBeatRequest + : public ModelBase +{ +public: + ConsumerGroupHeartBeatRequest(); + virtual ~ConsumerGroupHeartBeatRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConsumerGroupHeartBeatRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 消费组名 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 消费者名称 + /// + + std::string getConsumerName() const; + bool consumerNameIsSet() const; + void unsetconsumerName(); + void setConsumerName(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + std::string consumerName_; + bool consumerNameIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ConsumerGroupHeartBeatRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatResponse.h b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatResponse.h new file mode 100644 index 000000000..1951cdfb2 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupHeartBeatResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatResponse_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 ConsumerGroupHeartBeatResponse + : public ModelBase, public HttpResponse +{ +public: + ConsumerGroupHeartBeatResponse(); + virtual ~ConsumerGroupHeartBeatResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConsumerGroupHeartBeatResponse members + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupHeartBeatResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ConsumerGroupInfo.h b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupInfo.h new file mode 100644 index 000000000..9967deca8 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ConsumerGroupInfo.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupInfo_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupInfo_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 ConsumerGroupInfo + : public ModelBase +{ +public: + ConsumerGroupInfo(); + virtual ~ConsumerGroupInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConsumerGroupInfo members + + /// + /// 创建的消费组名 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 创建时间 + /// + + int64_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int64_t value); + + /// + /// 日志组ID + /// + + std::string getLogGroupId() const; + bool logGroupIdIsSet() const; + void unsetlogGroupId(); + void setLogGroupId(const std::string& value); + + /// + /// 日志流ID + /// + + std::string getLogStreamId() const; + bool logStreamIdIsSet() const; + void unsetlogStreamId(); + void setLogStreamId(const std::string& value); + + /// + /// 项目ID + /// + + std::string getProjectId() const; + bool projectIdIsSet() const; + void unsetprojectId(); + void setProjectId(const std::string& value); + + /// + /// 超时时间,单位秒 + /// + + int32_t getTimeout() const; + bool timeoutIsSet() const; + void unsettimeout(); + void setTimeout(int32_t value); + + +protected: + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + int64_t createTime_; + bool createTimeIsSet_; + std::string logGroupId_; + bool logGroupIdIsSet_; + std::string logStreamId_; + bool logStreamIdIsSet_; + std::string projectId_; + bool projectIdIsSet_; + int32_t timeout_; + bool timeoutIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerGroupInfo_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ConsumerShardCheckpointInfo.h b/lts/include/huaweicloud/lts/v2/model/ConsumerShardCheckpointInfo.h new file mode 100644 index 000000000..071b2730d --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ConsumerShardCheckpointInfo.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerShardCheckpointInfo_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerShardCheckpointInfo_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 ConsumerShardCheckpointInfo + : public ModelBase +{ +public: + ConsumerShardCheckpointInfo(); + virtual ~ConsumerShardCheckpointInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConsumerShardCheckpointInfo members + + /// + /// 日志Shard ID + /// + + std::string getShardId() const; + bool shardIdIsSet() const; + void unsetshardId(); + void setShardId(const std::string& value); + + /// + /// 游标值 + /// + + int64_t getCheckpoint() const; + bool checkpointIsSet() const; + void unsetcheckpoint(); + void setCheckpoint(int64_t value); + + +protected: + std::string shardId_; + bool shardIdIsSet_; + int64_t checkpoint_; + bool checkpointIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ConsumerShardCheckpointInfo_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupRequest.h b/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupRequest.h new file mode 100644 index 000000000..120b7f6bd --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupRequest.h @@ -0,0 +1,105 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupRequest_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 CreateConsumerGroupRequest + : public ModelBase +{ +public: + CreateConsumerGroupRequest(); + virtual ~CreateConsumerGroupRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateConsumerGroupRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// + /// + + ConsumerGroupInfo getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ConsumerGroupInfo& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + ConsumerGroupInfo body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateConsumerGroupRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupResponse.h b/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupResponse.h new file mode 100644 index 000000000..b4f63f867 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/CreateConsumerGroupResponse.h @@ -0,0 +1,122 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT CreateConsumerGroupResponse + : public ModelBase, public HttpResponse +{ +public: + CreateConsumerGroupResponse(); + virtual ~CreateConsumerGroupResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateConsumerGroupResponse members + + /// + /// 创建的消费组名 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 创建时间 + /// + + int64_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int64_t value); + + /// + /// 日志组ID + /// + + std::string getLogGroupId() const; + bool logGroupIdIsSet() const; + void unsetlogGroupId(); + void setLogGroupId(const std::string& value); + + /// + /// 日志流ID + /// + + std::string getLogStreamId() const; + bool logStreamIdIsSet() const; + void unsetlogStreamId(); + void setLogStreamId(const std::string& value); + + /// + /// 项目ID + /// + + std::string getProjectId() const; + bool projectIdIsSet() const; + void unsetprojectId(); + void setProjectId(const std::string& value); + + /// + /// 超时时间,单位秒 + /// + + int32_t getTimeout() const; + bool timeoutIsSet() const; + void unsettimeout(); + void setTimeout(int32_t value); + + +protected: + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + int64_t createTime_; + bool createTimeIsSet_; + std::string logGroupId_; + bool logGroupIdIsSet_; + std::string logStreamId_; + bool logStreamIdIsSet_; + std::string projectId_; + bool projectIdIsSet_; + int32_t timeout_; + bool timeoutIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_CreateConsumerGroupResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupRequest.h b/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupRequest.h new file mode 100644 index 000000000..a4acb35b9 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupRequest.h @@ -0,0 +1,104 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT DeleteConsumerGroupRequest + : public ModelBase +{ +public: + DeleteConsumerGroupRequest(); + virtual ~DeleteConsumerGroupRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteConsumerGroupRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 消费组名称 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteConsumerGroupRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupResponse.h b/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupResponse.h new file mode 100644 index 000000000..700e49028 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/DeleteConsumerGroupResponse.h @@ -0,0 +1,78 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT DeleteConsumerGroupResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteConsumerGroupResponse(); + virtual ~DeleteConsumerGroupResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteConsumerGroupResponse members + + /// + /// 状态码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 状态信息 + /// + + std::string getErrorMessage() const; + bool errorMessageIsSet() const; + void unseterrorMessage(); + void setErrorMessage(const std::string& value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorMessage_; + bool errorMessageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_DeleteConsumerGroupResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupRequest.h b/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupRequest.h new file mode 100644 index 000000000..e2b7ad4b8 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ListConsumerGroupRequest + : public ModelBase +{ +public: + ListConsumerGroupRequest(); + virtual ~ListConsumerGroupRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConsumerGroupRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListConsumerGroupRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupResponse.h b/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupResponse.h new file mode 100644 index 000000000..6dba312f0 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListConsumerGroupResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupResponse_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 ListConsumerGroupResponse + : public ModelBase, public HttpResponse +{ +public: + ListConsumerGroupResponse(); + virtual ~ListConsumerGroupResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConsumerGroupResponse members + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListConsumerGroupResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupRequest.h b/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupRequest.h new file mode 100644 index 000000000..dd745bd7d --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupRequest.h @@ -0,0 +1,104 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ListDetailsConsumerGroupRequest + : public ModelBase +{ +public: + ListDetailsConsumerGroupRequest(); + virtual ~ListDetailsConsumerGroupRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDetailsConsumerGroupRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 消费组名称 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDetailsConsumerGroupRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupResponse.h b/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupResponse.h new file mode 100644 index 000000000..a01468f68 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ListDetailsConsumerGroupResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupResponse_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 ListDetailsConsumerGroupResponse + : public ModelBase, public HttpResponse +{ +public: + ListDetailsConsumerGroupResponse(); + virtual ~ListDetailsConsumerGroupResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDetailsConsumerGroupResponse members + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ListDetailsConsumerGroupResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeRequest.h b/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeRequest.h new file mode 100644 index 000000000..e767540c3 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ShowCursorByTimeRequest + : public ModelBase +{ +public: + ShowCursorByTimeRequest(); + virtual ~ShowCursorByTimeRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowCursorByTimeRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// Shrad ID + /// + + std::string getShardId() const; + bool shardIdIsSet() const; + void unsetshardId(); + void setShardId(const std::string& value); + + /// + /// 起始时间戳,时间单位为纳秒 + /// + + std::string getFrom() const; + bool fromIsSet() const; + void unsetfrom(); + void setFrom(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string shardId_; + bool shardIdIsSet_; + std::string from_; + bool fromIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowCursorByTimeRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeResponse.h b/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeResponse.h new file mode 100644 index 000000000..297f07504 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowCursorByTimeResponse.h @@ -0,0 +1,66 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeResponse_H_ + + +#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 ShowCursorByTimeResponse + : public ModelBase, public HttpResponse +{ +public: + ShowCursorByTimeResponse(); + virtual ~ShowCursorByTimeResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowCursorByTimeResponse members + + /// + /// 游标值 + /// + + int64_t getCursor() const; + bool cursorIsSet() const; + void unsetcursor(); + void setCursor(int64_t value); + + +protected: + int64_t cursor_; + bool cursorIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorByTimeResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeRequest.h b/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeRequest.h new file mode 100644 index 000000000..a59d93eef --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeRequest.h @@ -0,0 +1,104 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ShowCursorTimeRequest + : public ModelBase +{ +public: + ShowCursorTimeRequest(); + virtual ~ShowCursorTimeRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowCursorTimeRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// Shard ID + /// + + std::string getShardId() const; + bool shardIdIsSet() const; + void unsetshardId(); + void setShardId(const std::string& value); + + /// + /// 游标值 + /// + + std::string getCursor() const; + bool cursorIsSet() const; + void unsetcursor(); + void setCursor(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string shardId_; + bool shardIdIsSet_; + std::string cursor_; + bool cursorIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowCursorTimeRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeResponse.h b/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeResponse.h new file mode 100644 index 000000000..cdae03b52 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowCursorTimeResponse.h @@ -0,0 +1,66 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeResponse_H_ + + +#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 ShowCursorTimeResponse + : public ModelBase, public HttpResponse +{ +public: + ShowCursorTimeResponse(); + virtual ~ShowCursorTimeResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowCursorTimeResponse members + + /// + /// 游标时间值 + /// + + int64_t getCursorTime() const; + bool cursorTimeIsSet() const; + void unsetcursorTime(); + void setCursorTime(int64_t value); + + +protected: + int64_t cursorTime_; + bool cursorTimeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowCursorTimeResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsRequest.h b/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsRequest.h new file mode 100644 index 000000000..15ad359d6 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ShowLogStreamShardsRequest + : public ModelBase +{ +public: + ShowLogStreamShardsRequest(); + virtual ~ShowLogStreamShardsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowLogStreamShardsRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8。 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowLogStreamShardsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsResponse.h b/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsResponse.h new file mode 100644 index 000000000..c087b28a7 --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/ShowLogStreamShardsResponse.h @@ -0,0 +1,89 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT ShowLogStreamShardsResponse + : public ModelBase, public HttpResponse +{ +public: + ShowLogStreamShardsResponse(); + virtual ~ShowLogStreamShardsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowLogStreamShardsResponse members + + /// + /// 错误码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 是否完全查询 + /// + + bool isIsQueryComplete() const; + bool isQueryCompleteIsSet() const; + void unsetisQueryComplete(); + void setIsQueryComplete(bool value); + + /// + /// 查询结果 + /// + + std::string getResult() const; + bool resultIsSet() const; + void unsetresult(); + void setResult(const std::string& value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + bool isQueryComplete_; + bool isQueryCompleteIsSet_; + std::string result_; + bool resultIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_ShowLogStreamShardsResponse_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointRequest.h b/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointRequest.h new file mode 100644 index 000000000..47eeb37cb --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointRequest.h @@ -0,0 +1,128 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointRequest_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointRequest_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT UpdateCheckPointRequest + : public ModelBase +{ +public: + UpdateCheckPointRequest(); + virtual ~UpdateCheckPointRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateCheckPointRequest members + + /// + /// 日志组ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID。 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:36 最大长度:36 + /// + + std::string getStreamId() const; + bool streamIdIsSet() const; + void unsetstreamId(); + void setStreamId(const std::string& value); + + /// + /// 消费组名 + /// + + std::string getConsumerGroupName() const; + bool consumerGroupNameIsSet() const; + void unsetconsumerGroupName(); + void setConsumerGroupName(const std::string& value); + + /// + /// 消费者名 + /// + + std::string getConsumerName() const; + bool consumerNameIsSet() const; + void unsetconsumerName(); + void setConsumerName(const std::string& value); + + /// + /// 该字段填为:application/json;charset=UTF-8 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// + /// + + std::vector& getBody(); + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::vector& value); + + +protected: + std::string groupId_; + bool groupIdIsSet_; + std::string streamId_; + bool streamIdIsSet_; + std::string consumerGroupName_; + bool consumerGroupNameIsSet_; + std::string consumerName_; + bool consumerNameIsSet_; + std::string contentType_; + bool contentTypeIsSet_; + std::vector body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateCheckPointRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointRequest_H_ diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointResponse.h b/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointResponse.h new file mode 100644 index 000000000..fe4f33c0c --- /dev/null +++ b/lts/include/huaweicloud/lts/v2/model/UpdateCheckPointResponse.h @@ -0,0 +1,78 @@ + +#ifndef HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointResponse_H_ +#define HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_LTS_V2_EXPORT UpdateCheckPointResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateCheckPointResponse(); + virtual ~UpdateCheckPointResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateCheckPointResponse members + + /// + /// 状态码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 状态信息 + /// + + std::string getErrorMessage() const; + bool errorMessageIsSet() const; + void unseterrorMessage(); + void setErrorMessage(const std::string& value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorMessage_; + bool errorMessageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LTS_V2_MODEL_UpdateCheckPointResponse_H_ diff --git a/lts/src/v2/LtsClient.cpp b/lts/src/v2/LtsClient.cpp index 3a0085bb0..c1a0aea1e 100644 --- a/lts/src/v2/LtsClient.cpp +++ b/lts/src/v2/LtsClient.cpp @@ -3163,6 +3163,363 @@ std::shared_ptr LtsClient::updateAomMappingRules( return localVarResult; } +std::shared_ptr LtsClient::consumerGroupHeartBeat(ConsumerGroupHeartBeatRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups/{consumer_group_name}/heartbeat"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["consumer_group_name"] = parameterToString(request.getConsumerGroupName()); + + 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.consumerNameIsSet()) { + localVarQueryParams["consumer_name"] = parameterToString(request.getConsumerName()); + } + 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::genRequestDefForConsumerGroupHeartBeat()); + + 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::createConsumerGroup(CreateConsumerGroupRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + + 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::genRequestDefForCreateConsumerGroup()); + + 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::deleteConsumerGroup(DeleteConsumerGroupRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups/{consumer_group_name}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["consumer_group_name"] = parameterToString(request.getConsumerGroupName()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForDeleteConsumerGroup()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::listConsumerGroup(ListConsumerGroupRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForListConsumerGroup()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::listDetailsConsumerGroup(ListDetailsConsumerGroupRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups/{consumer_group_name}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["consumer_group_name"] = parameterToString(request.getConsumerGroupName()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForListDetailsConsumerGroup()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::showCursorByTime(ShowCursorByTimeRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/shards/{shard_id}/cursor"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["shard_id"] = parameterToString(request.getShardId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.fromIsSet()) { + localVarQueryParams["from"] = parameterToString(request.getFrom()); + } + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForShowCursorByTime()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::showCursorTime(ShowCursorTimeRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/shards/{shard_id}/time"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["shard_id"] = parameterToString(request.getShardId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.cursorIsSet()) { + localVarQueryParams["cursor"] = parameterToString(request.getCursor()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForShowCursorTime()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::showLogStreamShards(ShowLogStreamShardsRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/shards"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.contentTypeIsSet()) { + localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, LtsMeta::genRequestDefForShowLogStreamShards()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr LtsClient::updateCheckPoint(UpdateCheckPointRequest &request) +{ + std::string localVarPath = "/v1.0/{project_id}/groups/{group_id}/streams/{stream_id}/consumer-groups/{consumer_group_name}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["group_id"] = parameterToString(request.getGroupId()); + localVarPathParams["stream_id"] = parameterToString(request.getStreamId()); + localVarPathParams["consumer_group_name"] = parameterToString(request.getConsumerGroupName()); + + 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.consumerNameIsSet()) { + localVarQueryParams["consumer_name"] = parameterToString(request.getConsumerName()); + } + 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::genRequestDefForUpdateCheckPoint()); + + 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::createSqlAlarmRule(CreateSqlAlarmRuleRequest &request) { std::string localVarPath = "/v2/{project_id}/lts/alarms/sql-alarm-rule"; diff --git a/lts/src/v2/LtsMeta.cpp b/lts/src/v2/LtsMeta.cpp index 45b3793a7..ca99312c0 100644 --- a/lts/src/v2/LtsMeta.cpp +++ b/lts/src/v2/LtsMeta.cpp @@ -1024,6 +1024,124 @@ HttpRequestDef LtsMeta::genRequestDefForUpdateAomMappingRules() { return reqDefBuilder; } +HttpRequestDef LtsMeta::genRequestDefForConsumerGroupHeartBeat() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ConsumerName") + .withJsonTag("consumer_name") + .withLocationType(Query_)); + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForCreateConsumerGroup() { + 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::genRequestDefForDeleteConsumerGroup() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForListConsumerGroup() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForListDetailsConsumerGroup() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + reqDefBuilder.withResponseField(FieldDef(). + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForShowCursorByTime() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("From") + .withJsonTag("from") + .withLocationType(Query_)); + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForShowCursorTime() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Cursor") + .withJsonTag("cursor") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForShowLogStreamShards() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamContentType; + reqDefBuilder.withRequestField(headerParamContentType + .withName("ContentType") + .withJsonTag("Content-Type") + .withLocationType(Header_)); + return reqDefBuilder; +} + +HttpRequestDef LtsMeta::genRequestDefForUpdateCheckPoint() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ConsumerName") + .withJsonTag("consumer_name") + .withLocationType(Query_)); + 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::genRequestDefForCreateSqlAlarmRule() { HttpRequestDef reqDefBuilder; FieldDef headerParamContentType; diff --git a/lts/src/v2/model/ConsumerCheckpointInfo.cpp b/lts/src/v2/model/ConsumerCheckpointInfo.cpp new file mode 100644 index 000000000..fe92355a3 --- /dev/null +++ b/lts/src/v2/model/ConsumerCheckpointInfo.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/lts/v2/model/ConsumerCheckpointInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ConsumerCheckpointInfo::ConsumerCheckpointInfo() +{ + checkpoint_ = 0L; + checkpointIsSet_ = false; + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + consumerName_ = ""; + consumerNameIsSet_ = false; + projectId_ = ""; + projectIdIsSet_ = false; + shardId_ = ""; + shardIdIsSet_ = false; + updateTime_ = 0L; + updateTimeIsSet_ = false; +} + +ConsumerCheckpointInfo::~ConsumerCheckpointInfo() = default; + +void ConsumerCheckpointInfo::validate() +{ +} + +web::json::value ConsumerCheckpointInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(checkpointIsSet_) { + val[utility::conversions::to_string_t("checkpoint")] = ModelBase::toJson(checkpoint_); + } + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(consumerNameIsSet_) { + val[utility::conversions::to_string_t("consumer_name")] = ModelBase::toJson(consumerName_); + } + if(projectIdIsSet_) { + val[utility::conversions::to_string_t("project_id")] = ModelBase::toJson(projectId_); + } + if(shardIdIsSet_) { + val[utility::conversions::to_string_t("shard_id")] = ModelBase::toJson(shardId_); + } + if(updateTimeIsSet_) { + val[utility::conversions::to_string_t("update_time")] = ModelBase::toJson(updateTime_); + } + + return val; +} +bool ConsumerCheckpointInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("checkpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("checkpoint")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCheckpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("shard_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("shard_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setShardId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("update_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("update_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUpdateTime(refVal); + } + } + return ok; +} + + +int64_t ConsumerCheckpointInfo::getCheckpoint() const +{ + return checkpoint_; +} + +void ConsumerCheckpointInfo::setCheckpoint(int64_t value) +{ + checkpoint_ = value; + checkpointIsSet_ = true; +} + +bool ConsumerCheckpointInfo::checkpointIsSet() const +{ + return checkpointIsSet_; +} + +void ConsumerCheckpointInfo::unsetcheckpoint() +{ + checkpointIsSet_ = false; +} + +std::string ConsumerCheckpointInfo::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void ConsumerCheckpointInfo::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool ConsumerCheckpointInfo::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void ConsumerCheckpointInfo::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +std::string ConsumerCheckpointInfo::getConsumerName() const +{ + return consumerName_; +} + +void ConsumerCheckpointInfo::setConsumerName(const std::string& value) +{ + consumerName_ = value; + consumerNameIsSet_ = true; +} + +bool ConsumerCheckpointInfo::consumerNameIsSet() const +{ + return consumerNameIsSet_; +} + +void ConsumerCheckpointInfo::unsetconsumerName() +{ + consumerNameIsSet_ = false; +} + +std::string ConsumerCheckpointInfo::getProjectId() const +{ + return projectId_; +} + +void ConsumerCheckpointInfo::setProjectId(const std::string& value) +{ + projectId_ = value; + projectIdIsSet_ = true; +} + +bool ConsumerCheckpointInfo::projectIdIsSet() const +{ + return projectIdIsSet_; +} + +void ConsumerCheckpointInfo::unsetprojectId() +{ + projectIdIsSet_ = false; +} + +std::string ConsumerCheckpointInfo::getShardId() const +{ + return shardId_; +} + +void ConsumerCheckpointInfo::setShardId(const std::string& value) +{ + shardId_ = value; + shardIdIsSet_ = true; +} + +bool ConsumerCheckpointInfo::shardIdIsSet() const +{ + return shardIdIsSet_; +} + +void ConsumerCheckpointInfo::unsetshardId() +{ + shardIdIsSet_ = false; +} + +int64_t ConsumerCheckpointInfo::getUpdateTime() const +{ + return updateTime_; +} + +void ConsumerCheckpointInfo::setUpdateTime(int64_t value) +{ + updateTime_ = value; + updateTimeIsSet_ = true; +} + +bool ConsumerCheckpointInfo::updateTimeIsSet() const +{ + return updateTimeIsSet_; +} + +void ConsumerCheckpointInfo::unsetupdateTime() +{ + updateTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ConsumerGroupHeartBeatRequest.cpp b/lts/src/v2/model/ConsumerGroupHeartBeatRequest.cpp new file mode 100644 index 000000000..b6393538a --- /dev/null +++ b/lts/src/v2/model/ConsumerGroupHeartBeatRequest.cpp @@ -0,0 +1,253 @@ + + +#include "huaweicloud/lts/v2/model/ConsumerGroupHeartBeatRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ConsumerGroupHeartBeatRequest::ConsumerGroupHeartBeatRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + consumerName_ = ""; + consumerNameIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; + bodyIsSet_ = false; +} + +ConsumerGroupHeartBeatRequest::~ConsumerGroupHeartBeatRequest() = default; + +void ConsumerGroupHeartBeatRequest::validate() +{ +} + +web::json::value ConsumerGroupHeartBeatRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(consumerNameIsSet_) { + val[utility::conversions::to_string_t("consumer_name")] = ModelBase::toJson(consumerName_); + } + 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 ConsumerGroupHeartBeatRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerName(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()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ConsumerGroupHeartBeatRequest::getGroupId() const +{ + return groupId_; +} + +void ConsumerGroupHeartBeatRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ConsumerGroupHeartBeatRequest::getStreamId() const +{ + return streamId_; +} + +void ConsumerGroupHeartBeatRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ConsumerGroupHeartBeatRequest::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void ConsumerGroupHeartBeatRequest::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +std::string ConsumerGroupHeartBeatRequest::getConsumerName() const +{ + return consumerName_; +} + +void ConsumerGroupHeartBeatRequest::setConsumerName(const std::string& value) +{ + consumerName_ = value; + consumerNameIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::consumerNameIsSet() const +{ + return consumerNameIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetconsumerName() +{ + consumerNameIsSet_ = false; +} + +std::string ConsumerGroupHeartBeatRequest::getContentType() const +{ + return contentType_; +} + +void ConsumerGroupHeartBeatRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +std::vector& ConsumerGroupHeartBeatRequest::getBody() +{ + return body_; +} + +void ConsumerGroupHeartBeatRequest::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ConsumerGroupHeartBeatRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ConsumerGroupHeartBeatRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ConsumerGroupHeartBeatResponse.cpp b/lts/src/v2/model/ConsumerGroupHeartBeatResponse.cpp new file mode 100644 index 000000000..c33aa68a9 --- /dev/null +++ b/lts/src/v2/model/ConsumerGroupHeartBeatResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/lts/v2/model/ConsumerGroupHeartBeatResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ConsumerGroupHeartBeatResponse::ConsumerGroupHeartBeatResponse() +{ + bodyIsSet_ = false; +} + +ConsumerGroupHeartBeatResponse::~ConsumerGroupHeartBeatResponse() = default; + +void ConsumerGroupHeartBeatResponse::validate() +{ +} + +web::json::value ConsumerGroupHeartBeatResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ConsumerGroupHeartBeatResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::vector& ConsumerGroupHeartBeatResponse::getBody() +{ + return body_; +} + +void ConsumerGroupHeartBeatResponse::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ConsumerGroupHeartBeatResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ConsumerGroupHeartBeatResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ConsumerGroupInfo.cpp b/lts/src/v2/model/ConsumerGroupInfo.cpp new file mode 100644 index 000000000..badc91a87 --- /dev/null +++ b/lts/src/v2/model/ConsumerGroupInfo.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/lts/v2/model/ConsumerGroupInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ConsumerGroupInfo::ConsumerGroupInfo() +{ + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + createTime_ = 0L; + createTimeIsSet_ = false; + logGroupId_ = ""; + logGroupIdIsSet_ = false; + logStreamId_ = ""; + logStreamIdIsSet_ = false; + projectId_ = ""; + projectIdIsSet_ = false; + timeout_ = 0; + timeoutIsSet_ = false; +} + +ConsumerGroupInfo::~ConsumerGroupInfo() = default; + +void ConsumerGroupInfo::validate() +{ +} + +web::json::value ConsumerGroupInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + 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(projectIdIsSet_) { + val[utility::conversions::to_string_t("project_id")] = ModelBase::toJson(projectId_); + } + if(timeoutIsSet_) { + val[utility::conversions::to_string_t("timeout")] = ModelBase::toJson(timeout_); + } + + return val; +} +bool ConsumerGroupInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("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("project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("timeout"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("timeout")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTimeout(refVal); + } + } + return ok; +} + + +std::string ConsumerGroupInfo::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void ConsumerGroupInfo::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool ConsumerGroupInfo::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void ConsumerGroupInfo::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +int64_t ConsumerGroupInfo::getCreateTime() const +{ + return createTime_; +} + +void ConsumerGroupInfo::setCreateTime(int64_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool ConsumerGroupInfo::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void ConsumerGroupInfo::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string ConsumerGroupInfo::getLogGroupId() const +{ + return logGroupId_; +} + +void ConsumerGroupInfo::setLogGroupId(const std::string& value) +{ + logGroupId_ = value; + logGroupIdIsSet_ = true; +} + +bool ConsumerGroupInfo::logGroupIdIsSet() const +{ + return logGroupIdIsSet_; +} + +void ConsumerGroupInfo::unsetlogGroupId() +{ + logGroupIdIsSet_ = false; +} + +std::string ConsumerGroupInfo::getLogStreamId() const +{ + return logStreamId_; +} + +void ConsumerGroupInfo::setLogStreamId(const std::string& value) +{ + logStreamId_ = value; + logStreamIdIsSet_ = true; +} + +bool ConsumerGroupInfo::logStreamIdIsSet() const +{ + return logStreamIdIsSet_; +} + +void ConsumerGroupInfo::unsetlogStreamId() +{ + logStreamIdIsSet_ = false; +} + +std::string ConsumerGroupInfo::getProjectId() const +{ + return projectId_; +} + +void ConsumerGroupInfo::setProjectId(const std::string& value) +{ + projectId_ = value; + projectIdIsSet_ = true; +} + +bool ConsumerGroupInfo::projectIdIsSet() const +{ + return projectIdIsSet_; +} + +void ConsumerGroupInfo::unsetprojectId() +{ + projectIdIsSet_ = false; +} + +int32_t ConsumerGroupInfo::getTimeout() const +{ + return timeout_; +} + +void ConsumerGroupInfo::setTimeout(int32_t value) +{ + timeout_ = value; + timeoutIsSet_ = true; +} + +bool ConsumerGroupInfo::timeoutIsSet() const +{ + return timeoutIsSet_; +} + +void ConsumerGroupInfo::unsettimeout() +{ + timeoutIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ConsumerShardCheckpointInfo.cpp b/lts/src/v2/model/ConsumerShardCheckpointInfo.cpp new file mode 100644 index 000000000..913c9df15 --- /dev/null +++ b/lts/src/v2/model/ConsumerShardCheckpointInfo.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/lts/v2/model/ConsumerShardCheckpointInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ConsumerShardCheckpointInfo::ConsumerShardCheckpointInfo() +{ + shardId_ = ""; + shardIdIsSet_ = false; + checkpoint_ = 0L; + checkpointIsSet_ = false; +} + +ConsumerShardCheckpointInfo::~ConsumerShardCheckpointInfo() = default; + +void ConsumerShardCheckpointInfo::validate() +{ +} + +web::json::value ConsumerShardCheckpointInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(shardIdIsSet_) { + val[utility::conversions::to_string_t("shard_id")] = ModelBase::toJson(shardId_); + } + if(checkpointIsSet_) { + val[utility::conversions::to_string_t("checkpoint")] = ModelBase::toJson(checkpoint_); + } + + return val; +} +bool ConsumerShardCheckpointInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("shard_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("shard_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setShardId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("checkpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("checkpoint")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCheckpoint(refVal); + } + } + return ok; +} + + +std::string ConsumerShardCheckpointInfo::getShardId() const +{ + return shardId_; +} + +void ConsumerShardCheckpointInfo::setShardId(const std::string& value) +{ + shardId_ = value; + shardIdIsSet_ = true; +} + +bool ConsumerShardCheckpointInfo::shardIdIsSet() const +{ + return shardIdIsSet_; +} + +void ConsumerShardCheckpointInfo::unsetshardId() +{ + shardIdIsSet_ = false; +} + +int64_t ConsumerShardCheckpointInfo::getCheckpoint() const +{ + return checkpoint_; +} + +void ConsumerShardCheckpointInfo::setCheckpoint(int64_t value) +{ + checkpoint_ = value; + checkpointIsSet_ = true; +} + +bool ConsumerShardCheckpointInfo::checkpointIsSet() const +{ + return checkpointIsSet_; +} + +void ConsumerShardCheckpointInfo::unsetcheckpoint() +{ + checkpointIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/CreateConsumerGroupRequest.cpp b/lts/src/v2/model/CreateConsumerGroupRequest.cpp new file mode 100644 index 000000000..8abecdba7 --- /dev/null +++ b/lts/src/v2/model/CreateConsumerGroupRequest.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/lts/v2/model/CreateConsumerGroupRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +CreateConsumerGroupRequest::CreateConsumerGroupRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; + bodyIsSet_ = false; +} + +CreateConsumerGroupRequest::~CreateConsumerGroupRequest() = default; + +void CreateConsumerGroupRequest::validate() +{ +} + +web::json::value CreateConsumerGroupRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + 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 CreateConsumerGroupRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(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()) + { + ConsumerGroupInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateConsumerGroupRequest::getGroupId() const +{ + return groupId_; +} + +void CreateConsumerGroupRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool CreateConsumerGroupRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void CreateConsumerGroupRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string CreateConsumerGroupRequest::getStreamId() const +{ + return streamId_; +} + +void CreateConsumerGroupRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool CreateConsumerGroupRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void CreateConsumerGroupRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string CreateConsumerGroupRequest::getContentType() const +{ + return contentType_; +} + +void CreateConsumerGroupRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool CreateConsumerGroupRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void CreateConsumerGroupRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +ConsumerGroupInfo CreateConsumerGroupRequest::getBody() const +{ + return body_; +} + +void CreateConsumerGroupRequest::setBody(const ConsumerGroupInfo& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateConsumerGroupRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateConsumerGroupRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/CreateConsumerGroupResponse.cpp b/lts/src/v2/model/CreateConsumerGroupResponse.cpp new file mode 100644 index 000000000..9f4cc34c7 --- /dev/null +++ b/lts/src/v2/model/CreateConsumerGroupResponse.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/lts/v2/model/CreateConsumerGroupResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +CreateConsumerGroupResponse::CreateConsumerGroupResponse() +{ + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + createTime_ = 0L; + createTimeIsSet_ = false; + logGroupId_ = ""; + logGroupIdIsSet_ = false; + logStreamId_ = ""; + logStreamIdIsSet_ = false; + projectId_ = ""; + projectIdIsSet_ = false; + timeout_ = 0; + timeoutIsSet_ = false; +} + +CreateConsumerGroupResponse::~CreateConsumerGroupResponse() = default; + +void CreateConsumerGroupResponse::validate() +{ +} + +web::json::value CreateConsumerGroupResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + 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(projectIdIsSet_) { + val[utility::conversions::to_string_t("project_id")] = ModelBase::toJson(projectId_); + } + if(timeoutIsSet_) { + val[utility::conversions::to_string_t("timeout")] = ModelBase::toJson(timeout_); + } + + return val; +} +bool CreateConsumerGroupResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("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("project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("timeout"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("timeout")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTimeout(refVal); + } + } + return ok; +} + + +std::string CreateConsumerGroupResponse::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void CreateConsumerGroupResponse::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool CreateConsumerGroupResponse::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void CreateConsumerGroupResponse::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +int64_t CreateConsumerGroupResponse::getCreateTime() const +{ + return createTime_; +} + +void CreateConsumerGroupResponse::setCreateTime(int64_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool CreateConsumerGroupResponse::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void CreateConsumerGroupResponse::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string CreateConsumerGroupResponse::getLogGroupId() const +{ + return logGroupId_; +} + +void CreateConsumerGroupResponse::setLogGroupId(const std::string& value) +{ + logGroupId_ = value; + logGroupIdIsSet_ = true; +} + +bool CreateConsumerGroupResponse::logGroupIdIsSet() const +{ + return logGroupIdIsSet_; +} + +void CreateConsumerGroupResponse::unsetlogGroupId() +{ + logGroupIdIsSet_ = false; +} + +std::string CreateConsumerGroupResponse::getLogStreamId() const +{ + return logStreamId_; +} + +void CreateConsumerGroupResponse::setLogStreamId(const std::string& value) +{ + logStreamId_ = value; + logStreamIdIsSet_ = true; +} + +bool CreateConsumerGroupResponse::logStreamIdIsSet() const +{ + return logStreamIdIsSet_; +} + +void CreateConsumerGroupResponse::unsetlogStreamId() +{ + logStreamIdIsSet_ = false; +} + +std::string CreateConsumerGroupResponse::getProjectId() const +{ + return projectId_; +} + +void CreateConsumerGroupResponse::setProjectId(const std::string& value) +{ + projectId_ = value; + projectIdIsSet_ = true; +} + +bool CreateConsumerGroupResponse::projectIdIsSet() const +{ + return projectIdIsSet_; +} + +void CreateConsumerGroupResponse::unsetprojectId() +{ + projectIdIsSet_ = false; +} + +int32_t CreateConsumerGroupResponse::getTimeout() const +{ + return timeout_; +} + +void CreateConsumerGroupResponse::setTimeout(int32_t value) +{ + timeout_ = value; + timeoutIsSet_ = true; +} + +bool CreateConsumerGroupResponse::timeoutIsSet() const +{ + return timeoutIsSet_; +} + +void CreateConsumerGroupResponse::unsettimeout() +{ + timeoutIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/DeleteConsumerGroupRequest.cpp b/lts/src/v2/model/DeleteConsumerGroupRequest.cpp new file mode 100644 index 000000000..c539993d1 --- /dev/null +++ b/lts/src/v2/model/DeleteConsumerGroupRequest.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/lts/v2/model/DeleteConsumerGroupRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +DeleteConsumerGroupRequest::DeleteConsumerGroupRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; +} + +DeleteConsumerGroupRequest::~DeleteConsumerGroupRequest() = default; + +void DeleteConsumerGroupRequest::validate() +{ +} + +web::json::value DeleteConsumerGroupRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + + return val; +} +bool DeleteConsumerGroupRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(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); + } + } + return ok; +} + + +std::string DeleteConsumerGroupRequest::getGroupId() const +{ + return groupId_; +} + +void DeleteConsumerGroupRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool DeleteConsumerGroupRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void DeleteConsumerGroupRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string DeleteConsumerGroupRequest::getStreamId() const +{ + return streamId_; +} + +void DeleteConsumerGroupRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool DeleteConsumerGroupRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void DeleteConsumerGroupRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string DeleteConsumerGroupRequest::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void DeleteConsumerGroupRequest::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool DeleteConsumerGroupRequest::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void DeleteConsumerGroupRequest::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +std::string DeleteConsumerGroupRequest::getContentType() const +{ + return contentType_; +} + +void DeleteConsumerGroupRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool DeleteConsumerGroupRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void DeleteConsumerGroupRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/DeleteConsumerGroupResponse.cpp b/lts/src/v2/model/DeleteConsumerGroupResponse.cpp new file mode 100644 index 000000000..f03b51f91 --- /dev/null +++ b/lts/src/v2/model/DeleteConsumerGroupResponse.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/lts/v2/model/DeleteConsumerGroupResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +DeleteConsumerGroupResponse::DeleteConsumerGroupResponse() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + errorMessage_ = ""; + errorMessageIsSet_ = false; +} + +DeleteConsumerGroupResponse::~DeleteConsumerGroupResponse() = default; + +void DeleteConsumerGroupResponse::validate() +{ +} + +web::json::value DeleteConsumerGroupResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("errorCode")] = ModelBase::toJson(errorCode_); + } + if(errorMessageIsSet_) { + val[utility::conversions::to_string_t("errorMessage")] = ModelBase::toJson(errorMessage_); + } + + return val; +} +bool DeleteConsumerGroupResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("errorCode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("errorCode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("errorMessage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("errorMessage")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorMessage(refVal); + } + } + return ok; +} + + +std::string DeleteConsumerGroupResponse::getErrorCode() const +{ + return errorCode_; +} + +void DeleteConsumerGroupResponse::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool DeleteConsumerGroupResponse::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void DeleteConsumerGroupResponse::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string DeleteConsumerGroupResponse::getErrorMessage() const +{ + return errorMessage_; +} + +void DeleteConsumerGroupResponse::setErrorMessage(const std::string& value) +{ + errorMessage_ = value; + errorMessageIsSet_ = true; +} + +bool DeleteConsumerGroupResponse::errorMessageIsSet() const +{ + return errorMessageIsSet_; +} + +void DeleteConsumerGroupResponse::unseterrorMessage() +{ + errorMessageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListConsumerGroupRequest.cpp b/lts/src/v2/model/ListConsumerGroupRequest.cpp new file mode 100644 index 000000000..2336766f6 --- /dev/null +++ b/lts/src/v2/model/ListConsumerGroupRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/lts/v2/model/ListConsumerGroupRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListConsumerGroupRequest::ListConsumerGroupRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; +} + +ListConsumerGroupRequest::~ListConsumerGroupRequest() = default; + +void ListConsumerGroupRequest::validate() +{ +} + +web::json::value ListConsumerGroupRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + + return val; +} +bool ListConsumerGroupRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(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); + } + } + return ok; +} + + +std::string ListConsumerGroupRequest::getGroupId() const +{ + return groupId_; +} + +void ListConsumerGroupRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ListConsumerGroupRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ListConsumerGroupRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ListConsumerGroupRequest::getStreamId() const +{ + return streamId_; +} + +void ListConsumerGroupRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ListConsumerGroupRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ListConsumerGroupRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ListConsumerGroupRequest::getContentType() const +{ + return contentType_; +} + +void ListConsumerGroupRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ListConsumerGroupRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ListConsumerGroupRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListConsumerGroupResponse.cpp b/lts/src/v2/model/ListConsumerGroupResponse.cpp new file mode 100644 index 000000000..9c06566f8 --- /dev/null +++ b/lts/src/v2/model/ListConsumerGroupResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/lts/v2/model/ListConsumerGroupResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListConsumerGroupResponse::ListConsumerGroupResponse() +{ + bodyIsSet_ = false; +} + +ListConsumerGroupResponse::~ListConsumerGroupResponse() = default; + +void ListConsumerGroupResponse::validate() +{ +} + +web::json::value ListConsumerGroupResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ListConsumerGroupResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::vector& ListConsumerGroupResponse::getBody() +{ + return body_; +} + +void ListConsumerGroupResponse::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ListConsumerGroupResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ListConsumerGroupResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListDetailsConsumerGroupRequest.cpp b/lts/src/v2/model/ListDetailsConsumerGroupRequest.cpp new file mode 100644 index 000000000..53fa340bf --- /dev/null +++ b/lts/src/v2/model/ListDetailsConsumerGroupRequest.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/lts/v2/model/ListDetailsConsumerGroupRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListDetailsConsumerGroupRequest::ListDetailsConsumerGroupRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; +} + +ListDetailsConsumerGroupRequest::~ListDetailsConsumerGroupRequest() = default; + +void ListDetailsConsumerGroupRequest::validate() +{ +} + +web::json::value ListDetailsConsumerGroupRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + + return val; +} +bool ListDetailsConsumerGroupRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(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); + } + } + return ok; +} + + +std::string ListDetailsConsumerGroupRequest::getGroupId() const +{ + return groupId_; +} + +void ListDetailsConsumerGroupRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ListDetailsConsumerGroupRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ListDetailsConsumerGroupRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ListDetailsConsumerGroupRequest::getStreamId() const +{ + return streamId_; +} + +void ListDetailsConsumerGroupRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ListDetailsConsumerGroupRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ListDetailsConsumerGroupRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ListDetailsConsumerGroupRequest::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void ListDetailsConsumerGroupRequest::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool ListDetailsConsumerGroupRequest::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void ListDetailsConsumerGroupRequest::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +std::string ListDetailsConsumerGroupRequest::getContentType() const +{ + return contentType_; +} + +void ListDetailsConsumerGroupRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ListDetailsConsumerGroupRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ListDetailsConsumerGroupRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ListDetailsConsumerGroupResponse.cpp b/lts/src/v2/model/ListDetailsConsumerGroupResponse.cpp new file mode 100644 index 000000000..074f599d9 --- /dev/null +++ b/lts/src/v2/model/ListDetailsConsumerGroupResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/lts/v2/model/ListDetailsConsumerGroupResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ListDetailsConsumerGroupResponse::ListDetailsConsumerGroupResponse() +{ + bodyIsSet_ = false; +} + +ListDetailsConsumerGroupResponse::~ListDetailsConsumerGroupResponse() = default; + +void ListDetailsConsumerGroupResponse::validate() +{ +} + +web::json::value ListDetailsConsumerGroupResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ListDetailsConsumerGroupResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::vector& ListDetailsConsumerGroupResponse::getBody() +{ + return body_; +} + +void ListDetailsConsumerGroupResponse::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ListDetailsConsumerGroupResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ListDetailsConsumerGroupResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowCursorByTimeRequest.cpp b/lts/src/v2/model/ShowCursorByTimeRequest.cpp new file mode 100644 index 000000000..2e5776b53 --- /dev/null +++ b/lts/src/v2/model/ShowCursorByTimeRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/lts/v2/model/ShowCursorByTimeRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowCursorByTimeRequest::ShowCursorByTimeRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + shardId_ = ""; + shardIdIsSet_ = false; + from_ = ""; + fromIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; +} + +ShowCursorByTimeRequest::~ShowCursorByTimeRequest() = default; + +void ShowCursorByTimeRequest::validate() +{ +} + +web::json::value ShowCursorByTimeRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(shardIdIsSet_) { + val[utility::conversions::to_string_t("shard_id")] = ModelBase::toJson(shardId_); + } + if(fromIsSet_) { + val[utility::conversions::to_string_t("from")] = ModelBase::toJson(from_); + } + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + + return val; +} +bool ShowCursorByTimeRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("shard_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("shard_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setShardId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("from"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("from")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFrom(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); + } + } + return ok; +} + + +std::string ShowCursorByTimeRequest::getGroupId() const +{ + return groupId_; +} + +void ShowCursorByTimeRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ShowCursorByTimeRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ShowCursorByTimeRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ShowCursorByTimeRequest::getStreamId() const +{ + return streamId_; +} + +void ShowCursorByTimeRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ShowCursorByTimeRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ShowCursorByTimeRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ShowCursorByTimeRequest::getShardId() const +{ + return shardId_; +} + +void ShowCursorByTimeRequest::setShardId(const std::string& value) +{ + shardId_ = value; + shardIdIsSet_ = true; +} + +bool ShowCursorByTimeRequest::shardIdIsSet() const +{ + return shardIdIsSet_; +} + +void ShowCursorByTimeRequest::unsetshardId() +{ + shardIdIsSet_ = false; +} + +std::string ShowCursorByTimeRequest::getFrom() const +{ + return from_; +} + +void ShowCursorByTimeRequest::setFrom(const std::string& value) +{ + from_ = value; + fromIsSet_ = true; +} + +bool ShowCursorByTimeRequest::fromIsSet() const +{ + return fromIsSet_; +} + +void ShowCursorByTimeRequest::unsetfrom() +{ + fromIsSet_ = false; +} + +std::string ShowCursorByTimeRequest::getContentType() const +{ + return contentType_; +} + +void ShowCursorByTimeRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ShowCursorByTimeRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ShowCursorByTimeRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowCursorByTimeResponse.cpp b/lts/src/v2/model/ShowCursorByTimeResponse.cpp new file mode 100644 index 000000000..ddd4ef239 --- /dev/null +++ b/lts/src/v2/model/ShowCursorByTimeResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/lts/v2/model/ShowCursorByTimeResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowCursorByTimeResponse::ShowCursorByTimeResponse() +{ + cursor_ = 0L; + cursorIsSet_ = false; +} + +ShowCursorByTimeResponse::~ShowCursorByTimeResponse() = default; + +void ShowCursorByTimeResponse::validate() +{ +} + +web::json::value ShowCursorByTimeResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(cursorIsSet_) { + val[utility::conversions::to_string_t("cursor")] = ModelBase::toJson(cursor_); + } + + return val; +} +bool ShowCursorByTimeResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cursor"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cursor")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCursor(refVal); + } + } + return ok; +} + + +int64_t ShowCursorByTimeResponse::getCursor() const +{ + return cursor_; +} + +void ShowCursorByTimeResponse::setCursor(int64_t value) +{ + cursor_ = value; + cursorIsSet_ = true; +} + +bool ShowCursorByTimeResponse::cursorIsSet() const +{ + return cursorIsSet_; +} + +void ShowCursorByTimeResponse::unsetcursor() +{ + cursorIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowCursorTimeRequest.cpp b/lts/src/v2/model/ShowCursorTimeRequest.cpp new file mode 100644 index 000000000..3f244cbbe --- /dev/null +++ b/lts/src/v2/model/ShowCursorTimeRequest.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/lts/v2/model/ShowCursorTimeRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowCursorTimeRequest::ShowCursorTimeRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + shardId_ = ""; + shardIdIsSet_ = false; + cursor_ = ""; + cursorIsSet_ = false; +} + +ShowCursorTimeRequest::~ShowCursorTimeRequest() = default; + +void ShowCursorTimeRequest::validate() +{ +} + +web::json::value ShowCursorTimeRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(shardIdIsSet_) { + val[utility::conversions::to_string_t("shard_id")] = ModelBase::toJson(shardId_); + } + if(cursorIsSet_) { + val[utility::conversions::to_string_t("cursor")] = ModelBase::toJson(cursor_); + } + + return val; +} +bool ShowCursorTimeRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("shard_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("shard_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setShardId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cursor"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cursor")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCursor(refVal); + } + } + return ok; +} + + +std::string ShowCursorTimeRequest::getGroupId() const +{ + return groupId_; +} + +void ShowCursorTimeRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ShowCursorTimeRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ShowCursorTimeRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ShowCursorTimeRequest::getStreamId() const +{ + return streamId_; +} + +void ShowCursorTimeRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ShowCursorTimeRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ShowCursorTimeRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ShowCursorTimeRequest::getShardId() const +{ + return shardId_; +} + +void ShowCursorTimeRequest::setShardId(const std::string& value) +{ + shardId_ = value; + shardIdIsSet_ = true; +} + +bool ShowCursorTimeRequest::shardIdIsSet() const +{ + return shardIdIsSet_; +} + +void ShowCursorTimeRequest::unsetshardId() +{ + shardIdIsSet_ = false; +} + +std::string ShowCursorTimeRequest::getCursor() const +{ + return cursor_; +} + +void ShowCursorTimeRequest::setCursor(const std::string& value) +{ + cursor_ = value; + cursorIsSet_ = true; +} + +bool ShowCursorTimeRequest::cursorIsSet() const +{ + return cursorIsSet_; +} + +void ShowCursorTimeRequest::unsetcursor() +{ + cursorIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowCursorTimeResponse.cpp b/lts/src/v2/model/ShowCursorTimeResponse.cpp new file mode 100644 index 000000000..a3ecfc83a --- /dev/null +++ b/lts/src/v2/model/ShowCursorTimeResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/lts/v2/model/ShowCursorTimeResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowCursorTimeResponse::ShowCursorTimeResponse() +{ + cursorTime_ = 0L; + cursorTimeIsSet_ = false; +} + +ShowCursorTimeResponse::~ShowCursorTimeResponse() = default; + +void ShowCursorTimeResponse::validate() +{ +} + +web::json::value ShowCursorTimeResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(cursorTimeIsSet_) { + val[utility::conversions::to_string_t("cursor_time")] = ModelBase::toJson(cursorTime_); + } + + return val; +} +bool ShowCursorTimeResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cursor_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cursor_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCursorTime(refVal); + } + } + return ok; +} + + +int64_t ShowCursorTimeResponse::getCursorTime() const +{ + return cursorTime_; +} + +void ShowCursorTimeResponse::setCursorTime(int64_t value) +{ + cursorTime_ = value; + cursorTimeIsSet_ = true; +} + +bool ShowCursorTimeResponse::cursorTimeIsSet() const +{ + return cursorTimeIsSet_; +} + +void ShowCursorTimeResponse::unsetcursorTime() +{ + cursorTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowLogStreamShardsRequest.cpp b/lts/src/v2/model/ShowLogStreamShardsRequest.cpp new file mode 100644 index 000000000..263f00938 --- /dev/null +++ b/lts/src/v2/model/ShowLogStreamShardsRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/lts/v2/model/ShowLogStreamShardsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowLogStreamShardsRequest::ShowLogStreamShardsRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; +} + +ShowLogStreamShardsRequest::~ShowLogStreamShardsRequest() = default; + +void ShowLogStreamShardsRequest::validate() +{ +} + +web::json::value ShowLogStreamShardsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("Content-Type")] = ModelBase::toJson(contentType_); + } + + return val; +} +bool ShowLogStreamShardsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(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); + } + } + return ok; +} + + +std::string ShowLogStreamShardsRequest::getGroupId() const +{ + return groupId_; +} + +void ShowLogStreamShardsRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool ShowLogStreamShardsRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void ShowLogStreamShardsRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string ShowLogStreamShardsRequest::getStreamId() const +{ + return streamId_; +} + +void ShowLogStreamShardsRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool ShowLogStreamShardsRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void ShowLogStreamShardsRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string ShowLogStreamShardsRequest::getContentType() const +{ + return contentType_; +} + +void ShowLogStreamShardsRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool ShowLogStreamShardsRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void ShowLogStreamShardsRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/ShowLogStreamShardsResponse.cpp b/lts/src/v2/model/ShowLogStreamShardsResponse.cpp new file mode 100644 index 000000000..edbf90fe7 --- /dev/null +++ b/lts/src/v2/model/ShowLogStreamShardsResponse.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/lts/v2/model/ShowLogStreamShardsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +ShowLogStreamShardsResponse::ShowLogStreamShardsResponse() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + isQueryComplete_ = false; + isQueryCompleteIsSet_ = false; + result_ = ""; + resultIsSet_ = false; +} + +ShowLogStreamShardsResponse::~ShowLogStreamShardsResponse() = default; + +void ShowLogStreamShardsResponse::validate() +{ +} + +web::json::value ShowLogStreamShardsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("errorCode")] = ModelBase::toJson(errorCode_); + } + if(isQueryCompleteIsSet_) { + val[utility::conversions::to_string_t("isQueryComplete")] = ModelBase::toJson(isQueryComplete_); + } + if(resultIsSet_) { + val[utility::conversions::to_string_t("result")] = ModelBase::toJson(result_); + } + + return val; +} +bool ShowLogStreamShardsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("errorCode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("errorCode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(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); + } + } + if(val.has_field(utility::conversions::to_string_t("result"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("result")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setResult(refVal); + } + } + return ok; +} + + +std::string ShowLogStreamShardsResponse::getErrorCode() const +{ + return errorCode_; +} + +void ShowLogStreamShardsResponse::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool ShowLogStreamShardsResponse::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void ShowLogStreamShardsResponse::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +bool ShowLogStreamShardsResponse::isIsQueryComplete() const +{ + return isQueryComplete_; +} + +void ShowLogStreamShardsResponse::setIsQueryComplete(bool value) +{ + isQueryComplete_ = value; + isQueryCompleteIsSet_ = true; +} + +bool ShowLogStreamShardsResponse::isQueryCompleteIsSet() const +{ + return isQueryCompleteIsSet_; +} + +void ShowLogStreamShardsResponse::unsetisQueryComplete() +{ + isQueryCompleteIsSet_ = false; +} + +std::string ShowLogStreamShardsResponse::getResult() const +{ + return result_; +} + +void ShowLogStreamShardsResponse::setResult(const std::string& value) +{ + result_ = value; + resultIsSet_ = true; +} + +bool ShowLogStreamShardsResponse::resultIsSet() const +{ + return resultIsSet_; +} + +void ShowLogStreamShardsResponse::unsetresult() +{ + resultIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/UpdateCheckPointRequest.cpp b/lts/src/v2/model/UpdateCheckPointRequest.cpp new file mode 100644 index 000000000..d8e3facea --- /dev/null +++ b/lts/src/v2/model/UpdateCheckPointRequest.cpp @@ -0,0 +1,253 @@ + + +#include "huaweicloud/lts/v2/model/UpdateCheckPointRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +UpdateCheckPointRequest::UpdateCheckPointRequest() +{ + groupId_ = ""; + groupIdIsSet_ = false; + streamId_ = ""; + streamIdIsSet_ = false; + consumerGroupName_ = ""; + consumerGroupNameIsSet_ = false; + consumerName_ = ""; + consumerNameIsSet_ = false; + contentType_ = ""; + contentTypeIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateCheckPointRequest::~UpdateCheckPointRequest() = default; + +void UpdateCheckPointRequest::validate() +{ +} + +web::json::value UpdateCheckPointRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(streamIdIsSet_) { + val[utility::conversions::to_string_t("stream_id")] = ModelBase::toJson(streamId_); + } + if(consumerGroupNameIsSet_) { + val[utility::conversions::to_string_t("consumer_group_name")] = ModelBase::toJson(consumerGroupName_); + } + if(consumerNameIsSet_) { + val[utility::conversions::to_string_t("consumer_name")] = ModelBase::toJson(consumerName_); + } + 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 UpdateCheckPointRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_group_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_group_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerGroupName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("consumer_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("consumer_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConsumerName(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()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateCheckPointRequest::getGroupId() const +{ + return groupId_; +} + +void UpdateCheckPointRequest::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool UpdateCheckPointRequest::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void UpdateCheckPointRequest::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string UpdateCheckPointRequest::getStreamId() const +{ + return streamId_; +} + +void UpdateCheckPointRequest::setStreamId(const std::string& value) +{ + streamId_ = value; + streamIdIsSet_ = true; +} + +bool UpdateCheckPointRequest::streamIdIsSet() const +{ + return streamIdIsSet_; +} + +void UpdateCheckPointRequest::unsetstreamId() +{ + streamIdIsSet_ = false; +} + +std::string UpdateCheckPointRequest::getConsumerGroupName() const +{ + return consumerGroupName_; +} + +void UpdateCheckPointRequest::setConsumerGroupName(const std::string& value) +{ + consumerGroupName_ = value; + consumerGroupNameIsSet_ = true; +} + +bool UpdateCheckPointRequest::consumerGroupNameIsSet() const +{ + return consumerGroupNameIsSet_; +} + +void UpdateCheckPointRequest::unsetconsumerGroupName() +{ + consumerGroupNameIsSet_ = false; +} + +std::string UpdateCheckPointRequest::getConsumerName() const +{ + return consumerName_; +} + +void UpdateCheckPointRequest::setConsumerName(const std::string& value) +{ + consumerName_ = value; + consumerNameIsSet_ = true; +} + +bool UpdateCheckPointRequest::consumerNameIsSet() const +{ + return consumerNameIsSet_; +} + +void UpdateCheckPointRequest::unsetconsumerName() +{ + consumerNameIsSet_ = false; +} + +std::string UpdateCheckPointRequest::getContentType() const +{ + return contentType_; +} + +void UpdateCheckPointRequest::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool UpdateCheckPointRequest::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void UpdateCheckPointRequest::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +std::vector& UpdateCheckPointRequest::getBody() +{ + return body_; +} + +void UpdateCheckPointRequest::setBody(const std::vector& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateCheckPointRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateCheckPointRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/lts/src/v2/model/UpdateCheckPointResponse.cpp b/lts/src/v2/model/UpdateCheckPointResponse.cpp new file mode 100644 index 000000000..dd7d611e3 --- /dev/null +++ b/lts/src/v2/model/UpdateCheckPointResponse.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/lts/v2/model/UpdateCheckPointResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Lts { +namespace V2 { +namespace Model { + + + + +UpdateCheckPointResponse::UpdateCheckPointResponse() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + errorMessage_ = ""; + errorMessageIsSet_ = false; +} + +UpdateCheckPointResponse::~UpdateCheckPointResponse() = default; + +void UpdateCheckPointResponse::validate() +{ +} + +web::json::value UpdateCheckPointResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("errorCode")] = ModelBase::toJson(errorCode_); + } + if(errorMessageIsSet_) { + val[utility::conversions::to_string_t("errorMessage")] = ModelBase::toJson(errorMessage_); + } + + return val; +} +bool UpdateCheckPointResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("errorCode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("errorCode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("errorMessage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("errorMessage")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorMessage(refVal); + } + } + return ok; +} + + +std::string UpdateCheckPointResponse::getErrorCode() const +{ + return errorCode_; +} + +void UpdateCheckPointResponse::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool UpdateCheckPointResponse::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void UpdateCheckPointResponse::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string UpdateCheckPointResponse::getErrorMessage() const +{ + return errorMessage_; +} + +void UpdateCheckPointResponse::setErrorMessage(const std::string& value) +{ + errorMessage_ = value; + errorMessageIsSet_ = true; +} + +bool UpdateCheckPointResponse::errorMessageIsSet() const +{ + return errorMessageIsSet_; +} + +void UpdateCheckPointResponse::unseterrorMessage() +{ + errorMessageIsSet_ = false; +} + +} +} +} +} +} + +