aws-sdk-cloudcontrol 1.99.0

AWS SDK for AWS Cloud Control API
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 ListResourcesOutput {
    /// <p>The name of the resource type.</p>
    pub type_name: ::std::option::Option<::std::string::String>,
    /// <p>Information about the specified resources, including primary identifier and resource model.</p>
    pub resource_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDescription>>,
    /// <p>If the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListResourcesOutput {
    /// <p>The name of the resource type.</p>
    pub fn type_name(&self) -> ::std::option::Option<&str> {
        self.type_name.as_deref()
    }
    /// <p>Information about the specified resources, including primary identifier and resource model.</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 `.resource_descriptions.is_none()`.
    pub fn resource_descriptions(&self) -> &[crate::types::ResourceDescription] {
        self.resource_descriptions.as_deref().unwrap_or_default()
    }
    /// <p>If the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListResourcesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListResourcesOutput {
    /// Creates a new builder-style object to manufacture [`ListResourcesOutput`](crate::operation::list_resources::ListResourcesOutput).
    pub fn builder() -> crate::operation::list_resources::builders::ListResourcesOutputBuilder {
        crate::operation::list_resources::builders::ListResourcesOutputBuilder::default()
    }
}

/// A builder for [`ListResourcesOutput`](crate::operation::list_resources::ListResourcesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListResourcesOutputBuilder {
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
    pub(crate) resource_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDescription>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListResourcesOutputBuilder {
    /// <p>The name of the resource type.</p>
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.type_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the resource type.</p>
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.type_name = input;
        self
    }
    /// <p>The name of the resource type.</p>
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.type_name
    }
    /// Appends an item to `resource_descriptions`.
    ///
    /// To override the contents of this collection use [`set_resource_descriptions`](Self::set_resource_descriptions).
    ///
    /// <p>Information about the specified resources, including primary identifier and resource model.</p>
    pub fn resource_descriptions(mut self, input: crate::types::ResourceDescription) -> Self {
        let mut v = self.resource_descriptions.unwrap_or_default();
        v.push(input);
        self.resource_descriptions = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the specified resources, including primary identifier and resource model.</p>
    pub fn set_resource_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDescription>>) -> Self {
        self.resource_descriptions = input;
        self
    }
    /// <p>Information about the specified resources, including primary identifier and resource model.</p>
    pub fn get_resource_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceDescription>> {
        &self.resource_descriptions
    }
    /// <p>If the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</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 the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    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 [`ListResourcesOutput`](crate::operation::list_resources::ListResourcesOutput).
    pub fn build(self) -> crate::operation::list_resources::ListResourcesOutput {
        crate::operation::list_resources::ListResourcesOutput {
            type_name: self.type_name,
            resource_descriptions: self.resource_descriptions,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}