aws_sdk_glue/operation/create_blueprint/
_create_blueprint_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 CreateBlueprintInput {
6    /// <p>The name of the blueprint.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>A description of the blueprint.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies a path in Amazon S3 where the blueprint is published.</p>
11    pub blueprint_location: ::std::option::Option<::std::string::String>,
12    /// <p>The tags to be applied to this blueprint.</p>
13    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14}
15impl CreateBlueprintInput {
16    /// <p>The name of the blueprint.</p>
17    pub fn name(&self) -> ::std::option::Option<&str> {
18        self.name.as_deref()
19    }
20    /// <p>A description of the blueprint.</p>
21    pub fn description(&self) -> ::std::option::Option<&str> {
22        self.description.as_deref()
23    }
24    /// <p>Specifies a path in Amazon S3 where the blueprint is published.</p>
25    pub fn blueprint_location(&self) -> ::std::option::Option<&str> {
26        self.blueprint_location.as_deref()
27    }
28    /// <p>The tags to be applied to this blueprint.</p>
29    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    /// Creates a new builder-style object to manufacture [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
35    pub fn builder() -> crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder {
36        crate::operation::create_blueprint::builders::CreateBlueprintInputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
41#[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    /// <p>The name of the blueprint.</p>
51    /// This field is required.
52    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    /// <p>The name of the blueprint.</p>
57    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.name = input;
59        self
60    }
61    /// <p>The name of the blueprint.</p>
62    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.name
64    }
65    /// <p>A description of the blueprint.</p>
66    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    /// <p>A description of the blueprint.</p>
71    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.description = input;
73        self
74    }
75    /// <p>A description of the blueprint.</p>
76    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
77        &self.description
78    }
79    /// <p>Specifies a path in Amazon S3 where the blueprint is published.</p>
80    /// This field is required.
81    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    /// <p>Specifies a path in Amazon S3 where the blueprint is published.</p>
86    pub fn set_blueprint_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.blueprint_location = input;
88        self
89    }
90    /// <p>Specifies a path in Amazon S3 where the blueprint is published.</p>
91    pub fn get_blueprint_location(&self) -> &::std::option::Option<::std::string::String> {
92        &self.blueprint_location
93    }
94    /// Adds a key-value pair to `tags`.
95    ///
96    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
97    ///
98    /// <p>The tags to be applied to this blueprint.</p>
99    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    /// <p>The tags to be applied to this blueprint.</p>
106    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    /// <p>The tags to be applied to this blueprint.</p>
111    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
112        &self.tags
113    }
114    /// Consumes the builder and constructs a [`CreateBlueprintInput`](crate::operation::create_blueprint::CreateBlueprintInput).
115    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}