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