aws-sdk-s3outposts 1.23.0

AWS SDK for Amazon S3 on Outposts
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the details for the Outpost object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Outpost {
    /// <p>Specifies the unique Amazon Resource Name (ARN) for the outpost.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the unique S3 on Outposts ARN for use with Resource Access Manager (RAM).</p>
    pub s3_outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the unique identifier for the outpost.</p>
    pub outpost_id: ::std::option::Option<::std::string::String>,
    /// <p>Returns the Amazon Web Services account ID of the outpost owner. Useful for comparing owned versus shared outposts.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon S3 capacity of the outpost in bytes.</p>
    pub capacity_in_bytes: i64,
}
impl Outpost {
    /// <p>Specifies the unique Amazon Resource Name (ARN) for the outpost.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Specifies the unique S3 on Outposts ARN for use with Resource Access Manager (RAM).</p>
    pub fn s3_outpost_arn(&self) -> ::std::option::Option<&str> {
        self.s3_outpost_arn.as_deref()
    }
    /// <p>Specifies the unique identifier for the outpost.</p>
    pub fn outpost_id(&self) -> ::std::option::Option<&str> {
        self.outpost_id.as_deref()
    }
    /// <p>Returns the Amazon Web Services account ID of the outpost owner. Useful for comparing owned versus shared outposts.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Amazon S3 capacity of the outpost in bytes.</p>
    pub fn capacity_in_bytes(&self) -> i64 {
        self.capacity_in_bytes
    }
}
impl Outpost {
    /// Creates a new builder-style object to manufacture [`Outpost`](crate::types::Outpost).
    pub fn builder() -> crate::types::builders::OutpostBuilder {
        crate::types::builders::OutpostBuilder::default()
    }
}

/// A builder for [`Outpost`](crate::types::Outpost).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct OutpostBuilder {
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) s3_outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) outpost_id: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_in_bytes: ::std::option::Option<i64>,
}
impl OutpostBuilder {
    /// <p>Specifies the unique Amazon Resource Name (ARN) for the outpost.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the unique Amazon Resource Name (ARN) for the outpost.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>Specifies the unique Amazon Resource Name (ARN) for the outpost.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// <p>Specifies the unique S3 on Outposts ARN for use with Resource Access Manager (RAM).</p>
    pub fn s3_outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the unique S3 on Outposts ARN for use with Resource Access Manager (RAM).</p>
    pub fn set_s3_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_outpost_arn = input;
        self
    }
    /// <p>Specifies the unique S3 on Outposts ARN for use with Resource Access Manager (RAM).</p>
    pub fn get_s3_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_outpost_arn
    }
    /// <p>Specifies the unique identifier for the outpost.</p>
    pub fn outpost_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the unique identifier for the outpost.</p>
    pub fn set_outpost_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_id = input;
        self
    }
    /// <p>Specifies the unique identifier for the outpost.</p>
    pub fn get_outpost_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_id
    }
    /// <p>Returns the Amazon Web Services account ID of the outpost owner. Useful for comparing owned versus shared outposts.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns the Amazon Web Services account ID of the outpost owner. Useful for comparing owned versus shared outposts.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>Returns the Amazon Web Services account ID of the outpost owner. Useful for comparing owned versus shared outposts.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>The Amazon S3 capacity of the outpost in bytes.</p>
    pub fn capacity_in_bytes(mut self, input: i64) -> Self {
        self.capacity_in_bytes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Amazon S3 capacity of the outpost in bytes.</p>
    pub fn set_capacity_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
        self.capacity_in_bytes = input;
        self
    }
    /// <p>The Amazon S3 capacity of the outpost in bytes.</p>
    pub fn get_capacity_in_bytes(&self) -> &::std::option::Option<i64> {
        &self.capacity_in_bytes
    }
    /// Consumes the builder and constructs a [`Outpost`](crate::types::Outpost).
    pub fn build(self) -> crate::types::Outpost {
        crate::types::Outpost {
            outpost_arn: self.outpost_arn,
            s3_outpost_arn: self.s3_outpost_arn,
            outpost_id: self.outpost_id,
            owner_id: self.owner_id,
            capacity_in_bytes: self.capacity_in_bytes.unwrap_or_default(),
        }
    }
}