aws-sdk-gamelift 0.26.0

AWS SDK for Amazon GameLift
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::register_compute::_register_compute_output::RegisterComputeOutputBuilder;

pub use crate::operation::register_compute::_register_compute_input::RegisterComputeInputBuilder;

/// Fluent builder constructing a request to `RegisterCompute`.
///
/// <p>Registers your compute resources in a fleet you previously created. After you register a compute to your fleet, you can monitor and manage your compute using GameLift. The operation returns the compute resource containing SDK endpoint you can use to connect your game server to GameLift.</p>
/// <p> <b>Learn more</b> </p>
/// <ul>
/// <li> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-anywhere.html">Create an Anywhere fleet</a> </p> </li>
/// <li> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing.html">Test your integration</a> </p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct RegisterComputeFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::register_compute::builders::RegisterComputeInputBuilder,
}
impl RegisterComputeFluentBuilder {
    /// Creates a new `RegisterCompute`.
    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::register_compute::RegisterCompute,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<crate::operation::register_compute::RegisterComputeError>,
    > {
        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::register_compute::RegisterComputeOutput,
        aws_smithy_http::result::SdkError<crate::operation::register_compute::RegisterComputeError>,
    > {
        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 fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
    pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.fleet_id(input.into());
        self
    }
    /// <p>A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.</p>
    pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_fleet_id(input);
        self
    }
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    pub fn compute_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.compute_name(input.into());
        self
    }
    /// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
    pub fn set_compute_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_compute_name(input);
        self
    }
    /// <p>The path to the TLS certificate on your compute resource. The path and certificate are not validated by GameLift.</p>
    pub fn certificate_path(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.certificate_path(input.into());
        self
    }
    /// <p>The path to the TLS certificate on your compute resource. The path and certificate are not validated by GameLift.</p>
    pub fn set_certificate_path(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_certificate_path(input);
        self
    }
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.dns_name(input.into());
        self
    }
    /// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_dns_name(input);
        self
    }
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.ip_address(input.into());
        self
    }
    /// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
    pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_ip_address(input);
        self
    }
    /// <p>The name of the custom location you added to the fleet you are registering this compute resource to.</p>
    pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.location(input.into());
        self
    }
    /// <p>The name of the custom location you added to the fleet you are registering this compute resource to.</p>
    pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_location(input);
        self
    }
}