aws-sdk-medialive 0.26.0

AWS SDK for AWS Elemental MediaLive
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Placeholder documentation for ListChannelsResponse
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListChannelsOutput {
    /// Placeholder documentation for __listOfChannelSummary
    #[doc(hidden)]
    pub channels: std::option::Option<std::vec::Vec<crate::types::ChannelSummary>>,
    /// Placeholder documentation for __string
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListChannelsOutput {
    /// Placeholder documentation for __listOfChannelSummary
    pub fn channels(&self) -> std::option::Option<&[crate::types::ChannelSummary]> {
        self.channels.as_deref()
    }
    /// Placeholder documentation for __string
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListChannelsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListChannelsOutput {
    /// Creates a new builder-style object to manufacture [`ListChannelsOutput`](crate::operation::list_channels::ListChannelsOutput).
    pub fn builder() -> crate::operation::list_channels::builders::ListChannelsOutputBuilder {
        crate::operation::list_channels::builders::ListChannelsOutputBuilder::default()
    }
}

/// A builder for [`ListChannelsOutput`](crate::operation::list_channels::ListChannelsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListChannelsOutputBuilder {
    pub(crate) channels: std::option::Option<std::vec::Vec<crate::types::ChannelSummary>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListChannelsOutputBuilder {
    /// Appends an item to `channels`.
    ///
    /// To override the contents of this collection use [`set_channels`](Self::set_channels).
    ///
    /// Placeholder documentation for __listOfChannelSummary
    pub fn channels(mut self, input: crate::types::ChannelSummary) -> Self {
        let mut v = self.channels.unwrap_or_default();
        v.push(input);
        self.channels = Some(v);
        self
    }
    /// Placeholder documentation for __listOfChannelSummary
    pub fn set_channels(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ChannelSummary>>,
    ) -> Self {
        self.channels = input;
        self
    }
    /// Placeholder documentation for __string
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// Placeholder documentation for __string
    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 [`ListChannelsOutput`](crate::operation::list_channels::ListChannelsOutput).
    pub fn build(self) -> crate::operation::list_channels::ListChannelsOutput {
        crate::operation::list_channels::ListChannelsOutput {
            channels: self.channels,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}