#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetDeploymentOutput {
pub app_name: ::std::string::String,
pub deployment_id: ::std::string::String,
pub deployment_arn: ::std::string::String,
pub environment_name: ::std::string::String,
pub source_config: ::std::option::Option<crate::types::DeploymentSourceConfig>,
pub description: ::std::option::Option<::std::string::String>,
pub status: crate::types::DeploymentStatus,
pub domain_name: ::std::option::Option<::std::string::String>,
pub aliases: ::std::option::Option<::std::vec::Vec<crate::types::AliasSummary>>,
pub environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableOutput>>,
pub created_at: ::aws_smithy_types::DateTime,
pub started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub expired_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub status_reason: ::std::option::Option<::std::string::String>,
pub status_reason_code: ::std::option::Option<crate::types::DeploymentStatusReasonCode>,
pub session_policy: ::std::option::Option<::std::string::String>,
pub branch: ::std::option::Option<crate::types::DeploymentBranch>,
pub backend: ::std::option::Option<crate::types::DeploymentBackend>,
pub steps: ::std::option::Option<crate::types::DeploymentSteps>,
_request_id: Option<String>,
}
impl GetDeploymentOutput {
pub fn app_name(&self) -> &str {
use std::ops::Deref;
self.app_name.deref()
}
pub fn deployment_id(&self) -> &str {
use std::ops::Deref;
self.deployment_id.deref()
}
pub fn deployment_arn(&self) -> &str {
use std::ops::Deref;
self.deployment_arn.deref()
}
pub fn environment_name(&self) -> &str {
use std::ops::Deref;
self.environment_name.deref()
}
pub fn source_config(&self) -> ::std::option::Option<&crate::types::DeploymentSourceConfig> {
self.source_config.as_ref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn status(&self) -> &crate::types::DeploymentStatus {
&self.status
}
pub fn domain_name(&self) -> ::std::option::Option<&str> {
self.domain_name.as_deref()
}
pub fn aliases(&self) -> &[crate::types::AliasSummary] {
self.aliases.as_deref().unwrap_or_default()
}
pub fn environment_variables(&self) -> &[crate::types::EnvironmentVariableOutput] {
self.environment_variables.as_deref().unwrap_or_default()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn started_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.started_at.as_ref()
}
pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.ended_at.as_ref()
}
pub fn expired_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expired_at.as_ref()
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
pub fn status_reason_code(&self) -> ::std::option::Option<&crate::types::DeploymentStatusReasonCode> {
self.status_reason_code.as_ref()
}
pub fn session_policy(&self) -> ::std::option::Option<&str> {
self.session_policy.as_deref()
}
pub fn branch(&self) -> ::std::option::Option<&crate::types::DeploymentBranch> {
self.branch.as_ref()
}
pub fn backend(&self) -> ::std::option::Option<&crate::types::DeploymentBackend> {
self.backend.as_ref()
}
pub fn steps(&self) -> ::std::option::Option<&crate::types::DeploymentSteps> {
self.steps.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetDeploymentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetDeploymentOutput {
pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentOutputBuilder {
crate::operation::get_deployment::builders::GetDeploymentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDeploymentOutputBuilder {
pub(crate) app_name: ::std::option::Option<::std::string::String>,
pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
pub(crate) deployment_arn: ::std::option::Option<::std::string::String>,
pub(crate) environment_name: ::std::option::Option<::std::string::String>,
pub(crate) source_config: ::std::option::Option<crate::types::DeploymentSourceConfig>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::DeploymentStatus>,
pub(crate) domain_name: ::std::option::Option<::std::string::String>,
pub(crate) aliases: ::std::option::Option<::std::vec::Vec<crate::types::AliasSummary>>,
pub(crate) environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableOutput>>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) expired_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
pub(crate) status_reason_code: ::std::option::Option<crate::types::DeploymentStatusReasonCode>,
pub(crate) session_policy: ::std::option::Option<::std::string::String>,
pub(crate) branch: ::std::option::Option<crate::types::DeploymentBranch>,
pub(crate) backend: ::std::option::Option<crate::types::DeploymentBackend>,
pub(crate) steps: ::std::option::Option<crate::types::DeploymentSteps>,
_request_id: Option<String>,
}
impl GetDeploymentOutputBuilder {
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 deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_id = input;
self
}
pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_id
}
pub fn deployment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_deployment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_arn = input;
self
}
pub fn get_deployment_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_arn
}
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 source_config(mut self, input: crate::types::DeploymentSourceConfig) -> Self {
self.source_config = ::std::option::Option::Some(input);
self
}
pub fn set_source_config(mut self, input: ::std::option::Option<crate::types::DeploymentSourceConfig>) -> Self {
self.source_config = input;
self
}
pub fn get_source_config(&self) -> &::std::option::Option<crate::types::DeploymentSourceConfig> {
&self.source_config
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn status(mut self, input: crate::types::DeploymentStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::DeploymentStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::DeploymentStatus> {
&self.status
}
pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_name = input;
self
}
pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_name
}
pub fn aliases(mut self, input: crate::types::AliasSummary) -> Self {
let mut v = self.aliases.unwrap_or_default();
v.push(input);
self.aliases = ::std::option::Option::Some(v);
self
}
pub fn set_aliases(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AliasSummary>>) -> Self {
self.aliases = input;
self
}
pub fn get_aliases(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AliasSummary>> {
&self.aliases
}
pub fn environment_variables(mut self, input: crate::types::EnvironmentVariableOutput) -> 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::EnvironmentVariableOutput>>) -> Self {
self.environment_variables = input;
self
}
pub fn get_environment_variables(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariableOutput>> {
&self.environment_variables
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.started_at = ::std::option::Option::Some(input);
self
}
pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.started_at = input;
self
}
pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.started_at
}
pub fn ended_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.ended_at = ::std::option::Option::Some(input);
self
}
pub fn set_ended_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.ended_at = input;
self
}
pub fn get_ended_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.ended_at
}
pub fn expired_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expired_at = ::std::option::Option::Some(input);
self
}
pub fn set_expired_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expired_at = input;
self
}
pub fn get_expired_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expired_at
}
pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
pub fn status_reason_code(mut self, input: crate::types::DeploymentStatusReasonCode) -> Self {
self.status_reason_code = ::std::option::Option::Some(input);
self
}
pub fn set_status_reason_code(mut self, input: ::std::option::Option<crate::types::DeploymentStatusReasonCode>) -> Self {
self.status_reason_code = input;
self
}
pub fn get_status_reason_code(&self) -> &::std::option::Option<crate::types::DeploymentStatusReasonCode> {
&self.status_reason_code
}
pub fn session_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_policy = ::std::option::Option::Some(input.into());
self
}
pub fn set_session_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_policy = input;
self
}
pub fn get_session_policy(&self) -> &::std::option::Option<::std::string::String> {
&self.session_policy
}
pub fn branch(mut self, input: crate::types::DeploymentBranch) -> Self {
self.branch = ::std::option::Option::Some(input);
self
}
pub fn set_branch(mut self, input: ::std::option::Option<crate::types::DeploymentBranch>) -> Self {
self.branch = input;
self
}
pub fn get_branch(&self) -> &::std::option::Option<crate::types::DeploymentBranch> {
&self.branch
}
pub fn backend(mut self, input: crate::types::DeploymentBackend) -> Self {
self.backend = ::std::option::Option::Some(input);
self
}
pub fn set_backend(mut self, input: ::std::option::Option<crate::types::DeploymentBackend>) -> Self {
self.backend = input;
self
}
pub fn get_backend(&self) -> &::std::option::Option<crate::types::DeploymentBackend> {
&self.backend
}
pub fn steps(mut self, input: crate::types::DeploymentSteps) -> Self {
self.steps = ::std::option::Option::Some(input);
self
}
pub fn set_steps(mut self, input: ::std::option::Option<crate::types::DeploymentSteps>) -> Self {
self.steps = input;
self
}
pub fn get_steps(&self) -> &::std::option::Option<crate::types::DeploymentSteps> {
&self.steps
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_deployment::GetDeploymentOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_deployment::GetDeploymentOutput {
app_name: self.app_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"app_name",
"app_name was not specified but it is required when building GetDeploymentOutput",
)
})?,
deployment_id: self.deployment_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"deployment_id",
"deployment_id was not specified but it is required when building GetDeploymentOutput",
)
})?,
deployment_arn: self.deployment_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"deployment_arn",
"deployment_arn was not specified but it is required when building GetDeploymentOutput",
)
})?,
environment_name: self.environment_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"environment_name",
"environment_name was not specified but it is required when building GetDeploymentOutput",
)
})?,
source_config: self.source_config,
description: self.description,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building GetDeploymentOutput",
)
})?,
domain_name: self.domain_name,
aliases: self.aliases,
environment_variables: self.environment_variables,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building GetDeploymentOutput",
)
})?,
started_at: self.started_at,
ended_at: self.ended_at,
expired_at: self.expired_at,
status_reason: self.status_reason,
status_reason_code: self.status_reason_code,
session_policy: self.session_policy,
branch: self.branch,
backend: self.backend,
steps: self.steps,
_request_id: self._request_id,
})
}
}