aws_sdk_glue/operation/update_registry/
_update_registry_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 UpdateRegistryInput {
6    /// <p>This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).</p>
7    pub registry_id: ::std::option::Option<crate::types::RegistryId>,
8    /// <p>A description of the registry. If description is not provided, this field will not be updated.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10}
11impl UpdateRegistryInput {
12    /// <p>This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).</p>
13    pub fn registry_id(&self) -> ::std::option::Option<&crate::types::RegistryId> {
14        self.registry_id.as_ref()
15    }
16    /// <p>A description of the registry. If description is not provided, this field will not be updated.</p>
17    pub fn description(&self) -> ::std::option::Option<&str> {
18        self.description.as_deref()
19    }
20}
21impl UpdateRegistryInput {
22    /// Creates a new builder-style object to manufacture [`UpdateRegistryInput`](crate::operation::update_registry::UpdateRegistryInput).
23    pub fn builder() -> crate::operation::update_registry::builders::UpdateRegistryInputBuilder {
24        crate::operation::update_registry::builders::UpdateRegistryInputBuilder::default()
25    }
26}
27
28/// A builder for [`UpdateRegistryInput`](crate::operation::update_registry::UpdateRegistryInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateRegistryInputBuilder {
32    pub(crate) registry_id: ::std::option::Option<crate::types::RegistryId>,
33    pub(crate) description: ::std::option::Option<::std::string::String>,
34}
35impl UpdateRegistryInputBuilder {
36    /// <p>This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).</p>
37    /// This field is required.
38    pub fn registry_id(mut self, input: crate::types::RegistryId) -> Self {
39        self.registry_id = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).</p>
43    pub fn set_registry_id(mut self, input: ::std::option::Option<crate::types::RegistryId>) -> Self {
44        self.registry_id = input;
45        self
46    }
47    /// <p>This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).</p>
48    pub fn get_registry_id(&self) -> &::std::option::Option<crate::types::RegistryId> {
49        &self.registry_id
50    }
51    /// <p>A description of the registry. If description is not provided, this field will not be updated.</p>
52    /// This field is required.
53    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.description = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>A description of the registry. If description is not provided, this field will not be updated.</p>
58    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.description = input;
60        self
61    }
62    /// <p>A description of the registry. If description is not provided, this field will not be updated.</p>
63    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
64        &self.description
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            registry_id: self.registry_id,
72            description: self.description,
73        })
74    }
75}