aws-sdk-medialive 1.78.0

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

/// A request to update the cluster.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateClusterInput {
    /// The ID of the cluster
    pub cluster_id: ::std::option::Option<::std::string::String>,
    /// Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
    pub name: ::std::option::Option<::std::string::String>,
    /// Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.
    pub network_settings: ::std::option::Option<crate::types::ClusterNetworkSettingsUpdateRequest>,
}
impl UpdateClusterInput {
    /// The ID of the cluster
    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
        self.cluster_id.as_deref()
    }
    /// Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.
    pub fn network_settings(&self) -> ::std::option::Option<&crate::types::ClusterNetworkSettingsUpdateRequest> {
        self.network_settings.as_ref()
    }
}
impl UpdateClusterInput {
    /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
    pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
        crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
    }
}

/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateClusterInputBuilder {
    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) network_settings: ::std::option::Option<crate::types::ClusterNetworkSettingsUpdateRequest>,
}
impl UpdateClusterInputBuilder {
    /// The ID of the cluster
    /// This field is required.
    pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the cluster
    pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_id = input;
        self
    }
    /// The ID of the cluster
    pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_id
    }
    /// Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.
    pub fn network_settings(mut self, input: crate::types::ClusterNetworkSettingsUpdateRequest) -> Self {
        self.network_settings = ::std::option::Option::Some(input);
        self
    }
    /// Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.
    pub fn set_network_settings(mut self, input: ::std::option::Option<crate::types::ClusterNetworkSettingsUpdateRequest>) -> Self {
        self.network_settings = input;
        self
    }
    /// Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.
    pub fn get_network_settings(&self) -> &::std::option::Option<crate::types::ClusterNetworkSettingsUpdateRequest> {
        &self.network_settings
    }
    /// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
            cluster_id: self.cluster_id,
            name: self.name,
            network_settings: self.network_settings,
        })
    }
}