aws_sdk_gamelift/operation/update_game_session_queue/_update_game_session_queue_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 UpdateGameSessionQueueInput {
6    /// <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p>
9    pub timeout_in_seconds: ::std::option::Option<i32>,
10    /// <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
11    pub player_latency_policies: ::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>>,
12    /// <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
13    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>>,
14    /// <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
15    pub filter_configuration: ::std::option::Option<crate::types::FilterConfiguration>,
16    /// <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
17    pub priority_configuration: ::std::option::Option<crate::types::PriorityConfiguration>,
18    /// <p>Information to be added to all events that are related to this game session queue.</p>
19    pub custom_event_data: ::std::option::Option<::std::string::String>,
20    /// <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</p>
21    pub notification_target: ::std::option::Option<::std::string::String>,
22}
23impl UpdateGameSessionQueueInput {
24    /// <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p>
29    pub fn timeout_in_seconds(&self) -> ::std::option::Option<i32> {
30        self.timeout_in_seconds
31    }
32    /// <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
33    ///
34    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.player_latency_policies.is_none()`.
35    pub fn player_latency_policies(&self) -> &[crate::types::PlayerLatencyPolicy] {
36        self.player_latency_policies.as_deref().unwrap_or_default()
37    }
38    /// <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
39    ///
40    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destinations.is_none()`.
41    pub fn destinations(&self) -> &[crate::types::GameSessionQueueDestination] {
42        self.destinations.as_deref().unwrap_or_default()
43    }
44    /// <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
45    pub fn filter_configuration(&self) -> ::std::option::Option<&crate::types::FilterConfiguration> {
46        self.filter_configuration.as_ref()
47    }
48    /// <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
49    pub fn priority_configuration(&self) -> ::std::option::Option<&crate::types::PriorityConfiguration> {
50        self.priority_configuration.as_ref()
51    }
52    /// <p>Information to be added to all events that are related to this game session queue.</p>
53    pub fn custom_event_data(&self) -> ::std::option::Option<&str> {
54        self.custom_event_data.as_deref()
55    }
56    /// <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</p>
57    pub fn notification_target(&self) -> ::std::option::Option<&str> {
58        self.notification_target.as_deref()
59    }
60}
61impl UpdateGameSessionQueueInput {
62    /// Creates a new builder-style object to manufacture [`UpdateGameSessionQueueInput`](crate::operation::update_game_session_queue::UpdateGameSessionQueueInput).
63    pub fn builder() -> crate::operation::update_game_session_queue::builders::UpdateGameSessionQueueInputBuilder {
64        crate::operation::update_game_session_queue::builders::UpdateGameSessionQueueInputBuilder::default()
65    }
66}
67
68/// A builder for [`UpdateGameSessionQueueInput`](crate::operation::update_game_session_queue::UpdateGameSessionQueueInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct UpdateGameSessionQueueInputBuilder {
72    pub(crate) name: ::std::option::Option<::std::string::String>,
73    pub(crate) timeout_in_seconds: ::std::option::Option<i32>,
74    pub(crate) player_latency_policies: ::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>>,
75    pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>>,
76    pub(crate) filter_configuration: ::std::option::Option<crate::types::FilterConfiguration>,
77    pub(crate) priority_configuration: ::std::option::Option<crate::types::PriorityConfiguration>,
78    pub(crate) custom_event_data: ::std::option::Option<::std::string::String>,
79    pub(crate) notification_target: ::std::option::Option<::std::string::String>,
80}
81impl UpdateGameSessionQueueInputBuilder {
82    /// <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.</p>
83    /// This field is required.
84    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.name = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.</p>
89    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.name = input;
91        self
92    }
93    /// <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.</p>
94    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
95        &self.name
96    }
97    /// <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p>
98    pub fn timeout_in_seconds(mut self, input: i32) -> Self {
99        self.timeout_in_seconds = ::std::option::Option::Some(input);
100        self
101    }
102    /// <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p>
103    pub fn set_timeout_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
104        self.timeout_in_seconds = input;
105        self
106    }
107    /// <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p>
108    pub fn get_timeout_in_seconds(&self) -> &::std::option::Option<i32> {
109        &self.timeout_in_seconds
110    }
111    /// Appends an item to `player_latency_policies`.
112    ///
113    /// To override the contents of this collection use [`set_player_latency_policies`](Self::set_player_latency_policies).
114    ///
115    /// <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
116    pub fn player_latency_policies(mut self, input: crate::types::PlayerLatencyPolicy) -> Self {
117        let mut v = self.player_latency_policies.unwrap_or_default();
118        v.push(input);
119        self.player_latency_policies = ::std::option::Option::Some(v);
120        self
121    }
122    /// <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
123    pub fn set_player_latency_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>>) -> Self {
124        self.player_latency_policies = input;
125        self
126    }
127    /// <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
128    pub fn get_player_latency_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>> {
129        &self.player_latency_policies
130    }
131    /// Appends an item to `destinations`.
132    ///
133    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
134    ///
135    /// <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
136    pub fn destinations(mut self, input: crate::types::GameSessionQueueDestination) -> Self {
137        let mut v = self.destinations.unwrap_or_default();
138        v.push(input);
139        self.destinations = ::std::option::Option::Some(v);
140        self
141    }
142    /// <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
143    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>>) -> Self {
144        self.destinations = input;
145        self
146    }
147    /// <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
148    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>> {
149        &self.destinations
150    }
151    /// <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
152    pub fn filter_configuration(mut self, input: crate::types::FilterConfiguration) -> Self {
153        self.filter_configuration = ::std::option::Option::Some(input);
154        self
155    }
156    /// <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
157    pub fn set_filter_configuration(mut self, input: ::std::option::Option<crate::types::FilterConfiguration>) -> Self {
158        self.filter_configuration = input;
159        self
160    }
161    /// <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
162    pub fn get_filter_configuration(&self) -> &::std::option::Option<crate::types::FilterConfiguration> {
163        &self.filter_configuration
164    }
165    /// <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
166    pub fn priority_configuration(mut self, input: crate::types::PriorityConfiguration) -> Self {
167        self.priority_configuration = ::std::option::Option::Some(input);
168        self
169    }
170    /// <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
171    pub fn set_priority_configuration(mut self, input: ::std::option::Option<crate::types::PriorityConfiguration>) -> Self {
172        self.priority_configuration = input;
173        self
174    }
175    /// <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
176    pub fn get_priority_configuration(&self) -> &::std::option::Option<crate::types::PriorityConfiguration> {
177        &self.priority_configuration
178    }
179    /// <p>Information to be added to all events that are related to this game session queue.</p>
180    pub fn custom_event_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.custom_event_data = ::std::option::Option::Some(input.into());
182        self
183    }
184    /// <p>Information to be added to all events that are related to this game session queue.</p>
185    pub fn set_custom_event_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.custom_event_data = input;
187        self
188    }
189    /// <p>Information to be added to all events that are related to this game session queue.</p>
190    pub fn get_custom_event_data(&self) -> &::std::option::Option<::std::string::String> {
191        &self.custom_event_data
192    }
193    /// <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</p>
194    pub fn notification_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.notification_target = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</p>
199    pub fn set_notification_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.notification_target = input;
201        self
202    }
203    /// <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</p>
204    pub fn get_notification_target(&self) -> &::std::option::Option<::std::string::String> {
205        &self.notification_target
206    }
207    /// Consumes the builder and constructs a [`UpdateGameSessionQueueInput`](crate::operation::update_game_session_queue::UpdateGameSessionQueueInput).
208    pub fn build(
209        self,
210    ) -> ::std::result::Result<
211        crate::operation::update_game_session_queue::UpdateGameSessionQueueInput,
212        ::aws_smithy_types::error::operation::BuildError,
213    > {
214        ::std::result::Result::Ok(crate::operation::update_game_session_queue::UpdateGameSessionQueueInput {
215            name: self.name,
216            timeout_in_seconds: self.timeout_in_seconds,
217            player_latency_policies: self.player_latency_policies,
218            destinations: self.destinations,
219            filter_configuration: self.filter_configuration,
220            priority_configuration: self.priority_configuration,
221            custom_event_data: self.custom_event_data,
222            notification_target: self.notification_target,
223        })
224    }
225}