#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateEnvironmentOperationsRoleInput {
pub environment_name: ::std::option::Option<::std::string::String>,
pub operations_role: ::std::option::Option<::std::string::String>,
}
impl AssociateEnvironmentOperationsRoleInput {
pub fn environment_name(&self) -> ::std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn operations_role(&self) -> ::std::option::Option<&str> {
self.operations_role.as_deref()
}
}
impl AssociateEnvironmentOperationsRoleInput {
pub fn builder() -> crate::operation::associate_environment_operations_role::builders::AssociateEnvironmentOperationsRoleInputBuilder {
crate::operation::associate_environment_operations_role::builders::AssociateEnvironmentOperationsRoleInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateEnvironmentOperationsRoleInputBuilder {
pub(crate) environment_name: ::std::option::Option<::std::string::String>,
pub(crate) operations_role: ::std::option::Option<::std::string::String>,
}
impl AssociateEnvironmentOperationsRoleInputBuilder {
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 operations_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.operations_role = ::std::option::Option::Some(input.into());
self
}
pub fn set_operations_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.operations_role = input;
self
}
pub fn get_operations_role(&self) -> &::std::option::Option<::std::string::String> {
&self.operations_role
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::associate_environment_operations_role::AssociateEnvironmentOperationsRoleInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::associate_environment_operations_role::AssociateEnvironmentOperationsRoleInput {
environment_name: self.environment_name,
operations_role: self.operations_role,
},
)
}
}