Skip to main content

aws_sdk_gamelift/operation/update_game_session_queue/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_game_session_queue::_update_game_session_queue_output::UpdateGameSessionQueueOutputBuilder;
3
4pub use crate::operation::update_game_session_queue::_update_game_session_queue_input::UpdateGameSessionQueueInputBuilder;
5
6impl crate::operation::update_game_session_queue::builders::UpdateGameSessionQueueInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_game_session_queue::UpdateGameSessionQueueOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_game_session_queue::UpdateGameSessionQueueError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_game_session_queue();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateGameSessionQueue`.
24///
25/// <p><b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p>
26/// <p>Updates the configuration of a game session queue, which determines how the queue processes new game session requests. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.</p>
27/// <p><b>Learn more</b></p>
28/// <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html"> Using Multi-Region Queues</a></p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateGameSessionQueueFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::update_game_session_queue::builders::UpdateGameSessionQueueInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::update_game_session_queue::UpdateGameSessionQueueOutput,
38        crate::operation::update_game_session_queue::UpdateGameSessionQueueError,
39    > for UpdateGameSessionQueueFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::update_game_session_queue::UpdateGameSessionQueueOutput,
47            crate::operation::update_game_session_queue::UpdateGameSessionQueueError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl UpdateGameSessionQueueFluentBuilder {
54    /// Creates a new `UpdateGameSessionQueueFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the UpdateGameSessionQueue as a reference.
63    pub fn as_input(&self) -> &crate::operation::update_game_session_queue::builders::UpdateGameSessionQueueInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::update_game_session_queue::UpdateGameSessionQueueOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::update_game_session_queue::UpdateGameSessionQueueError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::update_game_session_queue::UpdateGameSessionQueue::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::update_game_session_queue::UpdateGameSessionQueue::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::update_game_session_queue::UpdateGameSessionQueueOutput,
100        crate::operation::update_game_session_queue::UpdateGameSessionQueueError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <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>
115    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.inner = self.inner.name(input.into());
117        self
118    }
119    /// <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>
120    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.inner = self.inner.set_name(input);
122        self
123    }
124    /// <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>
125    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_name()
127    }
128    /// <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><note>
129    /// <p>The minimum value is 10 and the maximum value is 600.</p>
130    /// </note>
131    pub fn timeout_in_seconds(mut self, input: i32) -> Self {
132        self.inner = self.inner.timeout_in_seconds(input);
133        self
134    }
135    /// <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><note>
136    /// <p>The minimum value is 10 and the maximum value is 600.</p>
137    /// </note>
138    pub fn set_timeout_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
139        self.inner = self.inner.set_timeout_in_seconds(input);
140        self
141    }
142    /// <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><note>
143    /// <p>The minimum value is 10 and the maximum value is 600.</p>
144    /// </note>
145    pub fn get_timeout_in_seconds(&self) -> &::std::option::Option<i32> {
146        self.inner.get_timeout_in_seconds()
147    }
148    ///
149    /// Appends an item to `PlayerLatencyPolicies`.
150    ///
151    /// To override the contents of this collection use [`set_player_latency_policies`](Self::set_player_latency_policies).
152    ///
153    /// <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>
154    pub fn player_latency_policies(mut self, input: crate::types::PlayerLatencyPolicy) -> Self {
155        self.inner = self.inner.player_latency_policies(input);
156        self
157    }
158    /// <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>
159    pub fn set_player_latency_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>>) -> Self {
160        self.inner = self.inner.set_player_latency_policies(input);
161        self
162    }
163    /// <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>
164    pub fn get_player_latency_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>> {
165        self.inner.get_player_latency_policies()
166    }
167    ///
168    /// Appends an item to `Destinations`.
169    ///
170    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
171    ///
172    /// <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>
173    pub fn destinations(mut self, input: crate::types::GameSessionQueueDestination) -> Self {
174        self.inner = self.inner.destinations(input);
175        self
176    }
177    /// <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>
178    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>>) -> Self {
179        self.inner = self.inner.set_destinations(input);
180        self
181    }
182    /// <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>
183    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>> {
184        self.inner.get_destinations()
185    }
186    /// <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>
187    pub fn filter_configuration(mut self, input: crate::types::FilterConfiguration) -> Self {
188        self.inner = self.inner.filter_configuration(input);
189        self
190    }
191    /// <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>
192    pub fn set_filter_configuration(mut self, input: ::std::option::Option<crate::types::FilterConfiguration>) -> Self {
193        self.inner = self.inner.set_filter_configuration(input);
194        self
195    }
196    /// <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>
197    pub fn get_filter_configuration(&self) -> &::std::option::Option<crate::types::FilterConfiguration> {
198        self.inner.get_filter_configuration()
199    }
200    /// <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>
201    pub fn priority_configuration(mut self, input: crate::types::PriorityConfiguration) -> Self {
202        self.inner = self.inner.priority_configuration(input);
203        self
204    }
205    /// <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>
206    pub fn set_priority_configuration(mut self, input: ::std::option::Option<crate::types::PriorityConfiguration>) -> Self {
207        self.inner = self.inner.set_priority_configuration(input);
208        self
209    }
210    /// <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>
211    pub fn get_priority_configuration(&self) -> &::std::option::Option<crate::types::PriorityConfiguration> {
212        self.inner.get_priority_configuration()
213    }
214    /// <p>Information to be added to all events that are related to this game session queue.</p>
215    pub fn custom_event_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216        self.inner = self.inner.custom_event_data(input.into());
217        self
218    }
219    /// <p>Information to be added to all events that are related to this game session queue.</p>
220    pub fn set_custom_event_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.inner = self.inner.set_custom_event_data(input);
222        self
223    }
224    /// <p>Information to be added to all events that are related to this game session queue.</p>
225    pub fn get_custom_event_data(&self) -> &::std::option::Option<::std::string::String> {
226        self.inner.get_custom_event_data()
227    }
228    /// <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>
229    pub fn notification_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230        self.inner = self.inner.notification_target(input.into());
231        self
232    }
233    /// <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>
234    pub fn set_notification_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235        self.inner = self.inner.set_notification_target(input);
236        self
237    }
238    /// <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>
239    pub fn get_notification_target(&self) -> &::std::option::Option<::std::string::String> {
240        self.inner.get_notification_target()
241    }
242}