Skip to main content

aws_sdk_glue/operation/update_asset/
_update_asset_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 UpdateAssetInput {
6    /// <p>The unique identifier of the asset to update.</p>
7    pub identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The new name of the asset.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The new description of the asset.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
13    pub client_token: ::std::option::Option<::std::string::String>,
14}
15impl UpdateAssetInput {
16    /// <p>The unique identifier of the asset to update.</p>
17    pub fn identifier(&self) -> ::std::option::Option<&str> {
18        self.identifier.as_deref()
19    }
20    /// <p>The new name of the asset.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>The new description of the asset.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
29    pub fn client_token(&self) -> ::std::option::Option<&str> {
30        self.client_token.as_deref()
31    }
32}
33impl UpdateAssetInput {
34    /// Creates a new builder-style object to manufacture [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
35    pub fn builder() -> crate::operation::update_asset::builders::UpdateAssetInputBuilder {
36        crate::operation::update_asset::builders::UpdateAssetInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateAssetInputBuilder {
44    pub(crate) identifier: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) description: ::std::option::Option<::std::string::String>,
47    pub(crate) client_token: ::std::option::Option<::std::string::String>,
48}
49impl UpdateAssetInputBuilder {
50    /// <p>The unique identifier of the asset to update.</p>
51    /// This field is required.
52    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.identifier = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique identifier of the asset to update.</p>
57    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.identifier = input;
59        self
60    }
61    /// <p>The unique identifier of the asset to update.</p>
62    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
63        &self.identifier
64    }
65    /// <p>The new name of the asset.</p>
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The new name of the asset.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>The new name of the asset.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The new description of the asset.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The new description of the asset.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>The new description of the asset.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
94    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.client_token = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
99    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.client_token = input;
101        self
102    }
103    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
104    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
105        &self.client_token
106    }
107    /// Consumes the builder and constructs a [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
108    pub fn build(self) -> ::std::result::Result<crate::operation::update_asset::UpdateAssetInput, ::aws_smithy_types::error::operation::BuildError> {
109        ::std::result::Result::Ok(crate::operation::update_asset::UpdateAssetInput {
110            identifier: self.identifier,
111            name: self.name,
112            description: self.description,
113            client_token: self.client_token,
114        })
115    }
116}