aws-sdk-gamelift 1.118.0

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

/// <p>Properties that describe an alias resource.</p>
/// <p><b>Related actions</b></p>
/// <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Alias {
    /// <p>A unique identifier for the alias. Alias IDs are unique within a Region.</p>
    pub alias_id: ::std::option::Option<::std::string::String>,
    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>
    /// ::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
    /// </region></code>. In a GameLift alias ARN, the resource ID matches the alias ID value.</p>
    pub alias_arn: ::std::option::Option<::std::string::String>,
    /// <p>A human-readable description of an alias.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
    pub routing_strategy: ::std::option::Option<crate::types::RoutingStrategy>,
    /// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Alias {
    /// <p>A unique identifier for the alias. Alias IDs are unique within a Region.</p>
    pub fn alias_id(&self) -> ::std::option::Option<&str> {
        self.alias_id.as_deref()
    }
    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>
    /// ::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
    /// </region></code>. In a GameLift alias ARN, the resource ID matches the alias ID value.</p>
    pub fn alias_arn(&self) -> ::std::option::Option<&str> {
        self.alias_arn.as_deref()
    }
    /// <p>A human-readable description of an alias.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
    pub fn routing_strategy(&self) -> ::std::option::Option<&crate::types::RoutingStrategy> {
        self.routing_strategy.as_ref()
    }
    /// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
}
impl Alias {
    /// Creates a new builder-style object to manufacture [`Alias`](crate::types::Alias).
    pub fn builder() -> crate::types::builders::AliasBuilder {
        crate::types::builders::AliasBuilder::default()
    }
}

/// A builder for [`Alias`](crate::types::Alias).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AliasBuilder {
    pub(crate) alias_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) alias_arn: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) routing_strategy: ::std::option::Option<crate::types::RoutingStrategy>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl AliasBuilder {
    /// <p>A unique identifier for the alias. Alias IDs are unique within a Region.</p>
    pub fn alias_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alias_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the alias. Alias IDs are unique within a Region.</p>
    pub fn set_alias_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alias_id = input;
        self
    }
    /// <p>A unique identifier for the alias. Alias IDs are unique within a Region.</p>
    pub fn get_alias_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.alias_id
    }
    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</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>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>
    /// ::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
    /// </region></code>. In a GameLift alias ARN, the resource ID matches the alias ID value.</p>
    pub fn alias_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alias_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>
    /// ::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
    /// </region></code>. In a GameLift alias ARN, the resource ID matches the alias ID value.</p>
    pub fn set_alias_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alias_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>
    /// ::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
    /// </region></code>. In a GameLift alias ARN, the resource ID matches the alias ID value.</p>
    pub fn get_alias_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.alias_arn
    }
    /// <p>A human-readable description of an alias.</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 human-readable description of an alias.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A human-readable description of an alias.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
    pub fn routing_strategy(mut self, input: crate::types::RoutingStrategy) -> Self {
        self.routing_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
    pub fn set_routing_strategy(mut self, input: ::std::option::Option<crate::types::RoutingStrategy>) -> Self {
        self.routing_strategy = input;
        self
    }
    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
    pub fn get_routing_strategy(&self) -> &::std::option::Option<crate::types::RoutingStrategy> {
        &self.routing_strategy
    }
    /// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</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>The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</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>The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// Consumes the builder and constructs a [`Alias`](crate::types::Alias).
    pub fn build(self) -> crate::types::Alias {
        crate::types::Alias {
            alias_id: self.alias_id,
            name: self.name,
            alias_arn: self.alias_arn,
            description: self.description,
            routing_strategy: self.routing_strategy,
            creation_time: self.creation_time,
            last_updated_time: self.last_updated_time,
        }
    }
}