aws-sdk-gamelift 1.119.0

AWS SDK for Amazon GameLift
Documentation
// 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_input::ResumeGameServerGroupInputBuilder;

pub use crate::operation::resume_game_server_group::_resume_game_server_group_output::ResumeGameServerGroupOutputBuilder;

impl crate::operation::resume_game_server_group::builders::ResumeGameServerGroupInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::resume_game_server_group::ResumeGameServerGroupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::resume_game_server_group::ResumeGameServerGroupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.resume_game_server_group();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ResumeGameServerGroup`.
///
/// <p><b>This API works with the following fleet types:</b> EC2 (FleetIQ)</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">Amazon GameLift Servers 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,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::resume_game_server_group::ResumeGameServerGroupOutput,
        crate::operation::resume_game_server_group::ResumeGameServerGroupError,
    > for ResumeGameServerGroupFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::resume_game_server_group::ResumeGameServerGroupOutput,
            crate::operation::resume_game_server_group::ResumeGameServerGroupError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ResumeGameServerGroupFluentBuilder {
    /// Creates a new `ResumeGameServerGroupFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the ResumeGameServerGroup as a reference.
    pub fn as_input(&self) -> &crate::operation::resume_game_server_group::builders::ResumeGameServerGroupInputBuilder {
        &self.inner
    }
    /// 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_runtime_api::client::result::SdkError<
            crate::operation::resume_game_server_group::ResumeGameServerGroupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::resume_game_server_group::ResumeGameServerGroup::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::resume_game_server_group::ResumeGameServerGroup::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::resume_game_server_group::ResumeGameServerGroupOutput,
        crate::operation::resume_game_server_group::ResumeGameServerGroupError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <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 ::std::convert::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
    }
    /// <p>A unique identifier for the game server group. Use either the name or ARN value.</p>
    pub fn get_game_server_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_game_server_group_name()
    }
    ///
    /// 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
    }
    /// <p>The activity to resume for this game server group.</p>
    pub fn get_resume_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GameServerGroupAction>> {
        self.inner.get_resume_actions()
    }
}