aws-sdk-gamelift 1.119.0

AWS SDK for Amazon GameLift
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, ::std::fmt::Debug)]
pub struct DescribeComputeInput {
    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
    pub fleet_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the compute resource to retrieve properties for. For a managed container fleet or Anywhere fleet, use a compute name. For an EC2 fleet, use an instance ID. To retrieve a fleet's compute identifiers, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListCompute.html">ListCompute</a>.</p>
    pub compute_name: ::std::option::Option<::std::string::String>,
}
impl DescribeComputeInput {
    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
    /// <p>The unique identifier of the compute resource to retrieve properties for. For a managed container fleet or Anywhere fleet, use a compute name. For an EC2 fleet, use an instance ID. To retrieve a fleet's compute identifiers, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListCompute.html">ListCompute</a>.</p>
    pub fn compute_name(&self) -> ::std::option::Option<&str> {
        self.compute_name.as_deref()
    }
}
impl DescribeComputeInput {
    /// Creates a new builder-style object to manufacture [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
    pub fn builder() -> crate::operation::describe_compute::builders::DescribeComputeInputBuilder {
        crate::operation::describe_compute::builders::DescribeComputeInputBuilder::default()
    }
}

/// A builder for [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeComputeInputBuilder {
    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
    pub(crate) compute_name: ::std::option::Option<::std::string::String>,
}
impl DescribeComputeInputBuilder {
    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
    /// This field is required.
    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.fleet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.fleet_id = input;
        self
    }
    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.fleet_id
    }
    /// <p>The unique identifier of the compute resource to retrieve properties for. For a managed container fleet or Anywhere fleet, use a compute name. For an EC2 fleet, use an instance ID. To retrieve a fleet's compute identifiers, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListCompute.html">ListCompute</a>.</p>
    /// This field is required.
    pub fn compute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.compute_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the compute resource to retrieve properties for. For a managed container fleet or Anywhere fleet, use a compute name. For an EC2 fleet, use an instance ID. To retrieve a fleet's compute identifiers, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListCompute.html">ListCompute</a>.</p>
    pub fn set_compute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.compute_name = input;
        self
    }
    /// <p>The unique identifier of the compute resource to retrieve properties for. For a managed container fleet or Anywhere fleet, use a compute name. For an EC2 fleet, use an instance ID. To retrieve a fleet's compute identifiers, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ListCompute.html">ListCompute</a>.</p>
    pub fn get_compute_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.compute_name
    }
    /// Consumes the builder and constructs a [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_compute::DescribeComputeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_compute::DescribeComputeInput {
            fleet_id: self.fleet_id,
            compute_name: self.compute_name,
        })
    }
}