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>
129 pub fn timeout_in_seconds(mut self, input: i32) -> Self {
130 self.inner = self.inner.timeout_in_seconds(input);
131 self
132 }
133 /// <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>
134 pub fn set_timeout_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
135 self.inner = self.inner.set_timeout_in_seconds(input);
136 self
137 }
138 /// <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>
139 pub fn get_timeout_in_seconds(&self) -> &::std::option::Option<i32> {
140 self.inner.get_timeout_in_seconds()
141 }
142 ///
143 /// Appends an item to `PlayerLatencyPolicies`.
144 ///
145 /// To override the contents of this collection use [`set_player_latency_policies`](Self::set_player_latency_policies).
146 ///
147 /// <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>
148 pub fn player_latency_policies(mut self, input: crate::types::PlayerLatencyPolicy) -> Self {
149 self.inner = self.inner.player_latency_policies(input);
150 self
151 }
152 /// <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>
153 pub fn set_player_latency_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>>) -> Self {
154 self.inner = self.inner.set_player_latency_policies(input);
155 self
156 }
157 /// <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>
158 pub fn get_player_latency_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlayerLatencyPolicy>> {
159 self.inner.get_player_latency_policies()
160 }
161 ///
162 /// Appends an item to `Destinations`.
163 ///
164 /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
165 ///
166 /// <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>
167 pub fn destinations(mut self, input: crate::types::GameSessionQueueDestination) -> Self {
168 self.inner = self.inner.destinations(input);
169 self
170 }
171 /// <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>
172 pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>>) -> Self {
173 self.inner = self.inner.set_destinations(input);
174 self
175 }
176 /// <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>
177 pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GameSessionQueueDestination>> {
178 self.inner.get_destinations()
179 }
180 /// <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>
181 pub fn filter_configuration(mut self, input: crate::types::FilterConfiguration) -> Self {
182 self.inner = self.inner.filter_configuration(input);
183 self
184 }
185 /// <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>
186 pub fn set_filter_configuration(mut self, input: ::std::option::Option<crate::types::FilterConfiguration>) -> Self {
187 self.inner = self.inner.set_filter_configuration(input);
188 self
189 }
190 /// <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>
191 pub fn get_filter_configuration(&self) -> &::std::option::Option<crate::types::FilterConfiguration> {
192 self.inner.get_filter_configuration()
193 }
194 /// <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>
195 pub fn priority_configuration(mut self, input: crate::types::PriorityConfiguration) -> Self {
196 self.inner = self.inner.priority_configuration(input);
197 self
198 }
199 /// <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>
200 pub fn set_priority_configuration(mut self, input: ::std::option::Option<crate::types::PriorityConfiguration>) -> Self {
201 self.inner = self.inner.set_priority_configuration(input);
202 self
203 }
204 /// <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>
205 pub fn get_priority_configuration(&self) -> &::std::option::Option<crate::types::PriorityConfiguration> {
206 self.inner.get_priority_configuration()
207 }
208 /// <p>Information to be added to all events that are related to this game session queue.</p>
209 pub fn custom_event_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210 self.inner = self.inner.custom_event_data(input.into());
211 self
212 }
213 /// <p>Information to be added to all events that are related to this game session queue.</p>
214 pub fn set_custom_event_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215 self.inner = self.inner.set_custom_event_data(input);
216 self
217 }
218 /// <p>Information to be added to all events that are related to this game session queue.</p>
219 pub fn get_custom_event_data(&self) -> &::std::option::Option<::std::string::String> {
220 self.inner.get_custom_event_data()
221 }
222 /// <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>
223 pub fn notification_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224 self.inner = self.inner.notification_target(input.into());
225 self
226 }
227 /// <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>
228 pub fn set_notification_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229 self.inner = self.inner.set_notification_target(input);
230 self
231 }
232 /// <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>
233 pub fn get_notification_target(&self) -> &::std::option::Option<::std::string::String> {
234 self.inner.get_notification_target()
235 }
236}