aws_sdk_elasticbeanstalk/operation/rebuild_environment/_rebuild_environment_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RebuildEnvironmentInput {
7 /// <p>The ID of the environment to rebuild.</p>
8 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
9 pub environment_id: ::std::option::Option<::std::string::String>,
10 /// <p>The name of the environment to rebuild.</p>
11 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
12 pub environment_name: ::std::option::Option<::std::string::String>,
13}
14impl RebuildEnvironmentInput {
15 /// <p>The ID of the environment to rebuild.</p>
16 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
17 pub fn environment_id(&self) -> ::std::option::Option<&str> {
18 self.environment_id.as_deref()
19 }
20 /// <p>The name of the environment to rebuild.</p>
21 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
22 pub fn environment_name(&self) -> ::std::option::Option<&str> {
23 self.environment_name.as_deref()
24 }
25}
26impl RebuildEnvironmentInput {
27 /// Creates a new builder-style object to manufacture [`RebuildEnvironmentInput`](crate::operation::rebuild_environment::RebuildEnvironmentInput).
28 pub fn builder() -> crate::operation::rebuild_environment::builders::RebuildEnvironmentInputBuilder {
29 crate::operation::rebuild_environment::builders::RebuildEnvironmentInputBuilder::default()
30 }
31}
32
33/// A builder for [`RebuildEnvironmentInput`](crate::operation::rebuild_environment::RebuildEnvironmentInput).
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
35#[non_exhaustive]
36pub struct RebuildEnvironmentInputBuilder {
37 pub(crate) environment_id: ::std::option::Option<::std::string::String>,
38 pub(crate) environment_name: ::std::option::Option<::std::string::String>,
39}
40impl RebuildEnvironmentInputBuilder {
41 /// <p>The ID of the environment to rebuild.</p>
42 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
43 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
44 self.environment_id = ::std::option::Option::Some(input.into());
45 self
46 }
47 /// <p>The ID of the environment to rebuild.</p>
48 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
49 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.environment_id = input;
51 self
52 }
53 /// <p>The ID of the environment to rebuild.</p>
54 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
55 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.environment_id
57 }
58 /// <p>The name of the environment to rebuild.</p>
59 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
60 pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.environment_name = ::std::option::Option::Some(input.into());
62 self
63 }
64 /// <p>The name of the environment to rebuild.</p>
65 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
66 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.environment_name = input;
68 self
69 }
70 /// <p>The name of the environment to rebuild.</p>
71 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
72 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
73 &self.environment_name
74 }
75 /// Consumes the builder and constructs a [`RebuildEnvironmentInput`](crate::operation::rebuild_environment::RebuildEnvironmentInput).
76 pub fn build(
77 self,
78 ) -> ::std::result::Result<crate::operation::rebuild_environment::RebuildEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
79 ::std::result::Result::Ok(crate::operation::rebuild_environment::RebuildEnvironmentInput {
80 environment_id: self.environment_id,
81 environment_name: self.environment_name,
82 })
83 }
84}