aws_sdk_directconnect/operation/confirm_customer_agreement/
_confirm_customer_agreement_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 ConfirmCustomerAgreementInput {
6    /// <p>The name of the customer agreement.</p>
7    pub agreement_name: ::std::option::Option<::std::string::String>,
8}
9impl ConfirmCustomerAgreementInput {
10    /// <p>The name of the customer agreement.</p>
11    pub fn agreement_name(&self) -> ::std::option::Option<&str> {
12        self.agreement_name.as_deref()
13    }
14}
15impl ConfirmCustomerAgreementInput {
16    /// Creates a new builder-style object to manufacture [`ConfirmCustomerAgreementInput`](crate::operation::confirm_customer_agreement::ConfirmCustomerAgreementInput).
17    pub fn builder() -> crate::operation::confirm_customer_agreement::builders::ConfirmCustomerAgreementInputBuilder {
18        crate::operation::confirm_customer_agreement::builders::ConfirmCustomerAgreementInputBuilder::default()
19    }
20}
21
22/// A builder for [`ConfirmCustomerAgreementInput`](crate::operation::confirm_customer_agreement::ConfirmCustomerAgreementInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct ConfirmCustomerAgreementInputBuilder {
26    pub(crate) agreement_name: ::std::option::Option<::std::string::String>,
27}
28impl ConfirmCustomerAgreementInputBuilder {
29    /// <p>The name of the customer agreement.</p>
30    pub fn agreement_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
31        self.agreement_name = ::std::option::Option::Some(input.into());
32        self
33    }
34    /// <p>The name of the customer agreement.</p>
35    pub fn set_agreement_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
36        self.agreement_name = input;
37        self
38    }
39    /// <p>The name of the customer agreement.</p>
40    pub fn get_agreement_name(&self) -> &::std::option::Option<::std::string::String> {
41        &self.agreement_name
42    }
43    /// Consumes the builder and constructs a [`ConfirmCustomerAgreementInput`](crate::operation::confirm_customer_agreement::ConfirmCustomerAgreementInput).
44    pub fn build(
45        self,
46    ) -> ::std::result::Result<
47        crate::operation::confirm_customer_agreement::ConfirmCustomerAgreementInput,
48        ::aws_smithy_types::error::operation::BuildError,
49    > {
50        ::std::result::Result::Ok(crate::operation::confirm_customer_agreement::ConfirmCustomerAgreementInput {
51            agreement_name: self.agreement_name,
52        })
53    }
54}