aws-sdk-groundstation 0.27.0

AWS SDK for AWS Ground Station
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p></p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListContactsOutput {
    /// <p>Next token returned in the response of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p>List of contacts.</p>
    #[doc(hidden)]
    pub contact_list: std::option::Option<std::vec::Vec<crate::types::ContactData>>,
    _request_id: Option<String>,
}
impl ListContactsOutput {
    /// <p>Next token returned in the response of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>List of contacts.</p>
    pub fn contact_list(&self) -> std::option::Option<&[crate::types::ContactData]> {
        self.contact_list.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListContactsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListContactsOutput {
    /// Creates a new builder-style object to manufacture [`ListContactsOutput`](crate::operation::list_contacts::ListContactsOutput).
    pub fn builder() -> crate::operation::list_contacts::builders::ListContactsOutputBuilder {
        crate::operation::list_contacts::builders::ListContactsOutputBuilder::default()
    }
}

/// A builder for [`ListContactsOutput`](crate::operation::list_contacts::ListContactsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListContactsOutputBuilder {
    pub(crate) next_token: std::option::Option<std::string::String>,
    pub(crate) contact_list: std::option::Option<std::vec::Vec<crate::types::ContactData>>,
    _request_id: Option<String>,
}
impl ListContactsOutputBuilder {
    /// <p>Next token returned in the response of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p>Next token returned in the response of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Appends an item to `contact_list`.
    ///
    /// To override the contents of this collection use [`set_contact_list`](Self::set_contact_list).
    ///
    /// <p>List of contacts.</p>
    pub fn contact_list(mut self, input: crate::types::ContactData) -> Self {
        let mut v = self.contact_list.unwrap_or_default();
        v.push(input);
        self.contact_list = Some(v);
        self
    }
    /// <p>List of contacts.</p>
    pub fn set_contact_list(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ContactData>>,
    ) -> Self {
        self.contact_list = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListContactsOutput`](crate::operation::list_contacts::ListContactsOutput).
    pub fn build(self) -> crate::operation::list_contacts::ListContactsOutput {
        crate::operation::list_contacts::ListContactsOutput {
            next_token: self.next_token,
            contact_list: self.contact_list,
            _request_id: self._request_id,
        }
    }
}