aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Detailed information about a space.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Space {
    /// The unique ID of the space.
    pub space_id: ::std::string::String,
    /// A name that identifies the space.
    pub name: ::std::string::String,
    /// The Amazon Resource Name (ARN) of the space.
    pub space_arn: ::std::string::String,
    /// The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
    pub domain_arn: ::std::option::Option<::std::string::String>,
    /// The region where this space was created.
    pub region: ::std::string::String,
    /// AWS account ID that owns this space.
    pub owner_account_id: ::std::string::String,
    /// The ARN of the IAM role used for data access.
    pub data_access_role_arn: ::std::string::String,
    /// The timestamp when the space was created.
    pub created_at: ::aws_smithy_types::DateTime,
    /// The timestamp when the space was last updated.
    pub updated_at: ::aws_smithy_types::DateTime,
    /// The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
    pub agent_core_evaluation_role_arn: ::std::option::Option<::std::string::String>,
    /// The status of the space.
    pub status: crate::types::SpaceStatus,
    /// Reason for the current space status.
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports `encryptionStrategy` AWS_OWNED and no `kmsKeyArn`.
    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
}
impl Space {
    /// The unique ID of the space.
    pub fn space_id(&self) -> &str {
        use std::ops::Deref;
        self.space_id.deref()
    }
    /// A name that identifies the space.
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// The Amazon Resource Name (ARN) of the space.
    pub fn space_arn(&self) -> &str {
        use std::ops::Deref;
        self.space_arn.deref()
    }
    /// The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
    pub fn domain_arn(&self) -> ::std::option::Option<&str> {
        self.domain_arn.as_deref()
    }
    /// The region where this space was created.
    pub fn region(&self) -> &str {
        use std::ops::Deref;
        self.region.deref()
    }
    /// AWS account ID that owns this space.
    pub fn owner_account_id(&self) -> &str {
        use std::ops::Deref;
        self.owner_account_id.deref()
    }
    /// The ARN of the IAM role used for data access.
    pub fn data_access_role_arn(&self) -> &str {
        use std::ops::Deref;
        self.data_access_role_arn.deref()
    }
    /// The timestamp when the space was created.
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// The timestamp when the space was last updated.
    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
        &self.updated_at
    }
    /// The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
    pub fn agent_core_evaluation_role_arn(&self) -> ::std::option::Option<&str> {
        self.agent_core_evaluation_role_arn.as_deref()
    }
    /// The status of the space.
    pub fn status(&self) -> &crate::types::SpaceStatus {
        &self.status
    }
    /// Reason for the current space status.
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports `encryptionStrategy` AWS_OWNED and no `kmsKeyArn`.
    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
        self.encryption_configuration.as_ref()
    }
}
impl Space {
    /// Creates a new builder-style object to manufacture [`Space`](crate::types::Space).
    pub fn builder() -> crate::types::builders::SpaceBuilder {
        crate::types::builders::SpaceBuilder::default()
    }
}

/// A builder for [`Space`](crate::types::Space).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SpaceBuilder {
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) space_arn: ::std::option::Option<::std::string::String>,
    pub(crate) domain_arn: ::std::option::Option<::std::string::String>,
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) data_access_role_arn: ::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) agent_core_evaluation_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::SpaceStatus>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
}
impl SpaceBuilder {
    /// The unique ID of the space.
    /// This field is required.
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique ID of the space.
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_id = input;
        self
    }
    /// The unique ID of the space.
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_id
    }
    /// A name that identifies the space.
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// A name that identifies the space.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// A name that identifies the space.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The Amazon Resource Name (ARN) of the space.
    /// This field is required.
    pub fn space_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the space.
    pub fn set_space_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the space.
    pub fn get_space_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_arn
    }
    /// The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
    pub fn domain_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
    pub fn set_domain_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
    pub fn get_domain_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_arn
    }
    /// The region where this space was created.
    /// This field is required.
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// The region where this space was created.
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// The region where this space was created.
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// AWS account ID that owns this space.
    /// This field is required.
    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
    }
    /// AWS account ID that owns this space.
    pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_account_id = input;
        self
    }
    /// AWS account ID that owns this space.
    pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_account_id
    }
    /// The ARN of the IAM role used for data access.
    /// This field is required.
    pub fn data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_access_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the IAM role used for data access.
    pub fn set_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_access_role_arn = input;
        self
    }
    /// The ARN of the IAM role used for data access.
    pub fn get_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_access_role_arn
    }
    /// The timestamp when the space was created.
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp when the space was created.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// The timestamp when the space was created.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// The timestamp when the space was last updated.
    /// This field is required.
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp when the space was last updated.
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// The timestamp when the space was last updated.
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
    pub fn agent_core_evaluation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_core_evaluation_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
    pub fn set_agent_core_evaluation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_core_evaluation_role_arn = input;
        self
    }
    /// The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
    pub fn get_agent_core_evaluation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_core_evaluation_role_arn
    }
    /// The status of the space.
    /// This field is required.
    pub fn status(mut self, input: crate::types::SpaceStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// The status of the space.
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SpaceStatus>) -> Self {
        self.status = input;
        self
    }
    /// The status of the space.
    pub fn get_status(&self) -> &::std::option::Option<crate::types::SpaceStatus> {
        &self.status
    }
    /// Reason for the current space status.
    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
    }
    /// Reason for the current space status.
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// Reason for the current space status.
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports `encryptionStrategy` AWS_OWNED and no `kmsKeyArn`.
    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
        self.encryption_configuration = ::std::option::Option::Some(input);
        self
    }
    /// How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports `encryptionStrategy` AWS_OWNED and no `kmsKeyArn`.
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
        self.encryption_configuration = input;
        self
    }
    /// How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports `encryptionStrategy` AWS_OWNED and no `kmsKeyArn`.
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
        &self.encryption_configuration
    }
    /// Consumes the builder and constructs a [`Space`](crate::types::Space).
    /// This method will fail if any of the following fields are not set:
    /// - [`space_id`](crate::types::builders::SpaceBuilder::space_id)
    /// - [`name`](crate::types::builders::SpaceBuilder::name)
    /// - [`space_arn`](crate::types::builders::SpaceBuilder::space_arn)
    /// - [`region`](crate::types::builders::SpaceBuilder::region)
    /// - [`owner_account_id`](crate::types::builders::SpaceBuilder::owner_account_id)
    /// - [`data_access_role_arn`](crate::types::builders::SpaceBuilder::data_access_role_arn)
    /// - [`created_at`](crate::types::builders::SpaceBuilder::created_at)
    /// - [`updated_at`](crate::types::builders::SpaceBuilder::updated_at)
    /// - [`status`](crate::types::builders::SpaceBuilder::status)
    pub fn build(self) -> ::std::result::Result<crate::types::Space, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Space {
            space_id: self.space_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "space_id",
                    "space_id was not specified but it is required when building Space",
                )
            })?,
            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 Space",
                )
            })?,
            space_arn: self.space_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "space_arn",
                    "space_arn was not specified but it is required when building Space",
                )
            })?,
            domain_arn: self.domain_arn,
            region: self.region.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "region",
                    "region was not specified but it is required when building Space",
                )
            })?,
            owner_account_id: self.owner_account_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "owner_account_id",
                    "owner_account_id was not specified but it is required when building Space",
                )
            })?,
            data_access_role_arn: self.data_access_role_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "data_access_role_arn",
                    "data_access_role_arn was not specified but it is required when building Space",
                )
            })?,
            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 Space",
                )
            })?,
            updated_at: self.updated_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "updated_at",
                    "updated_at was not specified but it is required when building Space",
                )
            })?,
            agent_core_evaluation_role_arn: self.agent_core_evaluation_role_arn,
            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 Space",
                )
            })?,
            status_reason: self.status_reason,
            encryption_configuration: self.encryption_configuration,
        })
    }
}