aws-sdk-robomaker 1.81.0

AWS SDK for AWS RoboMaker
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about a source.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Source {
    /// <p>The s3 bucket name.</p>
    pub s3_bucket: ::std::option::Option<::std::string::String>,
    /// <p>The s3 object key.</p>
    pub s3_key: ::std::option::Option<::std::string::String>,
    /// <p>A hash of the object specified by <code>s3Bucket</code> and <code>s3Key</code>.</p>
    pub etag: ::std::option::Option<::std::string::String>,
    /// <p>The taget processor architecture for the application.</p>
    pub architecture: ::std::option::Option<crate::types::Architecture>,
}
impl Source {
    /// <p>The s3 bucket name.</p>
    pub fn s3_bucket(&self) -> ::std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The s3 object key.</p>
    pub fn s3_key(&self) -> ::std::option::Option<&str> {
        self.s3_key.as_deref()
    }
    /// <p>A hash of the object specified by <code>s3Bucket</code> and <code>s3Key</code>.</p>
    pub fn etag(&self) -> ::std::option::Option<&str> {
        self.etag.as_deref()
    }
    /// <p>The taget processor architecture for the application.</p>
    pub fn architecture(&self) -> ::std::option::Option<&crate::types::Architecture> {
        self.architecture.as_ref()
    }
}
impl Source {
    /// Creates a new builder-style object to manufacture [`Source`](crate::types::Source).
    pub fn builder() -> crate::types::builders::SourceBuilder {
        crate::types::builders::SourceBuilder::default()
    }
}

/// A builder for [`Source`](crate::types::Source).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SourceBuilder {
    pub(crate) s3_bucket: ::std::option::Option<::std::string::String>,
    pub(crate) s3_key: ::std::option::Option<::std::string::String>,
    pub(crate) etag: ::std::option::Option<::std::string::String>,
    pub(crate) architecture: ::std::option::Option<crate::types::Architecture>,
}
impl SourceBuilder {
    /// <p>The s3 bucket name.</p>
    pub fn s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The s3 bucket name.</p>
    pub fn set_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_bucket = input;
        self
    }
    /// <p>The s3 bucket name.</p>
    pub fn get_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_bucket
    }
    /// <p>The s3 object key.</p>
    pub fn s3_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The s3 object key.</p>
    pub fn set_s3_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_key = input;
        self
    }
    /// <p>The s3 object key.</p>
    pub fn get_s3_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_key
    }
    /// <p>A hash of the object specified by <code>s3Bucket</code> and <code>s3Key</code>.</p>
    pub fn etag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.etag = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A hash of the object specified by <code>s3Bucket</code> and <code>s3Key</code>.</p>
    pub fn set_etag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.etag = input;
        self
    }
    /// <p>A hash of the object specified by <code>s3Bucket</code> and <code>s3Key</code>.</p>
    pub fn get_etag(&self) -> &::std::option::Option<::std::string::String> {
        &self.etag
    }
    /// <p>The taget processor architecture for the application.</p>
    pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
        self.architecture = ::std::option::Option::Some(input);
        self
    }
    /// <p>The taget processor architecture for the application.</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The taget processor architecture for the application.</p>
    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
        &self.architecture
    }
    /// Consumes the builder and constructs a [`Source`](crate::types::Source).
    pub fn build(self) -> crate::types::Source {
        crate::types::Source {
            s3_bucket: self.s3_bucket,
            s3_key: self.s3_key,
            etag: self.etag,
            architecture: self.architecture,
        }
    }
}