aws_sdk_elasticbeanstalk/operation/compose_environments/_compose_environments_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to create or update a group of environments.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ComposeEnvironmentsInput {
7 /// <p>The name of the application to which the specified source bundles belong.</p>
8 pub application_name: ::std::option::Option<::std::string::String>,
9 /// <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
10 pub group_name: ::std::option::Option<::std::string::String>,
11 /// <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>
12 pub version_labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13}
14impl ComposeEnvironmentsInput {
15 /// <p>The name of the application to which the specified source bundles belong.</p>
16 pub fn application_name(&self) -> ::std::option::Option<&str> {
17 self.application_name.as_deref()
18 }
19 /// <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
20 pub fn group_name(&self) -> ::std::option::Option<&str> {
21 self.group_name.as_deref()
22 }
23 /// <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>
24 ///
25 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.version_labels.is_none()`.
26 pub fn version_labels(&self) -> &[::std::string::String] {
27 self.version_labels.as_deref().unwrap_or_default()
28 }
29}
30impl ComposeEnvironmentsInput {
31 /// Creates a new builder-style object to manufacture [`ComposeEnvironmentsInput`](crate::operation::compose_environments::ComposeEnvironmentsInput).
32 pub fn builder() -> crate::operation::compose_environments::builders::ComposeEnvironmentsInputBuilder {
33 crate::operation::compose_environments::builders::ComposeEnvironmentsInputBuilder::default()
34 }
35}
36
37/// A builder for [`ComposeEnvironmentsInput`](crate::operation::compose_environments::ComposeEnvironmentsInput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct ComposeEnvironmentsInputBuilder {
41 pub(crate) application_name: ::std::option::Option<::std::string::String>,
42 pub(crate) group_name: ::std::option::Option<::std::string::String>,
43 pub(crate) version_labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44}
45impl ComposeEnvironmentsInputBuilder {
46 /// <p>The name of the application to which the specified source bundles belong.</p>
47 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.application_name = ::std::option::Option::Some(input.into());
49 self
50 }
51 /// <p>The name of the application to which the specified source bundles belong.</p>
52 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.application_name = input;
54 self
55 }
56 /// <p>The name of the application to which the specified source bundles belong.</p>
57 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
58 &self.application_name
59 }
60 /// <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
61 pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.group_name = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
66 pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.group_name = input;
68 self
69 }
70 /// <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
71 pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.group_name
73 }
74 /// Appends an item to `version_labels`.
75 ///
76 /// To override the contents of this collection use [`set_version_labels`](Self::set_version_labels).
77 ///
78 /// <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>
79 pub fn version_labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 let mut v = self.version_labels.unwrap_or_default();
81 v.push(input.into());
82 self.version_labels = ::std::option::Option::Some(v);
83 self
84 }
85 /// <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>
86 pub fn set_version_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
87 self.version_labels = input;
88 self
89 }
90 /// <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>
91 pub fn get_version_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
92 &self.version_labels
93 }
94 /// Consumes the builder and constructs a [`ComposeEnvironmentsInput`](crate::operation::compose_environments::ComposeEnvironmentsInput).
95 pub fn build(
96 self,
97 ) -> ::std::result::Result<crate::operation::compose_environments::ComposeEnvironmentsInput, ::aws_smithy_types::error::operation::BuildError>
98 {
99 ::std::result::Result::Ok(crate::operation::compose_environments::ComposeEnvironmentsInput {
100 application_name: self.application_name,
101 group_name: self.group_name,
102 version_labels: self.version_labels,
103 })
104 }
105}