aws-sdk-gamelift 0.26.0

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

/// <p>Resources used to host your game servers. A compute resource can be managed GameLift Amazon EC2 instances or your own resources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Compute {
    /// <p>A unique identifier for the fleet that the compute is registered to.</p>
    #[doc(hidden)]
    pub fleet_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
    #[doc(hidden)]
    pub fleet_arn: std::option::Option<std::string::String>,
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    #[doc(hidden)]
    pub compute_name: std::option::Option<std::string::String>,
    /// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
    #[doc(hidden)]
    pub compute_arn: std::option::Option<std::string::String>,
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    #[doc(hidden)]
    pub ip_address: std::option::Option<std::string::String>,
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    #[doc(hidden)]
    pub dns_name: std::option::Option<std::string::String>,
    /// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
    #[doc(hidden)]
    pub compute_status: std::option::Option<crate::types::ComputeStatus>,
    /// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
    #[doc(hidden)]
    pub location: std::option::Option<std::string::String>,
    /// <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>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The type of operating system on your compute resource.</p>
    #[doc(hidden)]
    pub operating_system: std::option::Option<crate::types::OperatingSystem>,
    /// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::types::Ec2InstanceType>,
    /// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
    #[doc(hidden)]
    pub game_lift_service_sdk_endpoint: std::option::Option<std::string::String>,
}
impl Compute {
    /// <p>A unique identifier for the fleet that the compute is registered to.</p>
    pub fn fleet_id(&self) -> std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
    pub fn fleet_arn(&self) -> std::option::Option<&str> {
        self.fleet_arn.as_deref()
    }
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    pub fn compute_name(&self) -> std::option::Option<&str> {
        self.compute_name.as_deref()
    }
    /// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
    pub fn compute_arn(&self) -> std::option::Option<&str> {
        self.compute_arn.as_deref()
    }
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn ip_address(&self) -> std::option::Option<&str> {
        self.ip_address.as_deref()
    }
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn dns_name(&self) -> std::option::Option<&str> {
        self.dns_name.as_deref()
    }
    /// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
    pub fn compute_status(&self) -> std::option::Option<&crate::types::ComputeStatus> {
        self.compute_status.as_ref()
    }
    /// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
    pub fn location(&self) -> std::option::Option<&str> {
        self.location.as_deref()
    }
    /// <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 type of operating system on your compute resource.</p>
    pub fn operating_system(&self) -> std::option::Option<&crate::types::OperatingSystem> {
        self.operating_system.as_ref()
    }
    /// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::types::Ec2InstanceType> {
        self.r#type.as_ref()
    }
    /// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
    pub fn game_lift_service_sdk_endpoint(&self) -> std::option::Option<&str> {
        self.game_lift_service_sdk_endpoint.as_deref()
    }
}
impl Compute {
    /// Creates a new builder-style object to manufacture [`Compute`](crate::types::Compute).
    pub fn builder() -> crate::types::builders::ComputeBuilder {
        crate::types::builders::ComputeBuilder::default()
    }
}

/// A builder for [`Compute`](crate::types::Compute).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ComputeBuilder {
    pub(crate) fleet_id: std::option::Option<std::string::String>,
    pub(crate) fleet_arn: std::option::Option<std::string::String>,
    pub(crate) compute_name: std::option::Option<std::string::String>,
    pub(crate) compute_arn: std::option::Option<std::string::String>,
    pub(crate) ip_address: std::option::Option<std::string::String>,
    pub(crate) dns_name: std::option::Option<std::string::String>,
    pub(crate) compute_status: std::option::Option<crate::types::ComputeStatus>,
    pub(crate) location: std::option::Option<std::string::String>,
    pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) operating_system: std::option::Option<crate::types::OperatingSystem>,
    pub(crate) r#type: std::option::Option<crate::types::Ec2InstanceType>,
    pub(crate) game_lift_service_sdk_endpoint: std::option::Option<std::string::String>,
}
impl ComputeBuilder {
    /// <p>A unique identifier for the fleet that the compute is registered to.</p>
    pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.fleet_id = Some(input.into());
        self
    }
    /// <p>A unique identifier for the fleet that the compute is registered to.</p>
    pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.fleet_id = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
    pub fn fleet_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.fleet_arn = Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
    pub fn set_fleet_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.fleet_arn = input;
        self
    }
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    pub fn compute_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.compute_name = Some(input.into());
        self
    }
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    pub fn set_compute_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.compute_name = input;
        self
    }
    /// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
    pub fn compute_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.compute_arn = Some(input.into());
        self
    }
    /// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
    pub fn set_compute_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.compute_arn = input;
        self
    }
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
        self.ip_address = Some(input.into());
        self
    }
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.ip_address = input;
        self
    }
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.dns_name = Some(input.into());
        self
    }
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.dns_name = input;
        self
    }
    /// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
    pub fn compute_status(mut self, input: crate::types::ComputeStatus) -> Self {
        self.compute_status = Some(input);
        self
    }
    /// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
    pub fn set_compute_status(
        mut self,
        input: std::option::Option<crate::types::ComputeStatus>,
    ) -> Self {
        self.compute_status = input;
        self
    }
    /// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
    pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
        self.location = Some(input.into());
        self
    }
    /// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
    pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.location = 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 creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.creation_time = 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>The type of operating system on your compute resource.</p>
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
        self.operating_system = Some(input);
        self
    }
    /// <p>The type of operating system on your compute resource.</p>
    pub fn set_operating_system(
        mut self,
        input: std::option::Option<crate::types::OperatingSystem>,
    ) -> Self {
        self.operating_system = input;
        self
    }
    /// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
    pub fn r#type(mut self, input: crate::types::Ec2InstanceType) -> Self {
        self.r#type = Some(input);
        self
    }
    /// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
    pub fn set_type(mut self, input: std::option::Option<crate::types::Ec2InstanceType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
    pub fn game_lift_service_sdk_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
        self.game_lift_service_sdk_endpoint = Some(input.into());
        self
    }
    /// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
    pub fn set_game_lift_service_sdk_endpoint(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.game_lift_service_sdk_endpoint = input;
        self
    }
    /// Consumes the builder and constructs a [`Compute`](crate::types::Compute).
    pub fn build(self) -> crate::types::Compute {
        crate::types::Compute {
            fleet_id: self.fleet_id,
            fleet_arn: self.fleet_arn,
            compute_name: self.compute_name,
            compute_arn: self.compute_arn,
            ip_address: self.ip_address,
            dns_name: self.dns_name,
            compute_status: self.compute_status,
            location: self.location,
            creation_time: self.creation_time,
            operating_system: self.operating_system,
            r#type: self.r#type,
            game_lift_service_sdk_endpoint: self.game_lift_service_sdk_endpoint,
        }
    }
}