#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopDeploymentInput {
pub application_id: ::std::option::Option<::std::string::String>,
pub environment_id: ::std::option::Option<::std::string::String>,
pub deployment_number: ::std::option::Option<i32>,
pub allow_revert: ::std::option::Option<bool>,
}
impl StopDeploymentInput {
pub fn application_id(&self) -> ::std::option::Option<&str> {
self.application_id.as_deref()
}
pub fn environment_id(&self) -> ::std::option::Option<&str> {
self.environment_id.as_deref()
}
pub fn deployment_number(&self) -> ::std::option::Option<i32> {
self.deployment_number
}
pub fn allow_revert(&self) -> ::std::option::Option<bool> {
self.allow_revert
}
}
impl StopDeploymentInput {
pub fn builder() -> crate::operation::stop_deployment::builders::StopDeploymentInputBuilder {
crate::operation::stop_deployment::builders::StopDeploymentInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopDeploymentInputBuilder {
pub(crate) application_id: ::std::option::Option<::std::string::String>,
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) deployment_number: ::std::option::Option<i32>,
pub(crate) allow_revert: ::std::option::Option<bool>,
}
impl StopDeploymentInputBuilder {
pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_id = input;
self
}
pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
&self.application_id
}
pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_id = input;
self
}
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
pub fn deployment_number(mut self, input: i32) -> Self {
self.deployment_number = ::std::option::Option::Some(input);
self
}
pub fn set_deployment_number(mut self, input: ::std::option::Option<i32>) -> Self {
self.deployment_number = input;
self
}
pub fn get_deployment_number(&self) -> &::std::option::Option<i32> {
&self.deployment_number
}
pub fn allow_revert(mut self, input: bool) -> Self {
self.allow_revert = ::std::option::Option::Some(input);
self
}
pub fn set_allow_revert(mut self, input: ::std::option::Option<bool>) -> Self {
self.allow_revert = input;
self
}
pub fn get_allow_revert(&self) -> &::std::option::Option<bool> {
&self.allow_revert
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::stop_deployment::StopDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::stop_deployment::StopDeploymentInput {
application_id: self.application_id,
environment_id: self.environment_id,
deployment_number: self.deployment_number,
allow_revert: self.allow_revert,
})
}
}