aws_sdk_gamelift/operation/describe_compute/
_describe_compute_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeComputeInput {
6    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
7    pub fleet_id: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub compute_name: ::std::option::Option<::std::string::String>,
10}
11impl DescribeComputeInput {
12    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
13    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
14        self.fleet_id.as_deref()
15    }
16    /// <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>
17    pub fn compute_name(&self) -> ::std::option::Option<&str> {
18        self.compute_name.as_deref()
19    }
20}
21impl DescribeComputeInput {
22    /// Creates a new builder-style object to manufacture [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
23    pub fn builder() -> crate::operation::describe_compute::builders::DescribeComputeInputBuilder {
24        crate::operation::describe_compute::builders::DescribeComputeInputBuilder::default()
25    }
26}
27
28/// A builder for [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeComputeInputBuilder {
32    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
33    pub(crate) compute_name: ::std::option::Option<::std::string::String>,
34}
35impl DescribeComputeInputBuilder {
36    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
37    /// This field is required.
38    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.fleet_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
43    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.fleet_id = input;
45        self
46    }
47    /// <p>A unique identifier for the fleet that the compute belongs to. You can use either the fleet ID or ARN value.</p>
48    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.fleet_id
50    }
51    /// <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>
52    /// This field is required.
53    pub fn compute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.compute_name = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <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>
58    pub fn set_compute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.compute_name = input;
60        self
61    }
62    /// <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>
63    pub fn get_compute_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.compute_name
65    }
66    /// Consumes the builder and constructs a [`DescribeComputeInput`](crate::operation::describe_compute::DescribeComputeInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::describe_compute::DescribeComputeInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::describe_compute::DescribeComputeInput {
71            fleet_id: self.fleet_id,
72            compute_name: self.compute_name,
73        })
74    }
75}