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.

/// Placeholder documentation for UpdateNodeResponse
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNodeOutput {
    /// The ARN of the Node. It is automatically assigned when the Node is created.
    pub arn: ::std::option::Option<::std::string::String>,
    /// An array of IDs. Each ID is one ChannelPlacementGroup that is associated with this Node. Empty if the Node is not yet associated with any groups.
    pub channel_placement_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// The ID of the Cluster that the Node belongs to.
    pub cluster_id: ::std::option::Option<::std::string::String>,
    /// The current connection state of the Node.
    pub connection_state: ::std::option::Option<crate::types::NodeConnectionState>,
    /// The unique ID of the Node. Unique in the Cluster. The ID is the resource-id portion of the ARN.
    pub id: ::std::option::Option<::std::string::String>,
    /// The ARN of the EC2 instance hosting the Node.
    pub instance_arn: ::std::option::Option<::std::string::String>,
    /// The name that you specified for the Node.
    pub name: ::std::option::Option<::std::string::String>,
    /// Documentation update needed
    pub node_interface_mappings: ::std::option::Option<::std::vec::Vec<crate::types::NodeInterfaceMapping>>,
    /// The initial role current 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>,
    /// The current state of the Node.
    pub state: ::std::option::Option<crate::types::NodeState>,
    _request_id: Option<String>,
}
impl UpdateNodeOutput {
    /// The ARN of the Node. It is automatically assigned when the Node is created.
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// An array of IDs. Each ID is one ChannelPlacementGroup that is associated with this Node. Empty if the Node is not yet associated with any groups.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.channel_placement_groups.is_none()`.
    pub fn channel_placement_groups(&self) -> &[::std::string::String] {
        self.channel_placement_groups.as_deref().unwrap_or_default()
    }
    /// The ID of the Cluster that the Node belongs to.
    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
        self.cluster_id.as_deref()
    }
    /// The current connection state of the Node.
    pub fn connection_state(&self) -> ::std::option::Option<&crate::types::NodeConnectionState> {
        self.connection_state.as_ref()
    }
    /// The unique ID of the Node. Unique in the Cluster. The ID is the resource-id portion of the ARN.
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// The ARN of the EC2 instance hosting the Node.
    pub fn instance_arn(&self) -> ::std::option::Option<&str> {
        self.instance_arn.as_deref()
    }
    /// The name that you specified for the Node.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Documentation update needed
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.node_interface_mappings.is_none()`.
    pub fn node_interface_mappings(&self) -> &[crate::types::NodeInterfaceMapping] {
        self.node_interface_mappings.as_deref().unwrap_or_default()
    }
    /// The initial role current 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()
    }
    /// The current state of the Node.
    pub fn state(&self) -> ::std::option::Option<&crate::types::NodeState> {
        self.state.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateNodeOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateNodeOutput {
    /// Creates a new builder-style object to manufacture [`UpdateNodeOutput`](crate::operation::update_node::UpdateNodeOutput).
    pub fn builder() -> crate::operation::update_node::builders::UpdateNodeOutputBuilder {
        crate::operation::update_node::builders::UpdateNodeOutputBuilder::default()
    }
}

/// A builder for [`UpdateNodeOutput`](crate::operation::update_node::UpdateNodeOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNodeOutputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) channel_placement_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) connection_state: ::std::option::Option<crate::types::NodeConnectionState>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) node_interface_mappings: ::std::option::Option<::std::vec::Vec<crate::types::NodeInterfaceMapping>>,
    pub(crate) role: ::std::option::Option<crate::types::NodeRole>,
    pub(crate) state: ::std::option::Option<crate::types::NodeState>,
    _request_id: Option<String>,
}
impl UpdateNodeOutputBuilder {
    /// The ARN of the Node. It is automatically assigned when the Node 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 the Node. It is automatically assigned when the Node is created.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// The ARN of the Node. It is automatically assigned when the Node is created.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Appends an item to `channel_placement_groups`.
    ///
    /// To override the contents of this collection use [`set_channel_placement_groups`](Self::set_channel_placement_groups).
    ///
    /// An array of IDs. Each ID is one ChannelPlacementGroup that is associated with this Node. Empty if the Node is not yet associated with any groups.
    pub fn channel_placement_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.channel_placement_groups.unwrap_or_default();
        v.push(input.into());
        self.channel_placement_groups = ::std::option::Option::Some(v);
        self
    }
    /// An array of IDs. Each ID is one ChannelPlacementGroup that is associated with this Node. Empty if the Node is not yet associated with any groups.
    pub fn set_channel_placement_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.channel_placement_groups = input;
        self
    }
    /// An array of IDs. Each ID is one ChannelPlacementGroup that is associated with this Node. Empty if the Node is not yet associated with any groups.
    pub fn get_channel_placement_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.channel_placement_groups
    }
    /// The ID of the Cluster that the Node belongs to.
    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 that the Node belongs to.
    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 that the Node belongs to.
    pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_id
    }
    /// The current connection state of the Node.
    pub fn connection_state(mut self, input: crate::types::NodeConnectionState) -> Self {
        self.connection_state = ::std::option::Option::Some(input);
        self
    }
    /// The current connection state of the Node.
    pub fn set_connection_state(mut self, input: ::std::option::Option<crate::types::NodeConnectionState>) -> Self {
        self.connection_state = input;
        self
    }
    /// The current connection state of the Node.
    pub fn get_connection_state(&self) -> &::std::option::Option<crate::types::NodeConnectionState> {
        &self.connection_state
    }
    /// The unique ID of the Node. Unique in the Cluster. 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 unique ID of the Node. Unique in the Cluster. 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 unique ID of the Node. Unique in the Cluster. The ID is the resource-id portion of the ARN.
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// The ARN of the EC2 instance hosting the Node.
    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the EC2 instance hosting the Node.
    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_arn = input;
        self
    }
    /// The ARN of the EC2 instance hosting the Node.
    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_arn
    }
    /// The name that you specified for the Node.
    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 Node.
    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 Node.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `node_interface_mappings`.
    ///
    /// To override the contents of this collection use [`set_node_interface_mappings`](Self::set_node_interface_mappings).
    ///
    /// Documentation update needed
    pub fn node_interface_mappings(mut self, input: crate::types::NodeInterfaceMapping) -> Self {
        let mut v = self.node_interface_mappings.unwrap_or_default();
        v.push(input);
        self.node_interface_mappings = ::std::option::Option::Some(v);
        self
    }
    /// Documentation update needed
    pub fn set_node_interface_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NodeInterfaceMapping>>) -> Self {
        self.node_interface_mappings = input;
        self
    }
    /// Documentation update needed
    pub fn get_node_interface_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NodeInterfaceMapping>> {
        &self.node_interface_mappings
    }
    /// The initial role current 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 current 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 current 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
    }
    /// The current state of the Node.
    pub fn state(mut self, input: crate::types::NodeState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// The current state of the Node.
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::NodeState>) -> Self {
        self.state = input;
        self
    }
    /// The current state of the Node.
    pub fn get_state(&self) -> &::std::option::Option<crate::types::NodeState> {
        &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 [`UpdateNodeOutput`](crate::operation::update_node::UpdateNodeOutput).
    pub fn build(self) -> crate::operation::update_node::UpdateNodeOutput {
        crate::operation::update_node::UpdateNodeOutput {
            arn: self.arn,
            channel_placement_groups: self.channel_placement_groups,
            cluster_id: self.cluster_id,
            connection_state: self.connection_state,
            id: self.id,
            instance_arn: self.instance_arn,
            name: self.name,
            node_interface_mappings: self.node_interface_mappings,
            role: self.role,
            state: self.state,
            _request_id: self._request_id,
        }
    }
}