aws_sdk_gamelift/operation/register_compute/
_register_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)]
5pub struct RegisterComputeInput {
6    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
7    pub fleet_id: ::std::option::Option<::std::string::String>,
8    /// <p>A descriptive label for the compute resource.</p>
9    pub compute_name: ::std::option::Option<::std::string::String>,
10    /// <p>The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.</p>
11    pub certificate_path: ::std::option::Option<::std::string::String>,
12    /// <p>The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.</p>
13    pub dns_name: ::std::option::Option<::std::string::String>,
14    /// <p>The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.</p>
15    pub ip_address: ::std::option::Option<::std::string::String>,
16    /// <p>The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.</p>
17    pub location: ::std::option::Option<::std::string::String>,
18}
19impl RegisterComputeInput {
20    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
21    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
22        self.fleet_id.as_deref()
23    }
24    /// <p>A descriptive label for the compute resource.</p>
25    pub fn compute_name(&self) -> ::std::option::Option<&str> {
26        self.compute_name.as_deref()
27    }
28    /// <p>The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.</p>
29    pub fn certificate_path(&self) -> ::std::option::Option<&str> {
30        self.certificate_path.as_deref()
31    }
32    /// <p>The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.</p>
33    pub fn dns_name(&self) -> ::std::option::Option<&str> {
34        self.dns_name.as_deref()
35    }
36    /// <p>The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.</p>
37    pub fn ip_address(&self) -> ::std::option::Option<&str> {
38        self.ip_address.as_deref()
39    }
40    /// <p>The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.</p>
41    pub fn location(&self) -> ::std::option::Option<&str> {
42        self.location.as_deref()
43    }
44}
45impl ::std::fmt::Debug for RegisterComputeInput {
46    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47        let mut formatter = f.debug_struct("RegisterComputeInput");
48        formatter.field("fleet_id", &self.fleet_id);
49        formatter.field("compute_name", &self.compute_name);
50        formatter.field("certificate_path", &self.certificate_path);
51        formatter.field("dns_name", &self.dns_name);
52        formatter.field("ip_address", &"*** Sensitive Data Redacted ***");
53        formatter.field("location", &self.location);
54        formatter.finish()
55    }
56}
57impl RegisterComputeInput {
58    /// Creates a new builder-style object to manufacture [`RegisterComputeInput`](crate::operation::register_compute::RegisterComputeInput).
59    pub fn builder() -> crate::operation::register_compute::builders::RegisterComputeInputBuilder {
60        crate::operation::register_compute::builders::RegisterComputeInputBuilder::default()
61    }
62}
63
64/// A builder for [`RegisterComputeInput`](crate::operation::register_compute::RegisterComputeInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct RegisterComputeInputBuilder {
68    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
69    pub(crate) compute_name: ::std::option::Option<::std::string::String>,
70    pub(crate) certificate_path: ::std::option::Option<::std::string::String>,
71    pub(crate) dns_name: ::std::option::Option<::std::string::String>,
72    pub(crate) ip_address: ::std::option::Option<::std::string::String>,
73    pub(crate) location: ::std::option::Option<::std::string::String>,
74}
75impl RegisterComputeInputBuilder {
76    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
77    /// This field is required.
78    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.fleet_id = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
83    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.fleet_id = input;
85        self
86    }
87    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
88    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
89        &self.fleet_id
90    }
91    /// <p>A descriptive label for the compute resource.</p>
92    /// This field is required.
93    pub fn compute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.compute_name = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>A descriptive label for the compute resource.</p>
98    pub fn set_compute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.compute_name = input;
100        self
101    }
102    /// <p>A descriptive label for the compute resource.</p>
103    pub fn get_compute_name(&self) -> &::std::option::Option<::std::string::String> {
104        &self.compute_name
105    }
106    /// <p>The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.</p>
107    pub fn certificate_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.certificate_path = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.</p>
112    pub fn set_certificate_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.certificate_path = input;
114        self
115    }
116    /// <p>The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.</p>
117    pub fn get_certificate_path(&self) -> &::std::option::Option<::std::string::String> {
118        &self.certificate_path
119    }
120    /// <p>The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.</p>
121    pub fn dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.dns_name = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.</p>
126    pub fn set_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.dns_name = input;
128        self
129    }
130    /// <p>The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.</p>
131    pub fn get_dns_name(&self) -> &::std::option::Option<::std::string::String> {
132        &self.dns_name
133    }
134    /// <p>The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.</p>
135    pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.ip_address = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.</p>
140    pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.ip_address = input;
142        self
143    }
144    /// <p>The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.</p>
145    pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
146        &self.ip_address
147    }
148    /// <p>The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.</p>
149    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.location = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.</p>
154    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.location = input;
156        self
157    }
158    /// <p>The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.</p>
159    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
160        &self.location
161    }
162    /// Consumes the builder and constructs a [`RegisterComputeInput`](crate::operation::register_compute::RegisterComputeInput).
163    pub fn build(
164        self,
165    ) -> ::std::result::Result<crate::operation::register_compute::RegisterComputeInput, ::aws_smithy_types::error::operation::BuildError> {
166        ::std::result::Result::Ok(crate::operation::register_compute::RegisterComputeInput {
167            fleet_id: self.fleet_id,
168            compute_name: self.compute_name,
169            certificate_path: self.certificate_path,
170            dns_name: self.dns_name,
171            ip_address: self.ip_address,
172            location: self.location,
173        })
174    }
175}
176impl ::std::fmt::Debug for RegisterComputeInputBuilder {
177    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
178        let mut formatter = f.debug_struct("RegisterComputeInputBuilder");
179        formatter.field("fleet_id", &self.fleet_id);
180        formatter.field("compute_name", &self.compute_name);
181        formatter.field("certificate_path", &self.certificate_path);
182        formatter.field("dns_name", &self.dns_name);
183        formatter.field("ip_address", &"*** Sensitive Data Redacted ***");
184        formatter.field("location", &self.location);
185        formatter.finish()
186    }
187}