aws-sdk-mediaconnect 0.27.0

AWS SDK for AWS MediaConnect
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 ListOfferingsOutput {
    /// The token that identifies which batch of results that you want to see. For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// A list of offerings that are available to this account in the current AWS Region.
    #[doc(hidden)]
    pub offerings: std::option::Option<std::vec::Vec<crate::types::Offering>>,
    _request_id: Option<String>,
}
impl ListOfferingsOutput {
    /// The token that identifies which batch of results that you want to see. For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// A list of offerings that are available to this account in the current AWS Region.
    pub fn offerings(&self) -> std::option::Option<&[crate::types::Offering]> {
        self.offerings.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListOfferingsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListOfferingsOutput {
    /// Creates a new builder-style object to manufacture [`ListOfferingsOutput`](crate::operation::list_offerings::ListOfferingsOutput).
    pub fn builder() -> crate::operation::list_offerings::builders::ListOfferingsOutputBuilder {
        crate::operation::list_offerings::builders::ListOfferingsOutputBuilder::default()
    }
}

/// A builder for [`ListOfferingsOutput`](crate::operation::list_offerings::ListOfferingsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListOfferingsOutputBuilder {
    pub(crate) next_token: std::option::Option<std::string::String>,
    pub(crate) offerings: std::option::Option<std::vec::Vec<crate::types::Offering>>,
    _request_id: Option<String>,
}
impl ListOfferingsOutputBuilder {
    /// The token that identifies which batch of results that you want to see. For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// The token that identifies which batch of results that you want to see. For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Appends an item to `offerings`.
    ///
    /// To override the contents of this collection use [`set_offerings`](Self::set_offerings).
    ///
    /// A list of offerings that are available to this account in the current AWS Region.
    pub fn offerings(mut self, input: crate::types::Offering) -> Self {
        let mut v = self.offerings.unwrap_or_default();
        v.push(input);
        self.offerings = Some(v);
        self
    }
    /// A list of offerings that are available to this account in the current AWS Region.
    pub fn set_offerings(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Offering>>,
    ) -> Self {
        self.offerings = 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 [`ListOfferingsOutput`](crate::operation::list_offerings::ListOfferingsOutput).
    pub fn build(self) -> crate::operation::list_offerings::ListOfferingsOutput {
        crate::operation::list_offerings::ListOfferingsOutput {
            next_token: self.next_token,
            offerings: self.offerings,
            _request_id: self._request_id,
        }
    }
}