// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::resume_game_server_group::_resume_game_server_group_output::ResumeGameServerGroupOutputBuilder;
pub use crate::operation::resume_game_server_group::_resume_game_server_group_input::ResumeGameServerGroupInputBuilder;
/// Fluent builder constructing a request to `ResumeGameServerGroup`.
///
/// <p> <b>This operation is used with the GameLift FleetIQ solution and game server groups.</b> </p>
/// <p>Reinstates activity on a game server group after it has been suspended. A game server group might be suspended by the <a href="gamelift/latest/apireference/API_SuspendGameServerGroup.html">SuspendGameServerGroup</a> operation, or it might be suspended involuntarily due to a configuration problem. In the second case, you can manually resume activity on the group once the configuration problem has been resolved. Refer to the game server group status and status reason for more information on why group activity is suspended.</p>
/// <p>To resume activity, specify a game server group ARN and the type of activity to be resumed. If successful, a <code>GameServerGroup</code> object is returned showing that the resumed activity is no longer listed in <code>SuspendedActions</code>. </p>
/// <p> <b>Learn more</b> </p>
/// <p> <a href="https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-intro.html">GameLift FleetIQ Guide</a> </p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ResumeGameServerGroupFluentBuilder {
handle: std::sync::Arc<crate::client::Handle>,
inner: crate::operation::resume_game_server_group::builders::ResumeGameServerGroupInputBuilder,
}
impl ResumeGameServerGroupFluentBuilder {
/// Creates a new `ResumeGameServerGroup`.
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::client::customize::CustomizableOperation<
crate::operation::resume_game_server_group::ResumeGameServerGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<
crate::operation::resume_game_server_group::ResumeGameServerGroupError,
>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::client::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::operation::resume_game_server_group::ResumeGameServerGroupOutput,
aws_smithy_http::result::SdkError<
crate::operation::resume_game_server_group::ResumeGameServerGroupError,
>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>A unique identifier for the game server group. Use either the name or ARN value.</p>
pub fn game_server_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.game_server_group_name(input.into());
self
}
/// <p>A unique identifier for the game server group. Use either the name or ARN value.</p>
pub fn set_game_server_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_game_server_group_name(input);
self
}
/// Appends an item to `ResumeActions`.
///
/// To override the contents of this collection use [`set_resume_actions`](Self::set_resume_actions).
///
/// <p>The activity to resume for this game server group.</p>
pub fn resume_actions(mut self, input: crate::types::GameServerGroupAction) -> Self {
self.inner = self.inner.resume_actions(input);
self
}
/// <p>The activity to resume for this game server group.</p>
pub fn set_resume_actions(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::GameServerGroupAction>>,
) -> Self {
self.inner = self.inner.set_resume_actions(input);
self
}
}