1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetFleetOutput {
6 pub fleet_id: ::std::string::String,
8 pub farm_id: ::std::string::String,
10 pub display_name: ::std::string::String,
14 pub description: ::std::option::Option<::std::string::String>,
18 pub status: crate::types::FleetStatus,
20 pub status_message: ::std::option::Option<::std::string::String>,
22 pub auto_scaling_status: ::std::option::Option<crate::types::AutoScalingStatus>,
24 pub target_worker_count: ::std::option::Option<i32>,
26 pub worker_count: i32,
28 pub min_worker_count: i32,
30 pub max_worker_count: i32,
32 pub configuration: ::std::option::Option<crate::types::FleetConfiguration>,
34 pub host_configuration: ::std::option::Option<crate::types::HostConfiguration>,
36 pub capabilities: ::std::option::Option<crate::types::FleetCapabilities>,
38 pub role_arn: ::std::string::String,
40 pub created_at: ::aws_smithy_types::DateTime,
42 pub created_by: ::std::string::String,
44 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
46 pub updated_by: ::std::option::Option<::std::string::String>,
48 _request_id: Option<String>,
49}
50impl GetFleetOutput {
51 pub fn fleet_id(&self) -> &str {
53 use std::ops::Deref;
54 self.fleet_id.deref()
55 }
56 pub fn farm_id(&self) -> &str {
58 use std::ops::Deref;
59 self.farm_id.deref()
60 }
61 pub fn display_name(&self) -> &str {
65 use std::ops::Deref;
66 self.display_name.deref()
67 }
68 pub fn description(&self) -> ::std::option::Option<&str> {
72 self.description.as_deref()
73 }
74 pub fn status(&self) -> &crate::types::FleetStatus {
76 &self.status
77 }
78 pub fn status_message(&self) -> ::std::option::Option<&str> {
80 self.status_message.as_deref()
81 }
82 pub fn auto_scaling_status(&self) -> ::std::option::Option<&crate::types::AutoScalingStatus> {
84 self.auto_scaling_status.as_ref()
85 }
86 pub fn target_worker_count(&self) -> ::std::option::Option<i32> {
88 self.target_worker_count
89 }
90 pub fn worker_count(&self) -> i32 {
92 self.worker_count
93 }
94 pub fn min_worker_count(&self) -> i32 {
96 self.min_worker_count
97 }
98 pub fn max_worker_count(&self) -> i32 {
100 self.max_worker_count
101 }
102 pub fn configuration(&self) -> ::std::option::Option<&crate::types::FleetConfiguration> {
104 self.configuration.as_ref()
105 }
106 pub fn host_configuration(&self) -> ::std::option::Option<&crate::types::HostConfiguration> {
108 self.host_configuration.as_ref()
109 }
110 pub fn capabilities(&self) -> ::std::option::Option<&crate::types::FleetCapabilities> {
112 self.capabilities.as_ref()
113 }
114 pub fn role_arn(&self) -> &str {
116 use std::ops::Deref;
117 self.role_arn.deref()
118 }
119 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
121 &self.created_at
122 }
123 pub fn created_by(&self) -> &str {
125 use std::ops::Deref;
126 self.created_by.deref()
127 }
128 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
130 self.updated_at.as_ref()
131 }
132 pub fn updated_by(&self) -> ::std::option::Option<&str> {
134 self.updated_by.as_deref()
135 }
136}
137impl ::std::fmt::Debug for GetFleetOutput {
138 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
139 let mut formatter = f.debug_struct("GetFleetOutput");
140 formatter.field("fleet_id", &self.fleet_id);
141 formatter.field("farm_id", &self.farm_id);
142 formatter.field("display_name", &self.display_name);
143 formatter.field("description", &"*** Sensitive Data Redacted ***");
144 formatter.field("status", &self.status);
145 formatter.field("status_message", &self.status_message);
146 formatter.field("auto_scaling_status", &self.auto_scaling_status);
147 formatter.field("target_worker_count", &self.target_worker_count);
148 formatter.field("worker_count", &self.worker_count);
149 formatter.field("min_worker_count", &self.min_worker_count);
150 formatter.field("max_worker_count", &self.max_worker_count);
151 formatter.field("configuration", &self.configuration);
152 formatter.field("host_configuration", &self.host_configuration);
153 formatter.field("capabilities", &self.capabilities);
154 formatter.field("role_arn", &self.role_arn);
155 formatter.field("created_at", &self.created_at);
156 formatter.field("created_by", &self.created_by);
157 formatter.field("updated_at", &self.updated_at);
158 formatter.field("updated_by", &self.updated_by);
159 formatter.field("_request_id", &self._request_id);
160 formatter.finish()
161 }
162}
163impl ::aws_types::request_id::RequestId for GetFleetOutput {
164 fn request_id(&self) -> Option<&str> {
165 self._request_id.as_deref()
166 }
167}
168impl GetFleetOutput {
169 pub fn builder() -> crate::operation::get_fleet::builders::GetFleetOutputBuilder {
171 crate::operation::get_fleet::builders::GetFleetOutputBuilder::default()
172 }
173}
174
175#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
177#[non_exhaustive]
178pub struct GetFleetOutputBuilder {
179 pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
180 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
181 pub(crate) display_name: ::std::option::Option<::std::string::String>,
182 pub(crate) description: ::std::option::Option<::std::string::String>,
183 pub(crate) status: ::std::option::Option<crate::types::FleetStatus>,
184 pub(crate) status_message: ::std::option::Option<::std::string::String>,
185 pub(crate) auto_scaling_status: ::std::option::Option<crate::types::AutoScalingStatus>,
186 pub(crate) target_worker_count: ::std::option::Option<i32>,
187 pub(crate) worker_count: ::std::option::Option<i32>,
188 pub(crate) min_worker_count: ::std::option::Option<i32>,
189 pub(crate) max_worker_count: ::std::option::Option<i32>,
190 pub(crate) configuration: ::std::option::Option<crate::types::FleetConfiguration>,
191 pub(crate) host_configuration: ::std::option::Option<crate::types::HostConfiguration>,
192 pub(crate) capabilities: ::std::option::Option<crate::types::FleetCapabilities>,
193 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
194 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
195 pub(crate) created_by: ::std::option::Option<::std::string::String>,
196 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
197 pub(crate) updated_by: ::std::option::Option<::std::string::String>,
198 _request_id: Option<String>,
199}
200impl GetFleetOutputBuilder {
201 pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.fleet_id = ::std::option::Option::Some(input.into());
205 self
206 }
207 pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.fleet_id = input;
210 self
211 }
212 pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
214 &self.fleet_id
215 }
216 pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219 self.farm_id = ::std::option::Option::Some(input.into());
220 self
221 }
222 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224 self.farm_id = input;
225 self
226 }
227 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
229 &self.farm_id
230 }
231 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236 self.display_name = ::std::option::Option::Some(input.into());
237 self
238 }
239 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.display_name = input;
244 self
245 }
246 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
250 &self.display_name
251 }
252 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256 self.description = ::std::option::Option::Some(input.into());
257 self
258 }
259 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
263 self.description = input;
264 self
265 }
266 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
270 &self.description
271 }
272 pub fn status(mut self, input: crate::types::FleetStatus) -> Self {
275 self.status = ::std::option::Option::Some(input);
276 self
277 }
278 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FleetStatus>) -> Self {
280 self.status = input;
281 self
282 }
283 pub fn get_status(&self) -> &::std::option::Option<crate::types::FleetStatus> {
285 &self.status
286 }
287 pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289 self.status_message = ::std::option::Option::Some(input.into());
290 self
291 }
292 pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.status_message = input;
295 self
296 }
297 pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
299 &self.status_message
300 }
301 pub fn auto_scaling_status(mut self, input: crate::types::AutoScalingStatus) -> Self {
303 self.auto_scaling_status = ::std::option::Option::Some(input);
304 self
305 }
306 pub fn set_auto_scaling_status(mut self, input: ::std::option::Option<crate::types::AutoScalingStatus>) -> Self {
308 self.auto_scaling_status = input;
309 self
310 }
311 pub fn get_auto_scaling_status(&self) -> &::std::option::Option<crate::types::AutoScalingStatus> {
313 &self.auto_scaling_status
314 }
315 pub fn target_worker_count(mut self, input: i32) -> Self {
317 self.target_worker_count = ::std::option::Option::Some(input);
318 self
319 }
320 pub fn set_target_worker_count(mut self, input: ::std::option::Option<i32>) -> Self {
322 self.target_worker_count = input;
323 self
324 }
325 pub fn get_target_worker_count(&self) -> &::std::option::Option<i32> {
327 &self.target_worker_count
328 }
329 pub fn worker_count(mut self, input: i32) -> Self {
332 self.worker_count = ::std::option::Option::Some(input);
333 self
334 }
335 pub fn set_worker_count(mut self, input: ::std::option::Option<i32>) -> Self {
337 self.worker_count = input;
338 self
339 }
340 pub fn get_worker_count(&self) -> &::std::option::Option<i32> {
342 &self.worker_count
343 }
344 pub fn min_worker_count(mut self, input: i32) -> Self {
347 self.min_worker_count = ::std::option::Option::Some(input);
348 self
349 }
350 pub fn set_min_worker_count(mut self, input: ::std::option::Option<i32>) -> Self {
352 self.min_worker_count = input;
353 self
354 }
355 pub fn get_min_worker_count(&self) -> &::std::option::Option<i32> {
357 &self.min_worker_count
358 }
359 pub fn max_worker_count(mut self, input: i32) -> Self {
362 self.max_worker_count = ::std::option::Option::Some(input);
363 self
364 }
365 pub fn set_max_worker_count(mut self, input: ::std::option::Option<i32>) -> Self {
367 self.max_worker_count = input;
368 self
369 }
370 pub fn get_max_worker_count(&self) -> &::std::option::Option<i32> {
372 &self.max_worker_count
373 }
374 pub fn configuration(mut self, input: crate::types::FleetConfiguration) -> Self {
377 self.configuration = ::std::option::Option::Some(input);
378 self
379 }
380 pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::FleetConfiguration>) -> Self {
382 self.configuration = input;
383 self
384 }
385 pub fn get_configuration(&self) -> &::std::option::Option<crate::types::FleetConfiguration> {
387 &self.configuration
388 }
389 pub fn host_configuration(mut self, input: crate::types::HostConfiguration) -> Self {
391 self.host_configuration = ::std::option::Option::Some(input);
392 self
393 }
394 pub fn set_host_configuration(mut self, input: ::std::option::Option<crate::types::HostConfiguration>) -> Self {
396 self.host_configuration = input;
397 self
398 }
399 pub fn get_host_configuration(&self) -> &::std::option::Option<crate::types::HostConfiguration> {
401 &self.host_configuration
402 }
403 pub fn capabilities(mut self, input: crate::types::FleetCapabilities) -> Self {
405 self.capabilities = ::std::option::Option::Some(input);
406 self
407 }
408 pub fn set_capabilities(mut self, input: ::std::option::Option<crate::types::FleetCapabilities>) -> Self {
410 self.capabilities = input;
411 self
412 }
413 pub fn get_capabilities(&self) -> &::std::option::Option<crate::types::FleetCapabilities> {
415 &self.capabilities
416 }
417 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
420 self.role_arn = ::std::option::Option::Some(input.into());
421 self
422 }
423 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
425 self.role_arn = input;
426 self
427 }
428 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
430 &self.role_arn
431 }
432 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
435 self.created_at = ::std::option::Option::Some(input);
436 self
437 }
438 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
440 self.created_at = input;
441 self
442 }
443 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
445 &self.created_at
446 }
447 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
450 self.created_by = ::std::option::Option::Some(input.into());
451 self
452 }
453 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
455 self.created_by = input;
456 self
457 }
458 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
460 &self.created_by
461 }
462 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
464 self.updated_at = ::std::option::Option::Some(input);
465 self
466 }
467 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
469 self.updated_at = input;
470 self
471 }
472 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
474 &self.updated_at
475 }
476 pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478 self.updated_by = ::std::option::Option::Some(input.into());
479 self
480 }
481 pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
483 self.updated_by = input;
484 self
485 }
486 pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
488 &self.updated_by
489 }
490 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
491 self._request_id = Some(request_id.into());
492 self
493 }
494
495 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
496 self._request_id = request_id;
497 self
498 }
499 pub fn build(self) -> ::std::result::Result<crate::operation::get_fleet::GetFleetOutput, ::aws_smithy_types::error::operation::BuildError> {
512 ::std::result::Result::Ok(crate::operation::get_fleet::GetFleetOutput {
513 fleet_id: self.fleet_id.ok_or_else(|| {
514 ::aws_smithy_types::error::operation::BuildError::missing_field(
515 "fleet_id",
516 "fleet_id was not specified but it is required when building GetFleetOutput",
517 )
518 })?,
519 farm_id: self.farm_id.ok_or_else(|| {
520 ::aws_smithy_types::error::operation::BuildError::missing_field(
521 "farm_id",
522 "farm_id was not specified but it is required when building GetFleetOutput",
523 )
524 })?,
525 display_name: self.display_name.ok_or_else(|| {
526 ::aws_smithy_types::error::operation::BuildError::missing_field(
527 "display_name",
528 "display_name was not specified but it is required when building GetFleetOutput",
529 )
530 })?,
531 description: self.description,
532 status: self.status.ok_or_else(|| {
533 ::aws_smithy_types::error::operation::BuildError::missing_field(
534 "status",
535 "status was not specified but it is required when building GetFleetOutput",
536 )
537 })?,
538 status_message: self.status_message,
539 auto_scaling_status: self.auto_scaling_status,
540 target_worker_count: self.target_worker_count,
541 worker_count: self.worker_count.ok_or_else(|| {
542 ::aws_smithy_types::error::operation::BuildError::missing_field(
543 "worker_count",
544 "worker_count was not specified but it is required when building GetFleetOutput",
545 )
546 })?,
547 min_worker_count: self.min_worker_count.ok_or_else(|| {
548 ::aws_smithy_types::error::operation::BuildError::missing_field(
549 "min_worker_count",
550 "min_worker_count was not specified but it is required when building GetFleetOutput",
551 )
552 })?,
553 max_worker_count: self.max_worker_count.ok_or_else(|| {
554 ::aws_smithy_types::error::operation::BuildError::missing_field(
555 "max_worker_count",
556 "max_worker_count was not specified but it is required when building GetFleetOutput",
557 )
558 })?,
559 configuration: self.configuration,
560 host_configuration: self.host_configuration,
561 capabilities: self.capabilities,
562 role_arn: self.role_arn.ok_or_else(|| {
563 ::aws_smithy_types::error::operation::BuildError::missing_field(
564 "role_arn",
565 "role_arn was not specified but it is required when building GetFleetOutput",
566 )
567 })?,
568 created_at: self.created_at.ok_or_else(|| {
569 ::aws_smithy_types::error::operation::BuildError::missing_field(
570 "created_at",
571 "created_at was not specified but it is required when building GetFleetOutput",
572 )
573 })?,
574 created_by: self.created_by.ok_or_else(|| {
575 ::aws_smithy_types::error::operation::BuildError::missing_field(
576 "created_by",
577 "created_by was not specified but it is required when building GetFleetOutput",
578 )
579 })?,
580 updated_at: self.updated_at,
581 updated_by: self.updated_by,
582 _request_id: self._request_id,
583 })
584 }
585}
586impl ::std::fmt::Debug for GetFleetOutputBuilder {
587 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
588 let mut formatter = f.debug_struct("GetFleetOutputBuilder");
589 formatter.field("fleet_id", &self.fleet_id);
590 formatter.field("farm_id", &self.farm_id);
591 formatter.field("display_name", &self.display_name);
592 formatter.field("description", &"*** Sensitive Data Redacted ***");
593 formatter.field("status", &self.status);
594 formatter.field("status_message", &self.status_message);
595 formatter.field("auto_scaling_status", &self.auto_scaling_status);
596 formatter.field("target_worker_count", &self.target_worker_count);
597 formatter.field("worker_count", &self.worker_count);
598 formatter.field("min_worker_count", &self.min_worker_count);
599 formatter.field("max_worker_count", &self.max_worker_count);
600 formatter.field("configuration", &self.configuration);
601 formatter.field("host_configuration", &self.host_configuration);
602 formatter.field("capabilities", &self.capabilities);
603 formatter.field("role_arn", &self.role_arn);
604 formatter.field("created_at", &self.created_at);
605 formatter.field("created_by", &self.created_by);
606 formatter.field("updated_at", &self.updated_at);
607 formatter.field("updated_by", &self.updated_by);
608 formatter.field("_request_id", &self._request_id);
609 formatter.finish()
610 }
611}