aws_sdk_deadline/operation/delete_fleet/
_delete_fleet_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 DeleteFleetInput {
6    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The farm ID of the farm to remove from the fleet.</p>
9    pub farm_id: ::std::option::Option<::std::string::String>,
10    /// <p>The fleet ID of the fleet to delete.</p>
11    pub fleet_id: ::std::option::Option<::std::string::String>,
12}
13impl DeleteFleetInput {
14    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
15    pub fn client_token(&self) -> ::std::option::Option<&str> {
16        self.client_token.as_deref()
17    }
18    /// <p>The farm ID of the farm to remove from the fleet.</p>
19    pub fn farm_id(&self) -> ::std::option::Option<&str> {
20        self.farm_id.as_deref()
21    }
22    /// <p>The fleet ID of the fleet to delete.</p>
23    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
24        self.fleet_id.as_deref()
25    }
26}
27impl DeleteFleetInput {
28    /// Creates a new builder-style object to manufacture [`DeleteFleetInput`](crate::operation::delete_fleet::DeleteFleetInput).
29    pub fn builder() -> crate::operation::delete_fleet::builders::DeleteFleetInputBuilder {
30        crate::operation::delete_fleet::builders::DeleteFleetInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteFleetInput`](crate::operation::delete_fleet::DeleteFleetInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteFleetInputBuilder {
38    pub(crate) client_token: ::std::option::Option<::std::string::String>,
39    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
40    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
41}
42impl DeleteFleetInputBuilder {
43    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
44    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.client_token = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
49    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.client_token = input;
51        self
52    }
53    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
54    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
55        &self.client_token
56    }
57    /// <p>The farm ID of the farm to remove from the fleet.</p>
58    /// This field is required.
59    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.farm_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The farm ID of the farm to remove from the fleet.</p>
64    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.farm_id = input;
66        self
67    }
68    /// <p>The farm ID of the farm to remove from the fleet.</p>
69    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.farm_id
71    }
72    /// <p>The fleet ID of the fleet to delete.</p>
73    /// This field is required.
74    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.fleet_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The fleet ID of the fleet to delete.</p>
79    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.fleet_id = input;
81        self
82    }
83    /// <p>The fleet ID of the fleet to delete.</p>
84    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.fleet_id
86    }
87    /// Consumes the builder and constructs a [`DeleteFleetInput`](crate::operation::delete_fleet::DeleteFleetInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::delete_fleet::DeleteFleetInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::delete_fleet::DeleteFleetInput {
90            client_token: self.client_token,
91            farm_id: self.farm_id,
92            fleet_id: self.fleet_id,
93        })
94    }
95}