aws_sdk_gamelift/operation/describe_instances/
_describe_instances_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 DescribeInstancesInput {
6    /// <p>A unique identifier for the fleet to retrieve instance information for. You can use either the fleet ID or ARN value.</p>
7    pub fleet_id: ::std::option::Option<::std::string::String>,
8    /// <p>A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.</p>
9    pub instance_id: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
11    pub limit: ::std::option::Option<i32>,
12    /// <p>A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14    /// <p>The name of a location to retrieve instance information for, in the form of an Amazon Web Services Region code such as <code>us-west-2</code>.</p>
15    pub location: ::std::option::Option<::std::string::String>,
16}
17impl DescribeInstancesInput {
18    /// <p>A unique identifier for the fleet to retrieve instance information for. You can use either the fleet ID or ARN value.</p>
19    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
20        self.fleet_id.as_deref()
21    }
22    /// <p>A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.</p>
23    pub fn instance_id(&self) -> ::std::option::Option<&str> {
24        self.instance_id.as_deref()
25    }
26    /// <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
27    pub fn limit(&self) -> ::std::option::Option<i32> {
28        self.limit
29    }
30    /// <p>A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.</p>
31    pub fn next_token(&self) -> ::std::option::Option<&str> {
32        self.next_token.as_deref()
33    }
34    /// <p>The name of a location to retrieve instance information for, in the form of an Amazon Web Services Region code such as <code>us-west-2</code>.</p>
35    pub fn location(&self) -> ::std::option::Option<&str> {
36        self.location.as_deref()
37    }
38}
39impl DescribeInstancesInput {
40    /// Creates a new builder-style object to manufacture [`DescribeInstancesInput`](crate::operation::describe_instances::DescribeInstancesInput).
41    pub fn builder() -> crate::operation::describe_instances::builders::DescribeInstancesInputBuilder {
42        crate::operation::describe_instances::builders::DescribeInstancesInputBuilder::default()
43    }
44}
45
46/// A builder for [`DescribeInstancesInput`](crate::operation::describe_instances::DescribeInstancesInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DescribeInstancesInputBuilder {
50    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
51    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
52    pub(crate) limit: ::std::option::Option<i32>,
53    pub(crate) next_token: ::std::option::Option<::std::string::String>,
54    pub(crate) location: ::std::option::Option<::std::string::String>,
55}
56impl DescribeInstancesInputBuilder {
57    /// <p>A unique identifier for the fleet to retrieve instance information for. You can use either the fleet ID or ARN value.</p>
58    /// This field is required.
59    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.fleet_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>A unique identifier for the fleet to retrieve instance information for. You can use either the fleet ID or ARN value.</p>
64    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.fleet_id = input;
66        self
67    }
68    /// <p>A unique identifier for the fleet to retrieve instance information for. You can use either the fleet ID or ARN value.</p>
69    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.fleet_id
71    }
72    /// <p>A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.</p>
73    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.instance_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.</p>
78    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.instance_id = input;
80        self
81    }
82    /// <p>A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.</p>
83    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.instance_id
85    }
86    /// <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
87    pub fn limit(mut self, input: i32) -> Self {
88        self.limit = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
92    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
93        self.limit = input;
94        self
95    }
96    /// <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
97    pub fn get_limit(&self) -> &::std::option::Option<i32> {
98        &self.limit
99    }
100    /// <p>A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.</p>
101    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.next_token = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.</p>
106    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.next_token = input;
108        self
109    }
110    /// <p>A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.</p>
111    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
112        &self.next_token
113    }
114    /// <p>The name of a location to retrieve instance information for, in the form of an Amazon Web Services Region code such as <code>us-west-2</code>.</p>
115    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.location = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The name of a location to retrieve instance information for, in the form of an Amazon Web Services Region code such as <code>us-west-2</code>.</p>
120    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.location = input;
122        self
123    }
124    /// <p>The name of a location to retrieve instance information for, in the form of an Amazon Web Services Region code such as <code>us-west-2</code>.</p>
125    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
126        &self.location
127    }
128    /// Consumes the builder and constructs a [`DescribeInstancesInput`](crate::operation::describe_instances::DescribeInstancesInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::describe_instances::DescribeInstancesInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::describe_instances::DescribeInstancesInput {
133            fleet_id: self.fleet_id,
134            instance_id: self.instance_id,
135            limit: self.limit,
136            next_token: self.next_token,
137            location: self.location,
138        })
139    }
140}