aws_sdk_gamelift/operation/update_alias/
_update_alias_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 UpdateAliasInput {
6    /// <p>A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.</p>
7    pub alias_id: ::std::option::Option<::std::string::String>,
8    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>A human-readable description of the alias.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
13    pub routing_strategy: ::std::option::Option<crate::types::RoutingStrategy>,
14}
15impl UpdateAliasInput {
16    /// <p>A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.</p>
17    pub fn alias_id(&self) -> ::std::option::Option<&str> {
18        self.alias_id.as_deref()
19    }
20    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>A human-readable description of the alias.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
29    pub fn routing_strategy(&self) -> ::std::option::Option<&crate::types::RoutingStrategy> {
30        self.routing_strategy.as_ref()
31    }
32}
33impl UpdateAliasInput {
34    /// Creates a new builder-style object to manufacture [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
35    pub fn builder() -> crate::operation::update_alias::builders::UpdateAliasInputBuilder {
36        crate::operation::update_alias::builders::UpdateAliasInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateAliasInputBuilder {
44    pub(crate) alias_id: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) description: ::std::option::Option<::std::string::String>,
47    pub(crate) routing_strategy: ::std::option::Option<crate::types::RoutingStrategy>,
48}
49impl UpdateAliasInputBuilder {
50    /// <p>A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.</p>
51    /// This field is required.
52    pub fn alias_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.alias_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.</p>
57    pub fn set_alias_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.alias_id = input;
59        self
60    }
61    /// <p>A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.</p>
62    pub fn get_alias_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.alias_id
64    }
65    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>A human-readable description of the alias.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A human-readable description of the alias.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>A human-readable description of the alias.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
94    pub fn routing_strategy(mut self, input: crate::types::RoutingStrategy) -> Self {
95        self.routing_strategy = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
99    pub fn set_routing_strategy(mut self, input: ::std::option::Option<crate::types::RoutingStrategy>) -> Self {
100        self.routing_strategy = input;
101        self
102    }
103    /// <p>The routing configuration, including routing type and fleet target, for the alias.</p>
104    pub fn get_routing_strategy(&self) -> &::std::option::Option<crate::types::RoutingStrategy> {
105        &self.routing_strategy
106    }
107    /// Consumes the builder and constructs a [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
108    pub fn build(self) -> ::std::result::Result<crate::operation::update_alias::UpdateAliasInput, ::aws_smithy_types::error::operation::BuildError> {
109        ::std::result::Result::Ok(crate::operation::update_alias::UpdateAliasInput {
110            alias_id: self.alias_id,
111            name: self.name,
112            description: self.description,
113            routing_strategy: self.routing_strategy,
114        })
115    }
116}