aws_sdk_datazone/operation/get_asset/
_get_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 GetAssetInput {
6    /// <p>The ID of the Amazon DataZone domain to which the asset belongs.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the Amazon DataZone asset.</p>
9    /// <p>This parameter supports either the value of <code>assetId</code> or <code>externalIdentifier</code> as input. If you are passing the value of <code>externalIdentifier</code>, you must prefix this value with <code>externalIdentifer%2F</code>.</p>
10    pub identifier: ::std::option::Option<::std::string::String>,
11    /// <p>The revision of the Amazon DataZone asset.</p>
12    pub revision: ::std::option::Option<::std::string::String>,
13}
14impl GetAssetInput {
15    /// <p>The ID of the Amazon DataZone domain to which the asset belongs.</p>
16    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
17        self.domain_identifier.as_deref()
18    }
19    /// <p>The ID of the Amazon DataZone asset.</p>
20    /// <p>This parameter supports either the value of <code>assetId</code> or <code>externalIdentifier</code> as input. If you are passing the value of <code>externalIdentifier</code>, you must prefix this value with <code>externalIdentifer%2F</code>.</p>
21    pub fn identifier(&self) -> ::std::option::Option<&str> {
22        self.identifier.as_deref()
23    }
24    /// <p>The revision of the Amazon DataZone asset.</p>
25    pub fn revision(&self) -> ::std::option::Option<&str> {
26        self.revision.as_deref()
27    }
28}
29impl GetAssetInput {
30    /// Creates a new builder-style object to manufacture [`GetAssetInput`](crate::operation::get_asset::GetAssetInput).
31    pub fn builder() -> crate::operation::get_asset::builders::GetAssetInputBuilder {
32        crate::operation::get_asset::builders::GetAssetInputBuilder::default()
33    }
34}
35
36/// A builder for [`GetAssetInput`](crate::operation::get_asset::GetAssetInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct GetAssetInputBuilder {
40    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
41    pub(crate) identifier: ::std::option::Option<::std::string::String>,
42    pub(crate) revision: ::std::option::Option<::std::string::String>,
43}
44impl GetAssetInputBuilder {
45    /// <p>The ID of the Amazon DataZone domain to which the asset belongs.</p>
46    /// This field is required.
47    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.domain_identifier = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ID of the Amazon DataZone domain to which the asset belongs.</p>
52    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.domain_identifier = input;
54        self
55    }
56    /// <p>The ID of the Amazon DataZone domain to which the asset belongs.</p>
57    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
58        &self.domain_identifier
59    }
60    /// <p>The ID of the Amazon DataZone asset.</p>
61    /// <p>This parameter supports either the value of <code>assetId</code> or <code>externalIdentifier</code> as input. If you are passing the value of <code>externalIdentifier</code>, you must prefix this value with <code>externalIdentifer%2F</code>.</p>
62    /// This field is required.
63    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64        self.identifier = ::std::option::Option::Some(input.into());
65        self
66    }
67    /// <p>The ID of the Amazon DataZone asset.</p>
68    /// <p>This parameter supports either the value of <code>assetId</code> or <code>externalIdentifier</code> as input. If you are passing the value of <code>externalIdentifier</code>, you must prefix this value with <code>externalIdentifer%2F</code>.</p>
69    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.identifier = input;
71        self
72    }
73    /// <p>The ID of the Amazon DataZone asset.</p>
74    /// <p>This parameter supports either the value of <code>assetId</code> or <code>externalIdentifier</code> as input. If you are passing the value of <code>externalIdentifier</code>, you must prefix this value with <code>externalIdentifer%2F</code>.</p>
75    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
76        &self.identifier
77    }
78    /// <p>The revision of the Amazon DataZone asset.</p>
79    pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.revision = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The revision of the Amazon DataZone asset.</p>
84    pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.revision = input;
86        self
87    }
88    /// <p>The revision of the Amazon DataZone asset.</p>
89    pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
90        &self.revision
91    }
92    /// Consumes the builder and constructs a [`GetAssetInput`](crate::operation::get_asset::GetAssetInput).
93    pub fn build(self) -> ::std::result::Result<crate::operation::get_asset::GetAssetInput, ::aws_smithy_types::error::operation::BuildError> {
94        ::std::result::Result::Ok(crate::operation::get_asset::GetAssetInput {
95            domain_identifier: self.domain_identifier,
96            identifier: self.identifier,
97            revision: self.revision,
98        })
99    }
100}