aws-sdk-migrationhubrefactorspaces 1.100.0

AWS SDK for AWS Migration Hub Refactor Spaces
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateEnvironmentOutput {
    /// <p>The name of the environment.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the environment.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>A description of the environment.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the environment.</p>
    pub environment_id: ::std::option::Option<::std::string::String>,
    /// <p>The network fabric type of the environment.</p>
    pub network_fabric_type: ::std::option::Option<crate::types::NetworkFabricType>,
    /// <p>The Amazon Web Services account ID of environment owner.</p>
    pub owner_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the environment.</p>
    pub state: ::std::option::Option<crate::types::EnvironmentState>,
    /// <p>The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A timestamp that indicates when the environment was last updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A timestamp that indicates when the environment is created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateEnvironmentOutput {
    /// <p>The name of the environment.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the environment.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>A description of the environment.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The unique identifier of the environment.</p>
    pub fn environment_id(&self) -> ::std::option::Option<&str> {
        self.environment_id.as_deref()
    }
    /// <p>The network fabric type of the environment.</p>
    pub fn network_fabric_type(&self) -> ::std::option::Option<&crate::types::NetworkFabricType> {
        self.network_fabric_type.as_ref()
    }
    /// <p>The Amazon Web Services account ID of environment owner.</p>
    pub fn owner_account_id(&self) -> ::std::option::Option<&str> {
        self.owner_account_id.as_deref()
    }
    /// <p>The current state of the environment.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::EnvironmentState> {
        self.state.as_ref()
    }
    /// <p>The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>A timestamp that indicates when the environment was last updated.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>A timestamp that indicates when the environment is created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
}
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("name", &self.name);
        formatter.field("arn", &self.arn);
        formatter.field("description", &self.description);
        formatter.field("environment_id", &self.environment_id);
        formatter.field("network_fabric_type", &self.network_fabric_type);
        formatter.field("owner_account_id", &self.owner_account_id);
        formatter.field("state", &self.state);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("last_updated_time", &self.last_updated_time);
        formatter.field("created_time", &self.created_time);
        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 {
    /// Creates a new builder-style object to manufacture [`CreateEnvironmentOutput`](crate::operation::create_environment::CreateEnvironmentOutput).
    pub fn builder() -> crate::operation::create_environment::builders::CreateEnvironmentOutputBuilder {
        crate::operation::create_environment::builders::CreateEnvironmentOutputBuilder::default()
    }
}

/// A builder for [`CreateEnvironmentOutput`](crate::operation::create_environment::CreateEnvironmentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateEnvironmentOutputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) network_fabric_type: ::std::option::Option<crate::types::NetworkFabricType>,
    pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::EnvironmentState>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateEnvironmentOutputBuilder {
    /// <p>The name of the environment.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the environment.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the environment.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (ARN) of the environment.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the environment.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the environment.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>A description of the environment.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the environment.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the environment.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The unique identifier of the environment.</p>
    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
    }
    /// <p>The unique identifier of the environment.</p>
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// <p>The unique identifier of the environment.</p>
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// <p>The network fabric type of the environment.</p>
    pub fn network_fabric_type(mut self, input: crate::types::NetworkFabricType) -> Self {
        self.network_fabric_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The network fabric type of the environment.</p>
    pub fn set_network_fabric_type(mut self, input: ::std::option::Option<crate::types::NetworkFabricType>) -> Self {
        self.network_fabric_type = input;
        self
    }
    /// <p>The network fabric type of the environment.</p>
    pub fn get_network_fabric_type(&self) -> &::std::option::Option<crate::types::NetworkFabricType> {
        &self.network_fabric_type
    }
    /// <p>The Amazon Web Services account ID of environment owner.</p>
    pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of environment owner.</p>
    pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of environment owner.</p>
    pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_account_id
    }
    /// <p>The current state of the environment.</p>
    pub fn state(mut self, input: crate::types::EnvironmentState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the environment.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::EnvironmentState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The current state of the environment.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::EnvironmentState> {
        &self.state
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>A timestamp that indicates when the environment was last updated.</p>
    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp that indicates when the environment was last updated.</p>
    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time = input;
        self
    }
    /// <p>A timestamp that indicates when the environment was last updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>A timestamp that indicates when the environment is created.</p>
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp that indicates when the environment is created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>A timestamp that indicates when the environment is created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    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
    }
    /// Consumes the builder and constructs a [`CreateEnvironmentOutput`](crate::operation::create_environment::CreateEnvironmentOutput).
    pub fn build(self) -> crate::operation::create_environment::CreateEnvironmentOutput {
        crate::operation::create_environment::CreateEnvironmentOutput {
            name: self.name,
            arn: self.arn,
            description: self.description,
            environment_id: self.environment_id,
            network_fabric_type: self.network_fabric_type,
            owner_account_id: self.owner_account_id,
            state: self.state,
            tags: self.tags,
            last_updated_time: self.last_updated_time,
            created_time: self.created_time,
            _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("name", &self.name);
        formatter.field("arn", &self.arn);
        formatter.field("description", &self.description);
        formatter.field("environment_id", &self.environment_id);
        formatter.field("network_fabric_type", &self.network_fabric_type);
        formatter.field("owner_account_id", &self.owner_account_id);
        formatter.field("state", &self.state);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("last_updated_time", &self.last_updated_time);
        formatter.field("created_time", &self.created_time);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}