aws_sdk_transfer/operation/describe_agreement/
_describe_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 DescribeAgreementInput {
6    /// <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
7    pub agreement_id: ::std::option::Option<::std::string::String>,
8    /// <p>The server identifier that's associated with the agreement.</p>
9    pub server_id: ::std::option::Option<::std::string::String>,
10}
11impl DescribeAgreementInput {
12    /// <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
13    pub fn agreement_id(&self) -> ::std::option::Option<&str> {
14        self.agreement_id.as_deref()
15    }
16    /// <p>The server identifier that's associated with the agreement.</p>
17    pub fn server_id(&self) -> ::std::option::Option<&str> {
18        self.server_id.as_deref()
19    }
20}
21impl DescribeAgreementInput {
22    /// Creates a new builder-style object to manufacture [`DescribeAgreementInput`](crate::operation::describe_agreement::DescribeAgreementInput).
23    pub fn builder() -> crate::operation::describe_agreement::builders::DescribeAgreementInputBuilder {
24        crate::operation::describe_agreement::builders::DescribeAgreementInputBuilder::default()
25    }
26}
27
28/// A builder for [`DescribeAgreementInput`](crate::operation::describe_agreement::DescribeAgreementInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeAgreementInputBuilder {
32    pub(crate) agreement_id: ::std::option::Option<::std::string::String>,
33    pub(crate) server_id: ::std::option::Option<::std::string::String>,
34}
35impl DescribeAgreementInputBuilder {
36    /// <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
37    /// This field is required.
38    pub fn agreement_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.agreement_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
43    pub fn set_agreement_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.agreement_id = input;
45        self
46    }
47    /// <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
48    pub fn get_agreement_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.agreement_id
50    }
51    /// <p>The server identifier that's associated with the agreement.</p>
52    /// This field is required.
53    pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.server_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The server identifier that's associated with the agreement.</p>
58    pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.server_id = input;
60        self
61    }
62    /// <p>The server identifier that's associated with the agreement.</p>
63    pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.server_id
65    }
66    /// Consumes the builder and constructs a [`DescribeAgreementInput`](crate::operation::describe_agreement::DescribeAgreementInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::describe_agreement::DescribeAgreementInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::describe_agreement::DescribeAgreementInput {
71            agreement_id: self.agreement_id,
72            server_id: self.server_id,
73        })
74    }
75}