aws_sdk_pcs/operation/update_cluster/_update_cluster_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateClusterInput {
6 /// <p>The name or ID of the cluster to update.</p>
7 pub cluster_identifier: ::std::option::Option<::std::string::String>,
8 /// <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>
9 pub client_token: ::std::option::Option<::std::string::String>,
10 /// <p>Additional options related to the Slurm scheduler.</p>
11 pub slurm_configuration: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>,
12}
13impl UpdateClusterInput {
14 /// <p>The name or ID of the cluster to update.</p>
15 pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
16 self.cluster_identifier.as_deref()
17 }
18 /// <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>
19 pub fn client_token(&self) -> ::std::option::Option<&str> {
20 self.client_token.as_deref()
21 }
22 /// <p>Additional options related to the Slurm scheduler.</p>
23 pub fn slurm_configuration(&self) -> ::std::option::Option<&crate::types::UpdateClusterSlurmConfigurationRequest> {
24 self.slurm_configuration.as_ref()
25 }
26}
27impl UpdateClusterInput {
28 /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
29 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
30 crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
31 }
32}
33
34/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateClusterInputBuilder {
38 pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
39 pub(crate) client_token: ::std::option::Option<::std::string::String>,
40 pub(crate) slurm_configuration: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>,
41}
42impl UpdateClusterInputBuilder {
43 /// <p>The name or ID of the cluster to update.</p>
44 /// This field is required.
45 pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.cluster_identifier = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The name or ID of the cluster to update.</p>
50 pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.cluster_identifier = input;
52 self
53 }
54 /// <p>The name or ID of the cluster to update.</p>
55 pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
56 &self.cluster_identifier
57 }
58 /// <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>
59 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.client_token = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <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>
64 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.client_token = input;
66 self
67 }
68 /// <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>
69 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
70 &self.client_token
71 }
72 /// <p>Additional options related to the Slurm scheduler.</p>
73 pub fn slurm_configuration(mut self, input: crate::types::UpdateClusterSlurmConfigurationRequest) -> Self {
74 self.slurm_configuration = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>Additional options related to the Slurm scheduler.</p>
78 pub fn set_slurm_configuration(mut self, input: ::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest>) -> Self {
79 self.slurm_configuration = input;
80 self
81 }
82 /// <p>Additional options related to the Slurm scheduler.</p>
83 pub fn get_slurm_configuration(&self) -> &::std::option::Option<crate::types::UpdateClusterSlurmConfigurationRequest> {
84 &self.slurm_configuration
85 }
86 /// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
91 cluster_identifier: self.cluster_identifier,
92 client_token: self.client_token,
93 slurm_configuration: self.slurm_configuration,
94 })
95 }
96}