aws-sdk-medialive 1.149.0

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

/// Placeholder documentation for CreateNetworkResponse
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateNetworkOutput {
    /// The ARN of this Network. It is automatically assigned when the Network is created.
    pub arn: ::std::option::Option<::std::string::String>,
    /// Placeholder documentation for __listOf__string
    pub associated_cluster_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// The ID of the Network. Unique in the AWS account. The ID is the resource-id portion of the ARN.
    pub id: ::std::option::Option<::std::string::String>,
    /// An array of IpPools in your organization's network that identify a collection of IP addresses in this network that are reserved for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPool specifies one CIDR block.
    pub ip_pools: ::std::option::Option<::std::vec::Vec<crate::types::IpPool>>,
    /// The name that you specified for the Network.
    pub name: ::std::option::Option<::std::string::String>,
    /// An array of routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
    pub routes: ::std::option::Option<::std::vec::Vec<crate::types::Route>>,
    /// The current state of the Network. Only MediaLive Anywhere can change the state.
    pub state: ::std::option::Option<crate::types::NetworkState>,
    _request_id: Option<String>,
}
impl CreateNetworkOutput {
    /// The ARN of this Network. It is automatically assigned when the Network is created.
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// Placeholder documentation for __listOf__string
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.associated_cluster_ids.is_none()`.
    pub fn associated_cluster_ids(&self) -> &[::std::string::String] {
        self.associated_cluster_ids.as_deref().unwrap_or_default()
    }
    /// The ID of the Network. Unique in the AWS account. The ID is the resource-id portion of the ARN.
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// An array of IpPools in your organization's network that identify a collection of IP addresses in this network that are reserved for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPool specifies one CIDR block.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ip_pools.is_none()`.
    pub fn ip_pools(&self) -> &[crate::types::IpPool] {
        self.ip_pools.as_deref().unwrap_or_default()
    }
    /// The name that you specified for the Network.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// An array of routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.routes.is_none()`.
    pub fn routes(&self) -> &[crate::types::Route] {
        self.routes.as_deref().unwrap_or_default()
    }
    /// The current state of the Network. Only MediaLive Anywhere can change the state.
    pub fn state(&self) -> ::std::option::Option<&crate::types::NetworkState> {
        self.state.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreateNetworkOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateNetworkOutput {
    /// Creates a new builder-style object to manufacture [`CreateNetworkOutput`](crate::operation::create_network::CreateNetworkOutput).
    pub fn builder() -> crate::operation::create_network::builders::CreateNetworkOutputBuilder {
        crate::operation::create_network::builders::CreateNetworkOutputBuilder::default()
    }
}

/// A builder for [`CreateNetworkOutput`](crate::operation::create_network::CreateNetworkOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateNetworkOutputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) associated_cluster_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) ip_pools: ::std::option::Option<::std::vec::Vec<crate::types::IpPool>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) routes: ::std::option::Option<::std::vec::Vec<crate::types::Route>>,
    pub(crate) state: ::std::option::Option<crate::types::NetworkState>,
    _request_id: Option<String>,
}
impl CreateNetworkOutputBuilder {
    /// The ARN of this Network. It is automatically assigned when the Network is created.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of this Network. It is automatically assigned when the Network is created.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// The ARN of this Network. It is automatically assigned when the Network is created.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Appends an item to `associated_cluster_ids`.
    ///
    /// To override the contents of this collection use [`set_associated_cluster_ids`](Self::set_associated_cluster_ids).
    ///
    /// Placeholder documentation for __listOf__string
    pub fn associated_cluster_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.associated_cluster_ids.unwrap_or_default();
        v.push(input.into());
        self.associated_cluster_ids = ::std::option::Option::Some(v);
        self
    }
    /// Placeholder documentation for __listOf__string
    pub fn set_associated_cluster_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.associated_cluster_ids = input;
        self
    }
    /// Placeholder documentation for __listOf__string
    pub fn get_associated_cluster_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.associated_cluster_ids
    }
    /// The ID of the Network. Unique in the AWS account. The ID is the resource-id portion of the ARN.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the Network. Unique in the AWS account. The ID is the resource-id portion of the ARN.
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// The ID of the Network. Unique in the AWS account. The ID is the resource-id portion of the ARN.
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// Appends an item to `ip_pools`.
    ///
    /// To override the contents of this collection use [`set_ip_pools`](Self::set_ip_pools).
    ///
    /// An array of IpPools in your organization's network that identify a collection of IP addresses in this network that are reserved for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPool specifies one CIDR block.
    pub fn ip_pools(mut self, input: crate::types::IpPool) -> Self {
        let mut v = self.ip_pools.unwrap_or_default();
        v.push(input);
        self.ip_pools = ::std::option::Option::Some(v);
        self
    }
    /// An array of IpPools in your organization's network that identify a collection of IP addresses in this network that are reserved for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPool specifies one CIDR block.
    pub fn set_ip_pools(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpPool>>) -> Self {
        self.ip_pools = input;
        self
    }
    /// An array of IpPools in your organization's network that identify a collection of IP addresses in this network that are reserved for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPool specifies one CIDR block.
    pub fn get_ip_pools(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpPool>> {
        &self.ip_pools
    }
    /// The name that you specified for the Network.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name that you specified for the Network.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name that you specified for the Network.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `routes`.
    ///
    /// To override the contents of this collection use [`set_routes`](Self::set_routes).
    ///
    /// An array of routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
    pub fn routes(mut self, input: crate::types::Route) -> Self {
        let mut v = self.routes.unwrap_or_default();
        v.push(input);
        self.routes = ::std::option::Option::Some(v);
        self
    }
    /// An array of routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
    pub fn set_routes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Route>>) -> Self {
        self.routes = input;
        self
    }
    /// An array of routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
    pub fn get_routes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Route>> {
        &self.routes
    }
    /// The current state of the Network. Only MediaLive Anywhere can change the state.
    pub fn state(mut self, input: crate::types::NetworkState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// The current state of the Network. Only MediaLive Anywhere can change the state.
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::NetworkState>) -> Self {
        self.state = input;
        self
    }
    /// The current state of the Network. Only MediaLive Anywhere can change the state.
    pub fn get_state(&self) -> &::std::option::Option<crate::types::NetworkState> {
        &self.state
    }
    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 [`CreateNetworkOutput`](crate::operation::create_network::CreateNetworkOutput).
    pub fn build(self) -> crate::operation::create_network::CreateNetworkOutput {
        crate::operation::create_network::CreateNetworkOutput {
            arn: self.arn,
            associated_cluster_ids: self.associated_cluster_ids,
            id: self.id,
            ip_pools: self.ip_pools,
            name: self.name,
            routes: self.routes,
            state: self.state,
            _request_id: self._request_id,
        }
    }
}