aws-sdk-ram 1.103.0

AWS SDK for AWS Resource Access Manager
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 CreateResourceShareOutput {
    /// <p>An object with information about the new resource share.</p>
    pub resource_share: ::std::option::Option<crate::types::ResourceShare>,
    /// <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateResourceShareOutput {
    /// <p>An object with information about the new resource share.</p>
    pub fn resource_share(&self) -> ::std::option::Option<&crate::types::ResourceShare> {
        self.resource_share.as_ref()
    }
    /// <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateResourceShareOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateResourceShareOutput {
    /// Creates a new builder-style object to manufacture [`CreateResourceShareOutput`](crate::operation::create_resource_share::CreateResourceShareOutput).
    pub fn builder() -> crate::operation::create_resource_share::builders::CreateResourceShareOutputBuilder {
        crate::operation::create_resource_share::builders::CreateResourceShareOutputBuilder::default()
    }
}

/// A builder for [`CreateResourceShareOutput`](crate::operation::create_resource_share::CreateResourceShareOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateResourceShareOutputBuilder {
    pub(crate) resource_share: ::std::option::Option<crate::types::ResourceShare>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateResourceShareOutputBuilder {
    /// <p>An object with information about the new resource share.</p>
    pub fn resource_share(mut self, input: crate::types::ResourceShare) -> Self {
        self.resource_share = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object with information about the new resource share.</p>
    pub fn set_resource_share(mut self, input: ::std::option::Option<crate::types::ResourceShare>) -> Self {
        self.resource_share = input;
        self
    }
    /// <p>An object with information about the new resource share.</p>
    pub fn get_resource_share(&self) -> &::std::option::Option<crate::types::ResourceShare> {
        &self.resource_share
    }
    /// <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    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 [`CreateResourceShareOutput`](crate::operation::create_resource_share::CreateResourceShareOutput).
    pub fn build(self) -> crate::operation::create_resource_share::CreateResourceShareOutput {
        crate::operation::create_resource_share::CreateResourceShareOutput {
            resource_share: self.resource_share,
            client_token: self.client_token,
            _request_id: self._request_id,
        }
    }
}