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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBuildOutput {
    /// <p>The newly created build resource, including a unique build IDs and status. </p>
    ///
    /// _Note: This member has been renamed from `build`._
    #[doc(hidden)]
    pub build_value: std::option::Option<crate::types::Build>,
    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>. </p>
    #[doc(hidden)]
    pub upload_credentials: std::option::Option<crate::types::AwsCredentials>,
    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
    #[doc(hidden)]
    pub storage_location: std::option::Option<crate::types::S3Location>,
    _request_id: Option<String>,
}
impl CreateBuildOutput {
    /// <p>The newly created build resource, including a unique build IDs and status. </p>
    ///
    /// _Note: This member has been renamed from `build`._
    pub fn build_value(&self) -> std::option::Option<&crate::types::Build> {
        self.build_value.as_ref()
    }
    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>. </p>
    pub fn upload_credentials(&self) -> std::option::Option<&crate::types::AwsCredentials> {
        self.upload_credentials.as_ref()
    }
    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
    pub fn storage_location(&self) -> std::option::Option<&crate::types::S3Location> {
        self.storage_location.as_ref()
    }
}
impl std::fmt::Debug for CreateBuildOutput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CreateBuildOutput");
        formatter.field("build_value", &self.build_value);
        formatter.field("upload_credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("storage_location", &self.storage_location);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl aws_http::request_id::RequestId for CreateBuildOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateBuildOutput {
    /// Creates a new builder-style object to manufacture [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
    pub fn builder() -> crate::operation::create_build::builders::CreateBuildOutputBuilder {
        crate::operation::create_build::builders::CreateBuildOutputBuilder::default()
    }
}

/// A builder for [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct CreateBuildOutputBuilder {
    pub(crate) build_value: std::option::Option<crate::types::Build>,
    pub(crate) upload_credentials: std::option::Option<crate::types::AwsCredentials>,
    pub(crate) storage_location: std::option::Option<crate::types::S3Location>,
    _request_id: Option<String>,
}
impl CreateBuildOutputBuilder {
    /// <p>The newly created build resource, including a unique build IDs and status. </p>
    pub fn build_value(mut self, input: crate::types::Build) -> Self {
        self.build_value = Some(input);
        self
    }
    /// <p>The newly created build resource, including a unique build IDs and status. </p>
    pub fn set_build(mut self, input: std::option::Option<crate::types::Build>) -> Self {
        self.build_value = input;
        self
    }
    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>. </p>
    pub fn upload_credentials(mut self, input: crate::types::AwsCredentials) -> Self {
        self.upload_credentials = Some(input);
        self
    }
    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>. </p>
    pub fn set_upload_credentials(
        mut self,
        input: std::option::Option<crate::types::AwsCredentials>,
    ) -> Self {
        self.upload_credentials = input;
        self
    }
    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
    pub fn storage_location(mut self, input: crate::types::S3Location) -> Self {
        self.storage_location = Some(input);
        self
    }
    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
    pub fn set_storage_location(
        mut self,
        input: std::option::Option<crate::types::S3Location>,
    ) -> Self {
        self.storage_location = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
    pub fn build(self) -> crate::operation::create_build::CreateBuildOutput {
        crate::operation::create_build::CreateBuildOutput {
            build_value: self.build_value,
            upload_credentials: self.upload_credentials,
            storage_location: self.storage_location,
            _request_id: self._request_id,
        }
    }
}
impl std::fmt::Debug for CreateBuildOutputBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CreateBuildOutputBuilder");
        formatter.field("build_value", &self.build_value);
        formatter.field("upload_credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("storage_location", &self.storage_location);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}