AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
TopicPartitionInfo.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/kafka/Kafka_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Kafka {
20namespace Model {
21
28 public:
29 AWS_KAFKA_API TopicPartitionInfo() = default;
32 AWS_KAFKA_API Aws::Utils::Json::JsonValue Jsonize() const;
33
35
38 inline int GetPartition() const { return m_partition; }
39 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
40 inline void SetPartition(int value) {
41 m_partitionHasBeenSet = true;
42 m_partition = value;
43 }
44 inline TopicPartitionInfo& WithPartition(int value) {
45 SetPartition(value);
46 return *this;
47 }
49
51
54 inline int GetLeader() const { return m_leader; }
55 inline bool LeaderHasBeenSet() const { return m_leaderHasBeenSet; }
56 inline void SetLeader(int value) {
57 m_leaderHasBeenSet = true;
58 m_leader = value;
59 }
60 inline TopicPartitionInfo& WithLeader(int value) {
61 SetLeader(value);
62 return *this;
63 }
65
67
70 inline const Aws::Vector<int>& GetReplicas() const { return m_replicas; }
71 inline bool ReplicasHasBeenSet() const { return m_replicasHasBeenSet; }
72 template <typename ReplicasT = Aws::Vector<int>>
73 void SetReplicas(ReplicasT&& value) {
74 m_replicasHasBeenSet = true;
75 m_replicas = std::forward<ReplicasT>(value);
76 }
77 template <typename ReplicasT = Aws::Vector<int>>
78 TopicPartitionInfo& WithReplicas(ReplicasT&& value) {
79 SetReplicas(std::forward<ReplicasT>(value));
80 return *this;
81 }
82 inline TopicPartitionInfo& AddReplicas(int value) {
83 m_replicasHasBeenSet = true;
84 m_replicas.push_back(value);
85 return *this;
86 }
88
90
93 inline const Aws::Vector<int>& GetIsr() const { return m_isr; }
94 inline bool IsrHasBeenSet() const { return m_isrHasBeenSet; }
95 template <typename IsrT = Aws::Vector<int>>
96 void SetIsr(IsrT&& value) {
97 m_isrHasBeenSet = true;
98 m_isr = std::forward<IsrT>(value);
99 }
100 template <typename IsrT = Aws::Vector<int>>
102 SetIsr(std::forward<IsrT>(value));
103 return *this;
104 }
105 inline TopicPartitionInfo& AddIsr(int value) {
106 m_isrHasBeenSet = true;
107 m_isr.push_back(value);
108 return *this;
109 }
111 private:
112 int m_partition{0};
113
114 int m_leader{0};
115
116 Aws::Vector<int> m_replicas;
117
118 Aws::Vector<int> m_isr;
119 bool m_partitionHasBeenSet = false;
120 bool m_leaderHasBeenSet = false;
121 bool m_replicasHasBeenSet = false;
122 bool m_isrHasBeenSet = false;
123};
124
125} // namespace Model
126} // namespace Kafka
127} // namespace Aws
AWS_KAFKA_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< int > & GetReplicas() const
TopicPartitionInfo & AddIsr(int value)
TopicPartitionInfo & WithLeader(int value)
AWS_KAFKA_API TopicPartitionInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_KAFKA_API TopicPartitionInfo(Aws::Utils::Json::JsonView jsonValue)
TopicPartitionInfo & WithReplicas(ReplicasT &&value)
TopicPartitionInfo & WithPartition(int value)
AWS_KAFKA_API TopicPartitionInfo()=default
TopicPartitionInfo & WithIsr(IsrT &&value)
const Aws::Vector< int > & GetIsr() const
TopicPartitionInfo & AddReplicas(int value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue