aws_sdk_schemas/operation/update_registry/
_update_registry_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Updates the registry.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateRegistryInput {
7    /// <p>The description of the registry to update.</p>
8    pub description: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the registry.</p>
10    pub registry_name: ::std::option::Option<::std::string::String>,
11}
12impl UpdateRegistryInput {
13    /// <p>The description of the registry to update.</p>
14    pub fn description(&self) -> ::std::option::Option<&str> {
15        self.description.as_deref()
16    }
17    /// <p>The name of the registry.</p>
18    pub fn registry_name(&self) -> ::std::option::Option<&str> {
19        self.registry_name.as_deref()
20    }
21}
22impl UpdateRegistryInput {
23    /// Creates a new builder-style object to manufacture [`UpdateRegistryInput`](crate::operation::update_registry::UpdateRegistryInput).
24    pub fn builder() -> crate::operation::update_registry::builders::UpdateRegistryInputBuilder {
25        crate::operation::update_registry::builders::UpdateRegistryInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateRegistryInput`](crate::operation::update_registry::UpdateRegistryInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateRegistryInputBuilder {
33    pub(crate) description: ::std::option::Option<::std::string::String>,
34    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
35}
36impl UpdateRegistryInputBuilder {
37    /// <p>The description of the registry to update.</p>
38    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.description = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The description of the registry to update.</p>
43    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.description = input;
45        self
46    }
47    /// <p>The description of the registry to update.</p>
48    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
49        &self.description
50    }
51    /// <p>The name of the registry.</p>
52    /// This field is required.
53    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.registry_name = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The name of the registry.</p>
58    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.registry_name = input;
60        self
61    }
62    /// <p>The name of the registry.</p>
63    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.registry_name
65    }
66    /// Consumes the builder and constructs a [`UpdateRegistryInput`](crate::operation::update_registry::UpdateRegistryInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::update_registry::UpdateRegistryInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::update_registry::UpdateRegistryInput {
71            description: self.description,
72            registry_name: self.registry_name,
73        })
74    }
75}