aws-sdk-emr 1.121.0

AWS SDK for Amazon EMR
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 ListStudiosOutput {
    /// <p>The list of Studio summary objects.</p>
    pub studios: ::std::option::Option<::std::vec::Vec<crate::types::StudioSummary>>,
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub marker: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListStudiosOutput {
    /// <p>The list of Studio summary objects.</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 `.studios.is_none()`.
    pub fn studios(&self) -> &[crate::types::StudioSummary] {
        self.studios.as_deref().unwrap_or_default()
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn marker(&self) -> ::std::option::Option<&str> {
        self.marker.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListStudiosOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListStudiosOutput {
    /// Creates a new builder-style object to manufacture [`ListStudiosOutput`](crate::operation::list_studios::ListStudiosOutput).
    pub fn builder() -> crate::operation::list_studios::builders::ListStudiosOutputBuilder {
        crate::operation::list_studios::builders::ListStudiosOutputBuilder::default()
    }
}

/// A builder for [`ListStudiosOutput`](crate::operation::list_studios::ListStudiosOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListStudiosOutputBuilder {
    pub(crate) studios: ::std::option::Option<::std::vec::Vec<crate::types::StudioSummary>>,
    pub(crate) marker: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListStudiosOutputBuilder {
    /// Appends an item to `studios`.
    ///
    /// To override the contents of this collection use [`set_studios`](Self::set_studios).
    ///
    /// <p>The list of Studio summary objects.</p>
    pub fn studios(mut self, input: crate::types::StudioSummary) -> Self {
        let mut v = self.studios.unwrap_or_default();
        v.push(input);
        self.studios = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of Studio summary objects.</p>
    pub fn set_studios(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StudioSummary>>) -> Self {
        self.studios = input;
        self
    }
    /// <p>The list of Studio summary objects.</p>
    pub fn get_studios(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StudioSummary>> {
        &self.studios
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.marker = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.marker = input;
        self
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
        &self.marker
    }
    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 [`ListStudiosOutput`](crate::operation::list_studios::ListStudiosOutput).
    pub fn build(self) -> crate::operation::list_studios::ListStudiosOutput {
        crate::operation::list_studios::ListStudiosOutput {
            studios: self.studios,
            marker: self.marker,
            _request_id: self._request_id,
        }
    }
}