AWS SDK for C++

AWS SDK for C++ Version 1.11.867

Loading...
Searching...
No Matches
PartitionSpec.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/kafka/Kafka_EXPORTS.h>
9#include <aws/kafka/model/PartitionSource.h>
10#include <aws/kafka/model/PartitionStrategy.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Kafka {
22namespace Model {
23
31 public:
32 AWS_KAFKA_API PartitionSpec() = default;
33 AWS_KAFKA_API PartitionSpec(Aws::Utils::Json::JsonView jsonValue);
35 AWS_KAFKA_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline PartitionStrategy GetPartitionStrategy() const { return m_partitionStrategy; }
42 inline bool PartitionStrategyHasBeenSet() const { return m_partitionStrategyHasBeenSet; }
44 m_partitionStrategyHasBeenSet = true;
45 m_partitionStrategy = value;
46 }
49 return *this;
50 }
52
54
58 inline const Aws::Vector<PartitionSource>& GetSourceList() const { return m_sourceList; }
59 inline bool SourceListHasBeenSet() const { return m_sourceListHasBeenSet; }
60 template <typename SourceListT = Aws::Vector<PartitionSource>>
61 void SetSourceList(SourceListT&& value) {
62 m_sourceListHasBeenSet = true;
63 m_sourceList = std::forward<SourceListT>(value);
64 }
65 template <typename SourceListT = Aws::Vector<PartitionSource>>
66 PartitionSpec& WithSourceList(SourceListT&& value) {
67 SetSourceList(std::forward<SourceListT>(value));
68 return *this;
69 }
70 template <typename SourceListT = PartitionSource>
71 PartitionSpec& AddSourceList(SourceListT&& value) {
72 m_sourceListHasBeenSet = true;
73 m_sourceList.emplace_back(std::forward<SourceListT>(value));
74 return *this;
75 }
77 private:
79
81 bool m_partitionStrategyHasBeenSet = false;
82 bool m_sourceListHasBeenSet = false;
83};
84
85} // namespace Model
86} // namespace Kafka
87} // namespace Aws
PartitionStrategy GetPartitionStrategy() const
AWS_KAFKA_API PartitionSpec(Aws::Utils::Json::JsonView jsonValue)
PartitionSpec & WithSourceList(SourceListT &&value)
AWS_KAFKA_API PartitionSpec()=default
const Aws::Vector< PartitionSource > & GetSourceList() const
void SetSourceList(SourceListT &&value)
AWS_KAFKA_API PartitionSpec & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_KAFKA_API Aws::Utils::Json::JsonValue Jsonize() const
PartitionSpec & WithPartitionStrategy(PartitionStrategy value)
PartitionSpec & AddSourceList(SourceListT &&value)
void SetPartitionStrategy(PartitionStrategy value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue