aws-sdk-connect 1.166.0

AWS SDK for Amazon Connect Service
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 SearchRoutingProfilesOutput {
    /// <p>Information about the routing profiles.</p>
    pub routing_profiles: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfile>>,
    /// <p>If there are additional results, this is the token for the next set of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The total number of routing profiles which matched your search query.</p>
    pub approximate_total_count: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl SearchRoutingProfilesOutput {
    /// <p>Information about the routing profiles.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.routing_profiles.is_none()`.
    pub fn routing_profiles(&self) -> &[crate::types::RoutingProfile] {
        self.routing_profiles.as_deref().unwrap_or_default()
    }
    /// <p>If there are additional results, this is the token for the next set of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The total number of routing profiles which matched your search query.</p>
    pub fn approximate_total_count(&self) -> ::std::option::Option<i64> {
        self.approximate_total_count
    }
}
impl ::aws_types::request_id::RequestId for SearchRoutingProfilesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl SearchRoutingProfilesOutput {
    /// Creates a new builder-style object to manufacture [`SearchRoutingProfilesOutput`](crate::operation::search_routing_profiles::SearchRoutingProfilesOutput).
    pub fn builder() -> crate::operation::search_routing_profiles::builders::SearchRoutingProfilesOutputBuilder {
        crate::operation::search_routing_profiles::builders::SearchRoutingProfilesOutputBuilder::default()
    }
}

/// A builder for [`SearchRoutingProfilesOutput`](crate::operation::search_routing_profiles::SearchRoutingProfilesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchRoutingProfilesOutputBuilder {
    pub(crate) routing_profiles: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfile>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) approximate_total_count: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl SearchRoutingProfilesOutputBuilder {
    /// Appends an item to `routing_profiles`.
    ///
    /// To override the contents of this collection use [`set_routing_profiles`](Self::set_routing_profiles).
    ///
    /// <p>Information about the routing profiles.</p>
    pub fn routing_profiles(mut self, input: crate::types::RoutingProfile) -> Self {
        let mut v = self.routing_profiles.unwrap_or_default();
        v.push(input);
        self.routing_profiles = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the routing profiles.</p>
    pub fn set_routing_profiles(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfile>>) -> Self {
        self.routing_profiles = input;
        self
    }
    /// <p>Information about the routing profiles.</p>
    pub fn get_routing_profiles(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RoutingProfile>> {
        &self.routing_profiles
    }
    /// <p>If there are additional results, this is the token for the next set of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If there are additional results, this is the token for the next set of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If there are additional results, this is the token for the next set of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The total number of routing profiles which matched your search query.</p>
    pub fn approximate_total_count(mut self, input: i64) -> Self {
        self.approximate_total_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of routing profiles which matched your search query.</p>
    pub fn set_approximate_total_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.approximate_total_count = input;
        self
    }
    /// <p>The total number of routing profiles which matched your search query.</p>
    pub fn get_approximate_total_count(&self) -> &::std::option::Option<i64> {
        &self.approximate_total_count
    }
    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 [`SearchRoutingProfilesOutput`](crate::operation::search_routing_profiles::SearchRoutingProfilesOutput).
    pub fn build(self) -> crate::operation::search_routing_profiles::SearchRoutingProfilesOutput {
        crate::operation::search_routing_profiles::SearchRoutingProfilesOutput {
            routing_profiles: self.routing_profiles,
            next_token: self.next_token,
            approximate_total_count: self.approximate_total_count,
            _request_id: self._request_id,
        }
    }
}