aws_sdk_paymentcryptography/operation/get_alias/
_get_alias_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 GetAliasInput {
6    /// <p>The alias of the Amazon Web Services Payment Cryptography key.</p>
7    pub alias_name: ::std::option::Option<::std::string::String>,
8}
9impl GetAliasInput {
10    /// <p>The alias of the Amazon Web Services Payment Cryptography key.</p>
11    pub fn alias_name(&self) -> ::std::option::Option<&str> {
12        self.alias_name.as_deref()
13    }
14}
15impl GetAliasInput {
16    /// Creates a new builder-style object to manufacture [`GetAliasInput`](crate::operation::get_alias::GetAliasInput).
17    pub fn builder() -> crate::operation::get_alias::builders::GetAliasInputBuilder {
18        crate::operation::get_alias::builders::GetAliasInputBuilder::default()
19    }
20}
21
22/// A builder for [`GetAliasInput`](crate::operation::get_alias::GetAliasInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct GetAliasInputBuilder {
26    pub(crate) alias_name: ::std::option::Option<::std::string::String>,
27}
28impl GetAliasInputBuilder {
29    /// <p>The alias of the Amazon Web Services Payment Cryptography key.</p>
30    /// This field is required.
31    pub fn alias_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.alias_name = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The alias of the Amazon Web Services Payment Cryptography key.</p>
36    pub fn set_alias_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.alias_name = input;
38        self
39    }
40    /// <p>The alias of the Amazon Web Services Payment Cryptography key.</p>
41    pub fn get_alias_name(&self) -> &::std::option::Option<::std::string::String> {
42        &self.alias_name
43    }
44    /// Consumes the builder and constructs a [`GetAliasInput`](crate::operation::get_alias::GetAliasInput).
45    pub fn build(self) -> ::std::result::Result<crate::operation::get_alias::GetAliasInput, ::aws_smithy_types::error::operation::BuildError> {
46        ::std::result::Result::Ok(crate::operation::get_alias::GetAliasInput { alias_name: self.alias_name })
47    }
48}