aws-sdk-translate 0.27.0

AWS SDK for Amazon Translate
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTerminologiesOutput {
    /// <p>The properties list of the custom terminologies returned on the list request.</p>
    #[doc(hidden)]
    pub terminology_properties_list:
        std::option::Option<std::vec::Vec<crate::types::TerminologyProperties>>,
    /// <p> If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListTerminologiesOutput {
    /// <p>The properties list of the custom terminologies returned on the list request.</p>
    pub fn terminology_properties_list(
        &self,
    ) -> std::option::Option<&[crate::types::TerminologyProperties]> {
        self.terminology_properties_list.as_deref()
    }
    /// <p> If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListTerminologiesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListTerminologiesOutput {
    /// Creates a new builder-style object to manufacture [`ListTerminologiesOutput`](crate::operation::list_terminologies::ListTerminologiesOutput).
    pub fn builder(
    ) -> crate::operation::list_terminologies::builders::ListTerminologiesOutputBuilder {
        crate::operation::list_terminologies::builders::ListTerminologiesOutputBuilder::default()
    }
}

/// A builder for [`ListTerminologiesOutput`](crate::operation::list_terminologies::ListTerminologiesOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListTerminologiesOutputBuilder {
    pub(crate) terminology_properties_list:
        std::option::Option<std::vec::Vec<crate::types::TerminologyProperties>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListTerminologiesOutputBuilder {
    /// Appends an item to `terminology_properties_list`.
    ///
    /// To override the contents of this collection use [`set_terminology_properties_list`](Self::set_terminology_properties_list).
    ///
    /// <p>The properties list of the custom terminologies returned on the list request.</p>
    pub fn terminology_properties_list(
        mut self,
        input: crate::types::TerminologyProperties,
    ) -> Self {
        let mut v = self.terminology_properties_list.unwrap_or_default();
        v.push(input);
        self.terminology_properties_list = Some(v);
        self
    }
    /// <p>The properties list of the custom terminologies returned on the list request.</p>
    pub fn set_terminology_properties_list(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::TerminologyProperties>>,
    ) -> Self {
        self.terminology_properties_list = input;
        self
    }
    /// <p> If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p> If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.</p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = 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 [`ListTerminologiesOutput`](crate::operation::list_terminologies::ListTerminologiesOutput).
    pub fn build(self) -> crate::operation::list_terminologies::ListTerminologiesOutput {
        crate::operation::list_terminologies::ListTerminologiesOutput {
            terminology_properties_list: self.terminology_properties_list,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}