aws_sdk_emr/operation/modify_cluster/
_modify_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 ModifyClusterInput {
6    /// <p>The unique identifier of the cluster.</p>
7    pub cluster_id: ::std::option::Option<::std::string::String>,
8    /// <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <code>Step$ActionOnFailure</code>.</p>
9    pub step_concurrency_level: ::std::option::Option<i32>,
10    /// <p>Reserved.</p>
11    pub extended_support: ::std::option::Option<bool>,
12}
13impl ModifyClusterInput {
14    /// <p>The unique identifier of the cluster.</p>
15    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
16        self.cluster_id.as_deref()
17    }
18    /// <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <code>Step$ActionOnFailure</code>.</p>
19    pub fn step_concurrency_level(&self) -> ::std::option::Option<i32> {
20        self.step_concurrency_level
21    }
22    /// <p>Reserved.</p>
23    pub fn extended_support(&self) -> ::std::option::Option<bool> {
24        self.extended_support
25    }
26}
27impl ModifyClusterInput {
28    /// Creates a new builder-style object to manufacture [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
29    pub fn builder() -> crate::operation::modify_cluster::builders::ModifyClusterInputBuilder {
30        crate::operation::modify_cluster::builders::ModifyClusterInputBuilder::default()
31    }
32}
33
34/// A builder for [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct ModifyClusterInputBuilder {
38    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
39    pub(crate) step_concurrency_level: ::std::option::Option<i32>,
40    pub(crate) extended_support: ::std::option::Option<bool>,
41}
42impl ModifyClusterInputBuilder {
43    /// <p>The unique identifier of the cluster.</p>
44    /// This field is required.
45    pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.cluster_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The unique identifier of the cluster.</p>
50    pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.cluster_id = input;
52        self
53    }
54    /// <p>The unique identifier of the cluster.</p>
55    pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.cluster_id
57    }
58    /// <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <code>Step$ActionOnFailure</code>.</p>
59    pub fn step_concurrency_level(mut self, input: i32) -> Self {
60        self.step_concurrency_level = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <code>Step$ActionOnFailure</code>.</p>
64    pub fn set_step_concurrency_level(mut self, input: ::std::option::Option<i32>) -> Self {
65        self.step_concurrency_level = input;
66        self
67    }
68    /// <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <code>Step$ActionOnFailure</code>.</p>
69    pub fn get_step_concurrency_level(&self) -> &::std::option::Option<i32> {
70        &self.step_concurrency_level
71    }
72    /// <p>Reserved.</p>
73    pub fn extended_support(mut self, input: bool) -> Self {
74        self.extended_support = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Reserved.</p>
78    pub fn set_extended_support(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.extended_support = input;
80        self
81    }
82    /// <p>Reserved.</p>
83    pub fn get_extended_support(&self) -> &::std::option::Option<bool> {
84        &self.extended_support
85    }
86    /// Consumes the builder and constructs a [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::modify_cluster::ModifyClusterInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::modify_cluster::ModifyClusterInput {
91            cluster_id: self.cluster_id,
92            step_concurrency_level: self.step_concurrency_level,
93            extended_support: self.extended_support,
94        })
95    }
96}