aws-sdk-pcs 1.70.1

AWS SDK for AWS Parallel Computing Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateClusterInput {
    /// <p>The name or ID of the cluster to update.</p>
    pub cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Additional options related to the Slurm scheduler.</p>
    pub slurm_configuration: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>,
}
impl UpdateClusterInput {
    /// <p>The name or ID of the cluster to update.</p>
    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.cluster_identifier.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Additional options related to the Slurm scheduler.</p>
    pub fn slurm_configuration(&self) -> ::std::option::Option<&crate::types::UpdateClusterSlurmConfigurationRequest> {
        self.slurm_configuration.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_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) slurm_configuration: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>,
}
impl UpdateClusterInputBuilder {
    /// <p>The name or ID of the cluster to update.</p>
    /// This field is required.
    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or ID of the cluster to update.</p>
    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_identifier = input;
        self
    }
    /// <p>The name or ID of the cluster to update.</p>
    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_identifier
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>Additional options related to the Slurm scheduler.</p>
    pub fn slurm_configuration(mut self, input: crate::types::UpdateClusterSlurmConfigurationRequest) -> Self {
        self.slurm_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Additional options related to the Slurm scheduler.</p>
    pub fn set_slurm_configuration(mut self, input: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>) -> Self {
        self.slurm_configuration = input;
        self
    }
    /// <p>Additional options related to the Slurm scheduler.</p>
    pub fn get_slurm_configuration(&self) -> &::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest> {
        &self.slurm_configuration
    }
    /// 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_identifier: self.cluster_identifier,
            client_token: self.client_token,
            slurm_configuration: self.slurm_configuration,
        })
    }
}