aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
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 AcceptSubscriptionRequestInput {
    /// <p>The Amazon DataZone domain where the specified subscription request is being accepted.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the subscription request that is to be accepted.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>A description that specifies the reason for accepting the specified subscription request.</p>
    pub decision_comment: ::std::option::Option<::std::string::String>,
    /// <p>The asset scopes of the accept subscription request.</p>
    pub asset_scopes: ::std::option::Option<::std::vec::Vec<crate::types::AcceptedAssetScope>>,
    /// <p>The asset permissions of the accept subscription request.</p>
    pub asset_permissions: ::std::option::Option<::std::vec::Vec<crate::types::AssetPermission>>,
}
impl AcceptSubscriptionRequestInput {
    /// <p>The Amazon DataZone domain where the specified subscription request is being accepted.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The unique identifier of the subscription request that is to be accepted.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>A description that specifies the reason for accepting the specified subscription request.</p>
    pub fn decision_comment(&self) -> ::std::option::Option<&str> {
        self.decision_comment.as_deref()
    }
    /// <p>The asset scopes of the accept subscription request.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.asset_scopes.is_none()`.
    pub fn asset_scopes(&self) -> &[crate::types::AcceptedAssetScope] {
        self.asset_scopes.as_deref().unwrap_or_default()
    }
    /// <p>The asset permissions of the accept subscription request.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.asset_permissions.is_none()`.
    pub fn asset_permissions(&self) -> &[crate::types::AssetPermission] {
        self.asset_permissions.as_deref().unwrap_or_default()
    }
}
impl ::std::fmt::Debug for AcceptSubscriptionRequestInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("AcceptSubscriptionRequestInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("decision_comment", &"*** Sensitive Data Redacted ***");
        formatter.field("asset_scopes", &self.asset_scopes);
        formatter.field("asset_permissions", &self.asset_permissions);
        formatter.finish()
    }
}
impl AcceptSubscriptionRequestInput {
    /// Creates a new builder-style object to manufacture [`AcceptSubscriptionRequestInput`](crate::operation::accept_subscription_request::AcceptSubscriptionRequestInput).
    pub fn builder() -> crate::operation::accept_subscription_request::builders::AcceptSubscriptionRequestInputBuilder {
        crate::operation::accept_subscription_request::builders::AcceptSubscriptionRequestInputBuilder::default()
    }
}

/// A builder for [`AcceptSubscriptionRequestInput`](crate::operation::accept_subscription_request::AcceptSubscriptionRequestInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct AcceptSubscriptionRequestInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) decision_comment: ::std::option::Option<::std::string::String>,
    pub(crate) asset_scopes: ::std::option::Option<::std::vec::Vec<crate::types::AcceptedAssetScope>>,
    pub(crate) asset_permissions: ::std::option::Option<::std::vec::Vec<crate::types::AssetPermission>>,
}
impl AcceptSubscriptionRequestInputBuilder {
    /// <p>The Amazon DataZone domain where the specified subscription request is being accepted.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon DataZone domain where the specified subscription request is being accepted.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The Amazon DataZone domain where the specified subscription request is being accepted.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The unique identifier of the subscription request that is to be accepted.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the subscription request that is to be accepted.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The unique identifier of the subscription request that is to be accepted.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>A description that specifies the reason for accepting the specified subscription request.</p>
    pub fn decision_comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.decision_comment = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description that specifies the reason for accepting the specified subscription request.</p>
    pub fn set_decision_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.decision_comment = input;
        self
    }
    /// <p>A description that specifies the reason for accepting the specified subscription request.</p>
    pub fn get_decision_comment(&self) -> &::std::option::Option<::std::string::String> {
        &self.decision_comment
    }
    /// Appends an item to `asset_scopes`.
    ///
    /// To override the contents of this collection use [`set_asset_scopes`](Self::set_asset_scopes).
    ///
    /// <p>The asset scopes of the accept subscription request.</p>
    pub fn asset_scopes(mut self, input: crate::types::AcceptedAssetScope) -> Self {
        let mut v = self.asset_scopes.unwrap_or_default();
        v.push(input);
        self.asset_scopes = ::std::option::Option::Some(v);
        self
    }
    /// <p>The asset scopes of the accept subscription request.</p>
    pub fn set_asset_scopes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceptedAssetScope>>) -> Self {
        self.asset_scopes = input;
        self
    }
    /// <p>The asset scopes of the accept subscription request.</p>
    pub fn get_asset_scopes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceptedAssetScope>> {
        &self.asset_scopes
    }
    /// Appends an item to `asset_permissions`.
    ///
    /// To override the contents of this collection use [`set_asset_permissions`](Self::set_asset_permissions).
    ///
    /// <p>The asset permissions of the accept subscription request.</p>
    pub fn asset_permissions(mut self, input: crate::types::AssetPermission) -> Self {
        let mut v = self.asset_permissions.unwrap_or_default();
        v.push(input);
        self.asset_permissions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The asset permissions of the accept subscription request.</p>
    pub fn set_asset_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssetPermission>>) -> Self {
        self.asset_permissions = input;
        self
    }
    /// <p>The asset permissions of the accept subscription request.</p>
    pub fn get_asset_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssetPermission>> {
        &self.asset_permissions
    }
    /// Consumes the builder and constructs a [`AcceptSubscriptionRequestInput`](crate::operation::accept_subscription_request::AcceptSubscriptionRequestInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::accept_subscription_request::AcceptSubscriptionRequestInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::accept_subscription_request::AcceptSubscriptionRequestInput {
            domain_identifier: self.domain_identifier,
            identifier: self.identifier,
            decision_comment: self.decision_comment,
            asset_scopes: self.asset_scopes,
            asset_permissions: self.asset_permissions,
        })
    }
}
impl ::std::fmt::Debug for AcceptSubscriptionRequestInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("AcceptSubscriptionRequestInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("decision_comment", &"*** Sensitive Data Redacted ***");
        formatter.field("asset_scopes", &self.asset_scopes);
        formatter.field("asset_permissions", &self.asset_permissions);
        formatter.finish()
    }
}