AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
CreateCollectionRequest.h
1
6#pragma once
7#include <aws/opensearchserverless/OpenSearchServerless_EXPORTS.h>
8#include <aws/opensearchserverless/OpenSearchServerlessRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/opensearchserverless/model/CollectionType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/opensearchserverless/model/StandbyReplicas.h>
13#include <aws/opensearchserverless/model/Tag.h>
14#include <utility>
15#include <aws/core/utils/UUID.h>
16
17namespace Aws
18{
19namespace OpenSearchServerless
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateCollection"; }
36
37 AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override;
38
39 AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
40
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template<typename NameT = Aws::String>
49 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
50 template<typename NameT = Aws::String>
51 CreateCollectionRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
53
55
58 inline CollectionType GetType() const { return m_type; }
59 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
60 inline void SetType(CollectionType value) { m_typeHasBeenSet = true; m_type = value; }
61 inline CreateCollectionRequest& WithType(CollectionType value) { SetType(value); return *this;}
63
65
68 inline const Aws::String& GetDescription() const { return m_description; }
69 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
70 template<typename DescriptionT = Aws::String>
71 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
72 template<typename DescriptionT = Aws::String>
73 CreateCollectionRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
75
77
81 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
82 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
83 template<typename TagsT = Aws::Vector<Tag>>
84 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
85 template<typename TagsT = Aws::Vector<Tag>>
86 CreateCollectionRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
87 template<typename TagsT = Tag>
88 CreateCollectionRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
90
92
95 inline StandbyReplicas GetStandbyReplicas() const { return m_standbyReplicas; }
96 inline bool StandbyReplicasHasBeenSet() const { return m_standbyReplicasHasBeenSet; }
97 inline void SetStandbyReplicas(StandbyReplicas value) { m_standbyReplicasHasBeenSet = true; m_standbyReplicas = value; }
100
102
105 inline const Aws::String& GetClientToken() const { return m_clientToken; }
106 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
107 template<typename ClientTokenT = Aws::String>
108 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
109 template<typename ClientTokenT = Aws::String>
110 CreateCollectionRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
112 private:
113
114 Aws::String m_name;
115 bool m_nameHasBeenSet = false;
116
118 bool m_typeHasBeenSet = false;
119
120 Aws::String m_description;
121 bool m_descriptionHasBeenSet = false;
122
123 Aws::Vector<Tag> m_tags;
124 bool m_tagsHasBeenSet = false;
125
126 StandbyReplicas m_standbyReplicas{StandbyReplicas::NOT_SET};
127 bool m_standbyReplicasHasBeenSet = false;
128
130 bool m_clientTokenHasBeenSet = true;
131 };
132
133} // namespace Model
134} // namespace OpenSearchServerless
135} // namespace Aws
AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override
AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateCollectionRequest & WithClientToken(ClientTokenT &&value)
CreateCollectionRequest & WithStandbyReplicas(StandbyReplicas value)
CreateCollectionRequest & WithType(CollectionType value)
CreateCollectionRequest & WithDescription(DescriptionT &&value)
AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest()=default
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector