aws-sdk-medialive 1.89.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 state of a node.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNodeStateInput {
    /// The ID of the cluster
    pub cluster_id: ::std::option::Option<::std::string::String>,
    /// The ID of the node.
    pub node_id: ::std::option::Option<::std::string::String>,
    /// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
    pub state: ::std::option::Option<crate::types::UpdateNodeStateShape>,
}
impl UpdateNodeStateInput {
    /// The ID of the cluster
    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
        self.cluster_id.as_deref()
    }
    /// The ID of the node.
    pub fn node_id(&self) -> ::std::option::Option<&str> {
        self.node_id.as_deref()
    }
    /// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
    pub fn state(&self) -> ::std::option::Option<&crate::types::UpdateNodeStateShape> {
        self.state.as_ref()
    }
}
impl UpdateNodeStateInput {
    /// Creates a new builder-style object to manufacture [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
    pub fn builder() -> crate::operation::update_node_state::builders::UpdateNodeStateInputBuilder {
        crate::operation::update_node_state::builders::UpdateNodeStateInputBuilder::default()
    }
}

/// A builder for [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNodeStateInputBuilder {
    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) node_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::UpdateNodeStateShape>,
}
impl UpdateNodeStateInputBuilder {
    /// 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
    }
    /// 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 state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
    pub fn state(mut self, input: crate::types::UpdateNodeStateShape) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::UpdateNodeStateShape>) -> Self {
        self.state = input;
        self
    }
    /// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
    pub fn get_state(&self) -> &::std::option::Option<crate::types::UpdateNodeStateShape> {
        &self.state
    }
    /// Consumes the builder and constructs a [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_node_state::UpdateNodeStateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_node_state::UpdateNodeStateInput {
            cluster_id: self.cluster_id,
            node_id: self.node_id,
            state: self.state,
        })
    }
}