aws_sdk_neptunegraph/operation/create_graph/_create_graph_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateGraphInput {
6 /// <p>A name for the new Neptune Analytics graph to be created.</p>
7 /// <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
8 pub graph_name: ::std::option::Option<::std::string::String>,
9 /// <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</p>
10 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
11 /// <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (<code>true</code> to enable, or <code>false</code> to disable.</p>
12 pub public_connectivity: ::std::option::Option<bool>,
13 /// <p>Specifies a KMS key to use to encrypt data in the new graph.</p>
14 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
15 /// <p>Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as <code>dimension=</code>value. Max = 65,535</p>
16 pub vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
17 /// <p>The number of replicas in other AZs. Min =0, Max = 2, Default = 1.</p><important>
18 /// <p>Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.</p>
19 /// </important>
20 pub replica_count: ::std::option::Option<i32>,
21 /// <p>Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (<code>true</code> or <code>false</code>).</p>
22 pub deletion_protection: ::std::option::Option<bool>,
23 /// <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16</p>
24 pub provisioned_memory: ::std::option::Option<i32>,
25}
26impl CreateGraphInput {
27 /// <p>A name for the new Neptune Analytics graph to be created.</p>
28 /// <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
29 pub fn graph_name(&self) -> ::std::option::Option<&str> {
30 self.graph_name.as_deref()
31 }
32 /// <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</p>
33 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
34 self.tags.as_ref()
35 }
36 /// <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (<code>true</code> to enable, or <code>false</code> to disable.</p>
37 pub fn public_connectivity(&self) -> ::std::option::Option<bool> {
38 self.public_connectivity
39 }
40 /// <p>Specifies a KMS key to use to encrypt data in the new graph.</p>
41 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
42 self.kms_key_identifier.as_deref()
43 }
44 /// <p>Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as <code>dimension=</code>value. Max = 65,535</p>
45 pub fn vector_search_configuration(&self) -> ::std::option::Option<&crate::types::VectorSearchConfiguration> {
46 self.vector_search_configuration.as_ref()
47 }
48 /// <p>The number of replicas in other AZs. Min =0, Max = 2, Default = 1.</p><important>
49 /// <p>Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.</p>
50 /// </important>
51 pub fn replica_count(&self) -> ::std::option::Option<i32> {
52 self.replica_count
53 }
54 /// <p>Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (<code>true</code> or <code>false</code>).</p>
55 pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
56 self.deletion_protection
57 }
58 /// <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16</p>
59 pub fn provisioned_memory(&self) -> ::std::option::Option<i32> {
60 self.provisioned_memory
61 }
62}
63impl CreateGraphInput {
64 /// Creates a new builder-style object to manufacture [`CreateGraphInput`](crate::operation::create_graph::CreateGraphInput).
65 pub fn builder() -> crate::operation::create_graph::builders::CreateGraphInputBuilder {
66 crate::operation::create_graph::builders::CreateGraphInputBuilder::default()
67 }
68}
69
70/// A builder for [`CreateGraphInput`](crate::operation::create_graph::CreateGraphInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateGraphInputBuilder {
74 pub(crate) graph_name: ::std::option::Option<::std::string::String>,
75 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
76 pub(crate) public_connectivity: ::std::option::Option<bool>,
77 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
78 pub(crate) vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
79 pub(crate) replica_count: ::std::option::Option<i32>,
80 pub(crate) deletion_protection: ::std::option::Option<bool>,
81 pub(crate) provisioned_memory: ::std::option::Option<i32>,
82}
83impl CreateGraphInputBuilder {
84 /// <p>A name for the new Neptune Analytics graph to be created.</p>
85 /// <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
86 /// This field is required.
87 pub fn graph_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.graph_name = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <p>A name for the new Neptune Analytics graph to be created.</p>
92 /// <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
93 pub fn set_graph_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.graph_name = input;
95 self
96 }
97 /// <p>A name for the new Neptune Analytics graph to be created.</p>
98 /// <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
99 pub fn get_graph_name(&self) -> &::std::option::Option<::std::string::String> {
100 &self.graph_name
101 }
102 /// Adds a key-value pair to `tags`.
103 ///
104 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
105 ///
106 /// <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</p>
107 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
108 let mut hash_map = self.tags.unwrap_or_default();
109 hash_map.insert(k.into(), v.into());
110 self.tags = ::std::option::Option::Some(hash_map);
111 self
112 }
113 /// <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</p>
114 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
115 self.tags = input;
116 self
117 }
118 /// <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</p>
119 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
120 &self.tags
121 }
122 /// <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (<code>true</code> to enable, or <code>false</code> to disable.</p>
123 pub fn public_connectivity(mut self, input: bool) -> Self {
124 self.public_connectivity = ::std::option::Option::Some(input);
125 self
126 }
127 /// <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (<code>true</code> to enable, or <code>false</code> to disable.</p>
128 pub fn set_public_connectivity(mut self, input: ::std::option::Option<bool>) -> Self {
129 self.public_connectivity = input;
130 self
131 }
132 /// <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (<code>true</code> to enable, or <code>false</code> to disable.</p>
133 pub fn get_public_connectivity(&self) -> &::std::option::Option<bool> {
134 &self.public_connectivity
135 }
136 /// <p>Specifies a KMS key to use to encrypt data in the new graph.</p>
137 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.kms_key_identifier = ::std::option::Option::Some(input.into());
139 self
140 }
141 /// <p>Specifies a KMS key to use to encrypt data in the new graph.</p>
142 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.kms_key_identifier = input;
144 self
145 }
146 /// <p>Specifies a KMS key to use to encrypt data in the new graph.</p>
147 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
148 &self.kms_key_identifier
149 }
150 /// <p>Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as <code>dimension=</code>value. Max = 65,535</p>
151 pub fn vector_search_configuration(mut self, input: crate::types::VectorSearchConfiguration) -> Self {
152 self.vector_search_configuration = ::std::option::Option::Some(input);
153 self
154 }
155 /// <p>Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as <code>dimension=</code>value. Max = 65,535</p>
156 pub fn set_vector_search_configuration(mut self, input: ::std::option::Option<crate::types::VectorSearchConfiguration>) -> Self {
157 self.vector_search_configuration = input;
158 self
159 }
160 /// <p>Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as <code>dimension=</code>value. Max = 65,535</p>
161 pub fn get_vector_search_configuration(&self) -> &::std::option::Option<crate::types::VectorSearchConfiguration> {
162 &self.vector_search_configuration
163 }
164 /// <p>The number of replicas in other AZs. Min =0, Max = 2, Default = 1.</p><important>
165 /// <p>Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.</p>
166 /// </important>
167 pub fn replica_count(mut self, input: i32) -> Self {
168 self.replica_count = ::std::option::Option::Some(input);
169 self
170 }
171 /// <p>The number of replicas in other AZs. Min =0, Max = 2, Default = 1.</p><important>
172 /// <p>Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.</p>
173 /// </important>
174 pub fn set_replica_count(mut self, input: ::std::option::Option<i32>) -> Self {
175 self.replica_count = input;
176 self
177 }
178 /// <p>The number of replicas in other AZs. Min =0, Max = 2, Default = 1.</p><important>
179 /// <p>Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.</p>
180 /// </important>
181 pub fn get_replica_count(&self) -> &::std::option::Option<i32> {
182 &self.replica_count
183 }
184 /// <p>Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (<code>true</code> or <code>false</code>).</p>
185 pub fn deletion_protection(mut self, input: bool) -> Self {
186 self.deletion_protection = ::std::option::Option::Some(input);
187 self
188 }
189 /// <p>Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (<code>true</code> or <code>false</code>).</p>
190 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
191 self.deletion_protection = input;
192 self
193 }
194 /// <p>Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (<code>true</code> or <code>false</code>).</p>
195 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
196 &self.deletion_protection
197 }
198 /// <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16</p>
199 /// This field is required.
200 pub fn provisioned_memory(mut self, input: i32) -> Self {
201 self.provisioned_memory = ::std::option::Option::Some(input);
202 self
203 }
204 /// <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16</p>
205 pub fn set_provisioned_memory(mut self, input: ::std::option::Option<i32>) -> Self {
206 self.provisioned_memory = input;
207 self
208 }
209 /// <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16</p>
210 pub fn get_provisioned_memory(&self) -> &::std::option::Option<i32> {
211 &self.provisioned_memory
212 }
213 /// Consumes the builder and constructs a [`CreateGraphInput`](crate::operation::create_graph::CreateGraphInput).
214 pub fn build(self) -> ::std::result::Result<crate::operation::create_graph::CreateGraphInput, ::aws_smithy_types::error::operation::BuildError> {
215 ::std::result::Result::Ok(crate::operation::create_graph::CreateGraphInput {
216 graph_name: self.graph_name,
217 tags: self.tags,
218 public_connectivity: self.public_connectivity,
219 kms_key_identifier: self.kms_key_identifier,
220 vector_search_configuration: self.vector_search_configuration,
221 replica_count: self.replica_count,
222 deletion_protection: self.deletion_protection,
223 provisioned_memory: self.provisioned_memory,
224 })
225 }
226}