AWS SDK for C++

AWS SDK for C++ Version 1.11.758

Loading...
Searching...
No Matches
CreateTopicRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/kafka/KafkaRequest.h>
9#include <aws/kafka/Kafka_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Kafka {
15namespace Model {
16
20 public:
21 AWS_KAFKA_API CreateTopicRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "CreateTopic"; }
28
29 AWS_KAFKA_API Aws::String SerializePayload() const override;
30
32
38 inline const Aws::String& GetClusterArn() const { return m_clusterArn; }
39 inline bool ClusterArnHasBeenSet() const { return m_clusterArnHasBeenSet; }
40 template <typename ClusterArnT = Aws::String>
41 void SetClusterArn(ClusterArnT&& value) {
42 m_clusterArnHasBeenSet = true;
43 m_clusterArn = std::forward<ClusterArnT>(value);
44 }
45 template <typename ClusterArnT = Aws::String>
46 CreateTopicRequest& WithClusterArn(ClusterArnT&& value) {
47 SetClusterArn(std::forward<ClusterArnT>(value));
48 return *this;
49 }
51
53
58 inline const Aws::String& GetTopicName() const { return m_topicName; }
59 inline bool TopicNameHasBeenSet() const { return m_topicNameHasBeenSet; }
60 template <typename TopicNameT = Aws::String>
61 void SetTopicName(TopicNameT&& value) {
62 m_topicNameHasBeenSet = true;
63 m_topicName = std::forward<TopicNameT>(value);
64 }
65 template <typename TopicNameT = Aws::String>
66 CreateTopicRequest& WithTopicName(TopicNameT&& value) {
67 SetTopicName(std::forward<TopicNameT>(value));
68 return *this;
69 }
71
73
78 inline int GetPartitionCount() const { return m_partitionCount; }
79 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
80 inline void SetPartitionCount(int value) {
81 m_partitionCountHasBeenSet = true;
82 m_partitionCount = value;
83 }
85 SetPartitionCount(value);
86 return *this;
87 }
89
91
96 inline int GetReplicationFactor() const { return m_replicationFactor; }
97 inline bool ReplicationFactorHasBeenSet() const { return m_replicationFactorHasBeenSet; }
98 inline void SetReplicationFactor(int value) {
99 m_replicationFactorHasBeenSet = true;
100 m_replicationFactor = value;
101 }
104 return *this;
105 }
107
109
114 inline const Aws::String& GetConfigs() const { return m_configs; }
115 inline bool ConfigsHasBeenSet() const { return m_configsHasBeenSet; }
116 template <typename ConfigsT = Aws::String>
117 void SetConfigs(ConfigsT&& value) {
118 m_configsHasBeenSet = true;
119 m_configs = std::forward<ConfigsT>(value);
120 }
121 template <typename ConfigsT = Aws::String>
122 CreateTopicRequest& WithConfigs(ConfigsT&& value) {
123 SetConfigs(std::forward<ConfigsT>(value));
124 return *this;
125 }
127 private:
128 Aws::String m_clusterArn;
129
130 Aws::String m_topicName;
131
132 int m_partitionCount{0};
133
134 int m_replicationFactor{0};
135
136 Aws::String m_configs;
137 bool m_clusterArnHasBeenSet = false;
138 bool m_topicNameHasBeenSet = false;
139 bool m_partitionCountHasBeenSet = false;
140 bool m_replicationFactorHasBeenSet = false;
141 bool m_configsHasBeenSet = false;
142};
143
144} // namespace Model
145} // namespace Kafka
146} // namespace Aws
CreateTopicRequest & WithReplicationFactor(int value)
CreateTopicRequest & WithClusterArn(ClusterArnT &&value)
CreateTopicRequest & WithConfigs(ConfigsT &&value)
const Aws::String & GetClusterArn() const
const Aws::String & GetConfigs() const
AWS_KAFKA_API Aws::String SerializePayload() const override
CreateTopicRequest & WithTopicName(TopicNameT &&value)
AWS_KAFKA_API CreateTopicRequest()=default
virtual const char * GetServiceRequestName() const override
CreateTopicRequest & WithPartitionCount(int value)
void SetClusterArn(ClusterArnT &&value)
const Aws::String & GetTopicName() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String