aws-sdk-omics 1.99.0

AWS SDK for Amazon Omics
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, ::std::fmt::Debug)]
pub struct CreateShareInput {
    /// <p>The ARN of the resource to be shared.</p>
    pub resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>The principal subscriber is the account being offered shared access to the resource.</p>
    pub principal_subscriber: ::std::option::Option<::std::string::String>,
    /// <p>A name that the owner defines for the share.</p>
    pub share_name: ::std::option::Option<::std::string::String>,
}
impl CreateShareInput {
    /// <p>The ARN of the resource to be shared.</p>
    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>The principal subscriber is the account being offered shared access to the resource.</p>
    pub fn principal_subscriber(&self) -> ::std::option::Option<&str> {
        self.principal_subscriber.as_deref()
    }
    /// <p>A name that the owner defines for the share.</p>
    pub fn share_name(&self) -> ::std::option::Option<&str> {
        self.share_name.as_deref()
    }
}
impl CreateShareInput {
    /// Creates a new builder-style object to manufacture [`CreateShareInput`](crate::operation::create_share::CreateShareInput).
    pub fn builder() -> crate::operation::create_share::builders::CreateShareInputBuilder {
        crate::operation::create_share::builders::CreateShareInputBuilder::default()
    }
}

/// A builder for [`CreateShareInput`](crate::operation::create_share::CreateShareInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateShareInputBuilder {
    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) principal_subscriber: ::std::option::Option<::std::string::String>,
    pub(crate) share_name: ::std::option::Option<::std::string::String>,
}
impl CreateShareInputBuilder {
    /// <p>The ARN of the resource to be shared.</p>
    /// This field is required.
    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the resource to be shared.</p>
    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_arn = input;
        self
    }
    /// <p>The ARN of the resource to be shared.</p>
    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_arn
    }
    /// <p>The principal subscriber is the account being offered shared access to the resource.</p>
    /// This field is required.
    pub fn principal_subscriber(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.principal_subscriber = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The principal subscriber is the account being offered shared access to the resource.</p>
    pub fn set_principal_subscriber(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.principal_subscriber = input;
        self
    }
    /// <p>The principal subscriber is the account being offered shared access to the resource.</p>
    pub fn get_principal_subscriber(&self) -> &::std::option::Option<::std::string::String> {
        &self.principal_subscriber
    }
    /// <p>A name that the owner defines for the share.</p>
    pub fn share_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.share_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A name that the owner defines for the share.</p>
    pub fn set_share_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.share_name = input;
        self
    }
    /// <p>A name that the owner defines for the share.</p>
    pub fn get_share_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.share_name
    }
    /// Consumes the builder and constructs a [`CreateShareInput`](crate::operation::create_share::CreateShareInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_share::CreateShareInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_share::CreateShareInput {
            resource_arn: self.resource_arn,
            principal_subscriber: self.principal_subscriber,
            share_name: self.share_name,
        })
    }
}