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}
11impl ModifyClusterInput {
12 /// <p>The unique identifier of the cluster.</p>
13 pub fn cluster_id(&self) -> ::std::option::Option<&str> {
14 self.cluster_id.as_deref()
15 }
16 /// <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>
17 pub fn step_concurrency_level(&self) -> ::std::option::Option<i32> {
18 self.step_concurrency_level
19 }
20}
21impl ModifyClusterInput {
22 /// Creates a new builder-style object to manufacture [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
23 pub fn builder() -> crate::operation::modify_cluster::builders::ModifyClusterInputBuilder {
24 crate::operation::modify_cluster::builders::ModifyClusterInputBuilder::default()
25 }
26}
27
28/// A builder for [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct ModifyClusterInputBuilder {
32 pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
33 pub(crate) step_concurrency_level: ::std::option::Option<i32>,
34}
35impl ModifyClusterInputBuilder {
36 /// <p>The unique identifier of the cluster.</p>
37 /// This field is required.
38 pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.cluster_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The unique identifier of the cluster.</p>
43 pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.cluster_id = input;
45 self
46 }
47 /// <p>The unique identifier of the cluster.</p>
48 pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.cluster_id
50 }
51 /// <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>
52 pub fn step_concurrency_level(mut self, input: i32) -> Self {
53 self.step_concurrency_level = ::std::option::Option::Some(input);
54 self
55 }
56 /// <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>
57 pub fn set_step_concurrency_level(mut self, input: ::std::option::Option<i32>) -> Self {
58 self.step_concurrency_level = input;
59 self
60 }
61 /// <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>
62 pub fn get_step_concurrency_level(&self) -> &::std::option::Option<i32> {
63 &self.step_concurrency_level
64 }
65 /// Consumes the builder and constructs a [`ModifyClusterInput`](crate::operation::modify_cluster::ModifyClusterInput).
66 pub fn build(
67 self,
68 ) -> ::std::result::Result<crate::operation::modify_cluster::ModifyClusterInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::modify_cluster::ModifyClusterInput {
70 cluster_id: self.cluster_id,
71 step_concurrency_level: self.step_concurrency_level,
72 })
73 }
74}