#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateEnvironmentOutput {
pub project_id: ::std::string::String,
pub id: ::std::option::Option<::std::string::String>,
pub domain_id: ::std::string::String,
pub created_by: ::std::string::String,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub name: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub environment_profile_id: ::std::string::String,
pub aws_account_id: ::std::option::Option<::std::string::String>,
pub aws_account_region: ::std::option::Option<::std::string::String>,
pub provider: ::std::string::String,
pub provisioned_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
pub status: ::std::option::Option<crate::types::EnvironmentStatus>,
pub environment_actions: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurableEnvironmentAction>>,
pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::CustomParameter>>,
pub last_deployment: ::std::option::Option<crate::types::Deployment>,
pub provisioning_properties: ::std::option::Option<crate::types::ProvisioningProperties>,
pub deployment_properties: ::std::option::Option<crate::types::DeploymentProperties>,
pub environment_blueprint_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateEnvironmentOutput {
pub fn project_id(&self) -> &str {
use std::ops::Deref;
self.project_id.deref()
}
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn environment_profile_id(&self) -> &str {
use std::ops::Deref;
self.environment_profile_id.deref()
}
pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
self.aws_account_id.as_deref()
}
pub fn aws_account_region(&self) -> ::std::option::Option<&str> {
self.aws_account_region.as_deref()
}
pub fn provider(&self) -> &str {
use std::ops::Deref;
self.provider.deref()
}
pub fn provisioned_resources(&self) -> &[crate::types::Resource] {
self.provisioned_resources.as_deref().unwrap_or_default()
}
pub fn status(&self) -> ::std::option::Option<&crate::types::EnvironmentStatus> {
self.status.as_ref()
}
pub fn environment_actions(&self) -> &[crate::types::ConfigurableEnvironmentAction] {
self.environment_actions.as_deref().unwrap_or_default()
}
pub fn glossary_terms(&self) -> &[::std::string::String] {
self.glossary_terms.as_deref().unwrap_or_default()
}
pub fn user_parameters(&self) -> &[crate::types::CustomParameter] {
self.user_parameters.as_deref().unwrap_or_default()
}
pub fn last_deployment(&self) -> ::std::option::Option<&crate::types::Deployment> {
self.last_deployment.as_ref()
}
pub fn provisioning_properties(&self) -> ::std::option::Option<&crate::types::ProvisioningProperties> {
self.provisioning_properties.as_ref()
}
pub fn deployment_properties(&self) -> ::std::option::Option<&crate::types::DeploymentProperties> {
self.deployment_properties.as_ref()
}
pub fn environment_blueprint_id(&self) -> ::std::option::Option<&str> {
self.environment_blueprint_id.as_deref()
}
}
impl ::std::fmt::Debug for CreateEnvironmentOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentOutput");
formatter.field("project_id", &self.project_id);
formatter.field("id", &self.id);
formatter.field("domain_id", &self.domain_id);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("environment_profile_id", &self.environment_profile_id);
formatter.field("aws_account_id", &self.aws_account_id);
formatter.field("aws_account_region", &self.aws_account_region);
formatter.field("provider", &self.provider);
formatter.field("provisioned_resources", &self.provisioned_resources);
formatter.field("status", &self.status);
formatter.field("environment_actions", &self.environment_actions);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("user_parameters", &self.user_parameters);
formatter.field("last_deployment", &self.last_deployment);
formatter.field("provisioning_properties", &self.provisioning_properties);
formatter.field("deployment_properties", &self.deployment_properties);
formatter.field("environment_blueprint_id", &self.environment_blueprint_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateEnvironmentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateEnvironmentOutput {
pub fn builder() -> crate::operation::create_environment::builders::CreateEnvironmentOutputBuilder {
crate::operation::create_environment::builders::CreateEnvironmentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateEnvironmentOutputBuilder {
pub(crate) project_id: ::std::option::Option<::std::string::String>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) environment_profile_id: ::std::option::Option<::std::string::String>,
pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
pub(crate) aws_account_region: ::std::option::Option<::std::string::String>,
pub(crate) provider: ::std::option::Option<::std::string::String>,
pub(crate) provisioned_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
pub(crate) status: ::std::option::Option<crate::types::EnvironmentStatus>,
pub(crate) environment_actions: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurableEnvironmentAction>>,
pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::CustomParameter>>,
pub(crate) last_deployment: ::std::option::Option<crate::types::Deployment>,
pub(crate) provisioning_properties: ::std::option::Option<crate::types::ProvisioningProperties>,
pub(crate) deployment_properties: ::std::option::Option<crate::types::DeploymentProperties>,
pub(crate) environment_blueprint_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateEnvironmentOutputBuilder {
pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_id = input;
self
}
pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.project_id
}
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
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 updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
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 environment_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_profile_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_profile_id = input;
self
}
pub fn get_environment_profile_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_profile_id
}
pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aws_account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_account_id = input;
self
}
pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_account_id
}
pub fn aws_account_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aws_account_region = ::std::option::Option::Some(input.into());
self
}
pub fn set_aws_account_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_account_region = input;
self
}
pub fn get_aws_account_region(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_account_region
}
pub fn provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.provider = ::std::option::Option::Some(input.into());
self
}
pub fn set_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.provider = input;
self
}
pub fn get_provider(&self) -> &::std::option::Option<::std::string::String> {
&self.provider
}
pub fn provisioned_resources(mut self, input: crate::types::Resource) -> Self {
let mut v = self.provisioned_resources.unwrap_or_default();
v.push(input);
self.provisioned_resources = ::std::option::Option::Some(v);
self
}
pub fn set_provisioned_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>) -> Self {
self.provisioned_resources = input;
self
}
pub fn get_provisioned_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Resource>> {
&self.provisioned_resources
}
pub fn status(mut self, input: crate::types::EnvironmentStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::EnvironmentStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::EnvironmentStatus> {
&self.status
}
pub fn environment_actions(mut self, input: crate::types::ConfigurableEnvironmentAction) -> Self {
let mut v = self.environment_actions.unwrap_or_default();
v.push(input);
self.environment_actions = ::std::option::Option::Some(v);
self
}
pub fn set_environment_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurableEnvironmentAction>>) -> Self {
self.environment_actions = input;
self
}
pub fn get_environment_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurableEnvironmentAction>> {
&self.environment_actions
}
pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.glossary_terms.unwrap_or_default();
v.push(input.into());
self.glossary_terms = ::std::option::Option::Some(v);
self
}
pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.glossary_terms = input;
self
}
pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.glossary_terms
}
pub fn user_parameters(mut self, input: crate::types::CustomParameter) -> Self {
let mut v = self.user_parameters.unwrap_or_default();
v.push(input);
self.user_parameters = ::std::option::Option::Some(v);
self
}
pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomParameter>>) -> Self {
self.user_parameters = input;
self
}
pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomParameter>> {
&self.user_parameters
}
pub fn last_deployment(mut self, input: crate::types::Deployment) -> Self {
self.last_deployment = ::std::option::Option::Some(input);
self
}
pub fn set_last_deployment(mut self, input: ::std::option::Option<crate::types::Deployment>) -> Self {
self.last_deployment = input;
self
}
pub fn get_last_deployment(&self) -> &::std::option::Option<crate::types::Deployment> {
&self.last_deployment
}
pub fn provisioning_properties(mut self, input: crate::types::ProvisioningProperties) -> Self {
self.provisioning_properties = ::std::option::Option::Some(input);
self
}
pub fn set_provisioning_properties(mut self, input: ::std::option::Option<crate::types::ProvisioningProperties>) -> Self {
self.provisioning_properties = input;
self
}
pub fn get_provisioning_properties(&self) -> &::std::option::Option<crate::types::ProvisioningProperties> {
&self.provisioning_properties
}
pub fn deployment_properties(mut self, input: crate::types::DeploymentProperties) -> Self {
self.deployment_properties = ::std::option::Option::Some(input);
self
}
pub fn set_deployment_properties(mut self, input: ::std::option::Option<crate::types::DeploymentProperties>) -> Self {
self.deployment_properties = input;
self
}
pub fn get_deployment_properties(&self) -> &::std::option::Option<crate::types::DeploymentProperties> {
&self.deployment_properties
}
pub fn environment_blueprint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_blueprint_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_blueprint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_blueprint_id = input;
self
}
pub fn get_environment_blueprint_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_blueprint_id
}
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::create_environment::CreateEnvironmentOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_environment::CreateEnvironmentOutput {
project_id: self.project_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_id",
"project_id was not specified but it is required when building CreateEnvironmentOutput",
)
})?,
id: self.id,
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building CreateEnvironmentOutput",
)
})?,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building CreateEnvironmentOutput",
)
})?,
created_at: self.created_at,
updated_at: self.updated_at,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building CreateEnvironmentOutput",
)
})?,
description: self.description,
environment_profile_id: self.environment_profile_id.unwrap_or_default(),
aws_account_id: self.aws_account_id,
aws_account_region: self.aws_account_region,
provider: self.provider.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"provider",
"provider was not specified but it is required when building CreateEnvironmentOutput",
)
})?,
provisioned_resources: self.provisioned_resources,
status: self.status,
environment_actions: self.environment_actions,
glossary_terms: self.glossary_terms,
user_parameters: self.user_parameters,
last_deployment: self.last_deployment,
provisioning_properties: self.provisioning_properties,
deployment_properties: self.deployment_properties,
environment_blueprint_id: self.environment_blueprint_id,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateEnvironmentOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentOutputBuilder");
formatter.field("project_id", &self.project_id);
formatter.field("id", &self.id);
formatter.field("domain_id", &self.domain_id);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("environment_profile_id", &self.environment_profile_id);
formatter.field("aws_account_id", &self.aws_account_id);
formatter.field("aws_account_region", &self.aws_account_region);
formatter.field("provider", &self.provider);
formatter.field("provisioned_resources", &self.provisioned_resources);
formatter.field("status", &self.status);
formatter.field("environment_actions", &self.environment_actions);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("user_parameters", &self.user_parameters);
formatter.field("last_deployment", &self.last_deployment);
formatter.field("provisioning_properties", &self.provisioning_properties);
formatter.field("deployment_properties", &self.deployment_properties);
formatter.field("environment_blueprint_id", &self.environment_blueprint_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}