#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutEnvironmentVariablesInput {
pub app_name: ::std::option::Option<::std::string::String>,
pub environment_name: ::std::option::Option<::std::string::String>,
pub environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableInput>>,
}
impl PutEnvironmentVariablesInput {
pub fn app_name(&self) -> ::std::option::Option<&str> {
self.app_name.as_deref()
}
pub fn environment_name(&self) -> ::std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn environment_variables(&self) -> &[crate::types::EnvironmentVariableInput] {
self.environment_variables.as_deref().unwrap_or_default()
}
}
impl PutEnvironmentVariablesInput {
pub fn builder() -> crate::operation::put_environment_variables::builders::PutEnvironmentVariablesInputBuilder {
crate::operation::put_environment_variables::builders::PutEnvironmentVariablesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutEnvironmentVariablesInputBuilder {
pub(crate) app_name: ::std::option::Option<::std::string::String>,
pub(crate) environment_name: ::std::option::Option<::std::string::String>,
pub(crate) environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableInput>>,
}
impl PutEnvironmentVariablesInputBuilder {
pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.app_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.app_name = input;
self
}
pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
&self.app_name
}
pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_name = input;
self
}
pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_name
}
pub fn environment_variables(mut self, input: crate::types::EnvironmentVariableInput) -> Self {
let mut v = self.environment_variables.unwrap_or_default();
v.push(input);
self.environment_variables = ::std::option::Option::Some(v);
self
}
pub fn set_environment_variables(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableInput>>) -> Self {
self.environment_variables = input;
self
}
pub fn get_environment_variables(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableInput>> {
&self.environment_variables
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::put_environment_variables::PutEnvironmentVariablesInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::put_environment_variables::PutEnvironmentVariablesInput {
app_name: self.app_name,
environment_name: self.environment_name,
environment_variables: self.environment_variables,
})
}
}