aws_sdk_schemas/operation/create_registry/
_create_registry_output.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 CreateRegistryOutput {
6    /// <p>The description of the registry.</p>
7    pub description: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the registry.</p>
9    pub registry_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the registry.</p>
11    pub registry_name: ::std::option::Option<::std::string::String>,
12    /// <p>Tags associated with the registry.</p>
13    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14    _request_id: Option<String>,
15}
16impl CreateRegistryOutput {
17    /// <p>The description of the registry.</p>
18    pub fn description(&self) -> ::std::option::Option<&str> {
19        self.description.as_deref()
20    }
21    /// <p>The ARN of the registry.</p>
22    pub fn registry_arn(&self) -> ::std::option::Option<&str> {
23        self.registry_arn.as_deref()
24    }
25    /// <p>The name of the registry.</p>
26    pub fn registry_name(&self) -> ::std::option::Option<&str> {
27        self.registry_name.as_deref()
28    }
29    /// <p>Tags associated with the registry.</p>
30    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
31        self.tags.as_ref()
32    }
33}
34impl ::aws_types::request_id::RequestId for CreateRegistryOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl CreateRegistryOutput {
40    /// Creates a new builder-style object to manufacture [`CreateRegistryOutput`](crate::operation::create_registry::CreateRegistryOutput).
41    pub fn builder() -> crate::operation::create_registry::builders::CreateRegistryOutputBuilder {
42        crate::operation::create_registry::builders::CreateRegistryOutputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateRegistryOutput`](crate::operation::create_registry::CreateRegistryOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateRegistryOutputBuilder {
50    pub(crate) description: ::std::option::Option<::std::string::String>,
51    pub(crate) registry_arn: ::std::option::Option<::std::string::String>,
52    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
53    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
54    _request_id: Option<String>,
55}
56impl CreateRegistryOutputBuilder {
57    /// <p>The description of the registry.</p>
58    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.description = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The description of the registry.</p>
63    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.description = input;
65        self
66    }
67    /// <p>The description of the registry.</p>
68    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
69        &self.description
70    }
71    /// <p>The ARN of the registry.</p>
72    pub fn registry_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.registry_arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The ARN of the registry.</p>
77    pub fn set_registry_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.registry_arn = input;
79        self
80    }
81    /// <p>The ARN of the registry.</p>
82    pub fn get_registry_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.registry_arn
84    }
85    /// <p>The name of the registry.</p>
86    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.registry_name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the registry.</p>
91    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.registry_name = input;
93        self
94    }
95    /// <p>The name of the registry.</p>
96    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.registry_name
98    }
99    /// Adds a key-value pair to `tags`.
100    ///
101    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
102    ///
103    /// <p>Tags associated with the registry.</p>
104    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
105        let mut hash_map = self.tags.unwrap_or_default();
106        hash_map.insert(k.into(), v.into());
107        self.tags = ::std::option::Option::Some(hash_map);
108        self
109    }
110    /// <p>Tags associated with the registry.</p>
111    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
112        self.tags = input;
113        self
114    }
115    /// <p>Tags associated with the registry.</p>
116    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
117        &self.tags
118    }
119    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
120        self._request_id = Some(request_id.into());
121        self
122    }
123
124    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
125        self._request_id = request_id;
126        self
127    }
128    /// Consumes the builder and constructs a [`CreateRegistryOutput`](crate::operation::create_registry::CreateRegistryOutput).
129    pub fn build(self) -> crate::operation::create_registry::CreateRegistryOutput {
130        crate::operation::create_registry::CreateRegistryOutput {
131            description: self.description,
132            registry_arn: self.registry_arn,
133            registry_name: self.registry_name,
134            tags: self.tags,
135            _request_id: self._request_id,
136        }
137    }
138}