aws_sdk_glue/operation/create_blueprint/
_create_blueprint_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateBlueprintInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub blueprint_location: ::std::option::Option<::std::string::String>,
12 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14}
15impl CreateBlueprintInput {
16 pub fn name(&self) -> ::std::option::Option<&str> {
18 self.name.as_deref()
19 }
20 pub fn description(&self) -> ::std::option::Option<&str> {
22 self.description.as_deref()
23 }
24 pub fn blueprint_location(&self) -> ::std::option::Option<&str> {
26 self.blueprint_location.as_deref()
27 }
28 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
30 self.tags.as_ref()
31 }
32}
33impl CreateBlueprintInput {
34 pub fn builder() -> crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder {
36 crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateBlueprintInputBuilder {
44 pub(crate) name: ::std::option::Option<::std::string::String>,
45 pub(crate) description: ::std::option::Option<::std::string::String>,
46 pub(crate) blueprint_location: ::std::option::Option<::std::string::String>,
47 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
48}
49impl CreateBlueprintInputBuilder {
50 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.name = input;
59 self
60 }
61 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.name
64 }
65 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.description = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.description = input;
73 self
74 }
75 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
77 &self.description
78 }
79 pub fn blueprint_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.blueprint_location = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_blueprint_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.blueprint_location = input;
88 self
89 }
90 pub fn get_blueprint_location(&self) -> &::std::option::Option<::std::string::String> {
92 &self.blueprint_location
93 }
94 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
100 let mut hash_map = self.tags.unwrap_or_default();
101 hash_map.insert(k.into(), v.into());
102 self.tags = ::std::option::Option::Some(hash_map);
103 self
104 }
105 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
107 self.tags = input;
108 self
109 }
110 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
112 &self.tags
113 }
114 pub fn build(
116 self,
117 ) -> ::std::result::Result<crate::operation::create_blueprint::CreateBlueprintInput, ::aws_smithy_types::error::operation::BuildError> {
118 ::std::result::Result::Ok(crate::operation::create_blueprint::CreateBlueprintInput {
119 name: self.name,
120 description: self.description,
121 blueprint_location: self.blueprint_location,
122 tags: self.tags,
123 })
124 }
125}