aws_sdk_bedrockdataautomation/operation/create_blueprint/
_create_blueprint_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Create Blueprint Request
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct CreateBlueprintInput {
7    /// Name of the Blueprint
8    pub blueprint_name: ::std::option::Option<::std::string::String>,
9    /// Type
10    pub r#type: ::std::option::Option<crate::types::Type>,
11    /// Stage of the Blueprint
12    pub blueprint_stage: ::std::option::Option<crate::types::BlueprintStage>,
13    /// Schema of the blueprint
14    pub schema: ::std::option::Option<::std::string::String>,
15    /// Client specified token used for idempotency checks
16    pub client_token: ::std::option::Option<::std::string::String>,
17    /// KMS Encryption Configuration
18    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
19    /// List of tags
20    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
21}
22impl CreateBlueprintInput {
23    /// Name of the Blueprint
24    pub fn blueprint_name(&self) -> ::std::option::Option<&str> {
25        self.blueprint_name.as_deref()
26    }
27    /// Type
28    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
29        self.r#type.as_ref()
30    }
31    /// Stage of the Blueprint
32    pub fn blueprint_stage(&self) -> ::std::option::Option<&crate::types::BlueprintStage> {
33        self.blueprint_stage.as_ref()
34    }
35    /// Schema of the blueprint
36    pub fn schema(&self) -> ::std::option::Option<&str> {
37        self.schema.as_deref()
38    }
39    /// Client specified token used for idempotency checks
40    pub fn client_token(&self) -> ::std::option::Option<&str> {
41        self.client_token.as_deref()
42    }
43    /// KMS Encryption Configuration
44    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
45        self.encryption_configuration.as_ref()
46    }
47    /// List of tags
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
50    pub fn tags(&self) -> &[crate::types::Tag] {
51        self.tags.as_deref().unwrap_or_default()
52    }
53}
54impl ::std::fmt::Debug for CreateBlueprintInput {
55    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
56        let mut formatter = f.debug_struct("CreateBlueprintInput");
57        formatter.field("blueprint_name", &"*** Sensitive Data Redacted ***");
58        formatter.field("r#type", &self.r#type);
59        formatter.field("blueprint_stage", &self.blueprint_stage);
60        formatter.field("schema", &"*** Sensitive Data Redacted ***");
61        formatter.field("client_token", &self.client_token);
62        formatter.field("encryption_configuration", &self.encryption_configuration);
63        formatter.field("tags", &self.tags);
64        formatter.finish()
65    }
66}
67impl CreateBlueprintInput {
68    /// Creates a new builder-style object to manufacture [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
69    pub fn builder() -> crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder {
70        crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder::default()
71    }
72}
73
74/// A builder for [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
75#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
76#[non_exhaustive]
77pub struct CreateBlueprintInputBuilder {
78    pub(crate) blueprint_name: ::std::option::Option<::std::string::String>,
79    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
80    pub(crate) blueprint_stage: ::std::option::Option<crate::types::BlueprintStage>,
81    pub(crate) schema: ::std::option::Option<::std::string::String>,
82    pub(crate) client_token: ::std::option::Option<::std::string::String>,
83    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
84    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
85}
86impl CreateBlueprintInputBuilder {
87    /// Name of the Blueprint
88    /// This field is required.
89    pub fn blueprint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.blueprint_name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// Name of the Blueprint
94    pub fn set_blueprint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.blueprint_name = input;
96        self
97    }
98    /// Name of the Blueprint
99    pub fn get_blueprint_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.blueprint_name
101    }
102    /// Type
103    /// This field is required.
104    pub fn r#type(mut self, input: crate::types::Type) -> Self {
105        self.r#type = ::std::option::Option::Some(input);
106        self
107    }
108    /// Type
109    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
110        self.r#type = input;
111        self
112    }
113    /// Type
114    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
115        &self.r#type
116    }
117    /// Stage of the Blueprint
118    pub fn blueprint_stage(mut self, input: crate::types::BlueprintStage) -> Self {
119        self.blueprint_stage = ::std::option::Option::Some(input);
120        self
121    }
122    /// Stage of the Blueprint
123    pub fn set_blueprint_stage(mut self, input: ::std::option::Option<crate::types::BlueprintStage>) -> Self {
124        self.blueprint_stage = input;
125        self
126    }
127    /// Stage of the Blueprint
128    pub fn get_blueprint_stage(&self) -> &::std::option::Option<crate::types::BlueprintStage> {
129        &self.blueprint_stage
130    }
131    /// Schema of the blueprint
132    /// This field is required.
133    pub fn schema(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.schema = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// Schema of the blueprint
138    pub fn set_schema(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.schema = input;
140        self
141    }
142    /// Schema of the blueprint
143    pub fn get_schema(&self) -> &::std::option::Option<::std::string::String> {
144        &self.schema
145    }
146    /// Client specified token used for idempotency checks
147    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.client_token = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// Client specified token used for idempotency checks
152    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.client_token = input;
154        self
155    }
156    /// Client specified token used for idempotency checks
157    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
158        &self.client_token
159    }
160    /// KMS Encryption Configuration
161    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
162        self.encryption_configuration = ::std::option::Option::Some(input);
163        self
164    }
165    /// KMS Encryption Configuration
166    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
167        self.encryption_configuration = input;
168        self
169    }
170    /// KMS Encryption Configuration
171    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
172        &self.encryption_configuration
173    }
174    /// Appends an item to `tags`.
175    ///
176    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
177    ///
178    /// List of tags
179    pub fn tags(mut self, input: crate::types::Tag) -> Self {
180        let mut v = self.tags.unwrap_or_default();
181        v.push(input);
182        self.tags = ::std::option::Option::Some(v);
183        self
184    }
185    /// List of tags
186    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
187        self.tags = input;
188        self
189    }
190    /// List of tags
191    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
192        &self.tags
193    }
194    /// Consumes the builder and constructs a [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
195    pub fn build(
196        self,
197    ) -> ::std::result::Result<crate::operation::create_blueprint::CreateBlueprintInput, ::aws_smithy_types::error::operation::BuildError> {
198        ::std::result::Result::Ok(crate::operation::create_blueprint::CreateBlueprintInput {
199            blueprint_name: self.blueprint_name,
200            r#type: self.r#type,
201            blueprint_stage: self.blueprint_stage,
202            schema: self.schema,
203            client_token: self.client_token,
204            encryption_configuration: self.encryption_configuration,
205            tags: self.tags,
206        })
207    }
208}
209impl ::std::fmt::Debug for CreateBlueprintInputBuilder {
210    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
211        let mut formatter = f.debug_struct("CreateBlueprintInputBuilder");
212        formatter.field("blueprint_name", &"*** Sensitive Data Redacted ***");
213        formatter.field("r#type", &self.r#type);
214        formatter.field("blueprint_stage", &self.blueprint_stage);
215        formatter.field("schema", &"*** Sensitive Data Redacted ***");
216        formatter.field("client_token", &self.client_token);
217        formatter.field("encryption_configuration", &self.encryption_configuration);
218        formatter.field("tags", &self.tags);
219        formatter.finish()
220    }
221}