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 node.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNodeInput {
    /// 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 Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
    pub name: ::std::option::Option<::std::string::String>,
    /// The ID of the node.
    pub node_id: ::std::option::Option<::std::string::String>,
    /// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
    pub role: ::std::option::Option<crate::types::NodeRole>,
}
impl UpdateNodeInput {
    /// 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 Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The ID of the node.
    pub fn node_id(&self) -> ::std::option::Option<&str> {
        self.node_id.as_deref()
    }
    /// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
    pub fn role(&self) -> ::std::option::Option<&crate::types::NodeRole> {
        self.role.as_ref()
    }
}
impl UpdateNodeInput {
    /// Creates a new builder-style object to manufacture [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
    pub fn builder() -> crate::operation::update_node::builders::UpdateNodeInputBuilder {
        crate::operation::update_node::builders::UpdateNodeInputBuilder::default()
    }
}

/// A builder for [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNodeInputBuilder {
    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) node_id: ::std::option::Option<::std::string::String>,
    pub(crate) role: ::std::option::Option<crate::types::NodeRole>,
}
impl UpdateNodeInputBuilder {
    /// 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 Node. Specify a name that is unique in the Cluster. 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 Node. Specify a name that is unique in the Cluster. 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 Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The ID of the node.
    /// This field is required.
    pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the node.
    pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_id = input;
        self
    }
    /// The ID of the node.
    pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_id
    }
    /// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
    pub fn role(mut self, input: crate::types::NodeRole) -> Self {
        self.role = ::std::option::Option::Some(input);
        self
    }
    /// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
    pub fn set_role(mut self, input: ::std::option::Option<crate::types::NodeRole>) -> Self {
        self.role = input;
        self
    }
    /// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
    pub fn get_role(&self) -> &::std::option::Option<crate::types::NodeRole> {
        &self.role
    }
    /// Consumes the builder and constructs a [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_node::UpdateNodeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_node::UpdateNodeInput {
            cluster_id: self.cluster_id,
            name: self.name,
            node_id: self.node_id,
            role: self.role,
        })
    }
}