aws-sdk-codebuild 1.122.0

AWS SDK for AWS CodeBuild
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 StartSandboxInput {
    /// <p>The CodeBuild project name.</p>
    pub project_name: ::std::option::Option<::std::string::String>,
    /// <p>A unique client token.</p>
    pub idempotency_token: ::std::option::Option<::std::string::String>,
}
impl StartSandboxInput {
    /// <p>The CodeBuild project name.</p>
    pub fn project_name(&self) -> ::std::option::Option<&str> {
        self.project_name.as_deref()
    }
    /// <p>A unique client token.</p>
    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
        self.idempotency_token.as_deref()
    }
}
impl ::std::fmt::Debug for StartSandboxInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartSandboxInput");
        formatter.field("project_name", &self.project_name);
        formatter.field("idempotency_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl StartSandboxInput {
    /// Creates a new builder-style object to manufacture [`StartSandboxInput`](crate::operation::start_sandbox::StartSandboxInput).
    pub fn builder() -> crate::operation::start_sandbox::builders::StartSandboxInputBuilder {
        crate::operation::start_sandbox::builders::StartSandboxInputBuilder::default()
    }
}

/// A builder for [`StartSandboxInput`](crate::operation::start_sandbox::StartSandboxInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartSandboxInputBuilder {
    pub(crate) project_name: ::std::option::Option<::std::string::String>,
    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
}
impl StartSandboxInputBuilder {
    /// <p>The CodeBuild project name.</p>
    pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CodeBuild project name.</p>
    pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_name = input;
        self
    }
    /// <p>The CodeBuild project name.</p>
    pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_name
    }
    /// <p>A unique client token.</p>
    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.idempotency_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique client token.</p>
    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.idempotency_token = input;
        self
    }
    /// <p>A unique client token.</p>
    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.idempotency_token
    }
    /// Consumes the builder and constructs a [`StartSandboxInput`](crate::operation::start_sandbox::StartSandboxInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_sandbox::StartSandboxInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_sandbox::StartSandboxInput {
            project_name: self.project_name,
            idempotency_token: self.idempotency_token,
        })
    }
}
impl ::std::fmt::Debug for StartSandboxInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartSandboxInputBuilder");
        formatter.field("project_name", &self.project_name);
        formatter.field("idempotency_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}