aws-sdk-datazone 1.137.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 CreateSubscriptionTargetInput {
    /// <p>The ID of the Amazon DataZone domain in which subscription target is created.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the environment in which subscription target is created.</p>
    pub environment_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the subscription target.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the subscription target.</p>
    pub r#type: ::std::option::Option<::std::string::String>,
    /// <p>The configuration of the subscription target.</p>
    pub subscription_target_config: ::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>>,
    /// <p>The authorized principals of the subscription target.</p>
    pub authorized_principals: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The manage access role that is used to create the subscription target.</p>
    pub manage_access_role: ::std::option::Option<::std::string::String>,
    /// <p>The asset types that can be included in the subscription target.</p>
    pub applicable_asset_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The provider of the subscription target.</p>
    pub provider: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Determines the subscription grant creation mode for this target, defining if grants are auto-created upon subscription approval or managed manually.</p>
    pub subscription_grant_creation_mode: ::std::option::Option<crate::types::SubscriptionGrantCreationMode>,
}
impl CreateSubscriptionTargetInput {
    /// <p>The ID of the Amazon DataZone domain in which subscription target is created.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of the environment in which subscription target is created.</p>
    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
        self.environment_identifier.as_deref()
    }
    /// <p>The name of the subscription target.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of the subscription target.</p>
    pub fn r#type(&self) -> ::std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The configuration of the subscription target.</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 `.subscription_target_config.is_none()`.
    pub fn subscription_target_config(&self) -> &[crate::types::SubscriptionTargetForm] {
        self.subscription_target_config.as_deref().unwrap_or_default()
    }
    /// <p>The authorized principals of the subscription target.</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 `.authorized_principals.is_none()`.
    pub fn authorized_principals(&self) -> &[::std::string::String] {
        self.authorized_principals.as_deref().unwrap_or_default()
    }
    /// <p>The manage access role that is used to create the subscription target.</p>
    pub fn manage_access_role(&self) -> ::std::option::Option<&str> {
        self.manage_access_role.as_deref()
    }
    /// <p>The asset types that can be included in the subscription target.</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 `.applicable_asset_types.is_none()`.
    pub fn applicable_asset_types(&self) -> &[::std::string::String] {
        self.applicable_asset_types.as_deref().unwrap_or_default()
    }
    /// <p>The provider of the subscription target.</p>
    pub fn provider(&self) -> ::std::option::Option<&str> {
        self.provider.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Determines the subscription grant creation mode for this target, defining if grants are auto-created upon subscription approval or managed manually.</p>
    pub fn subscription_grant_creation_mode(&self) -> ::std::option::Option<&crate::types::SubscriptionGrantCreationMode> {
        self.subscription_grant_creation_mode.as_ref()
    }
}
impl ::std::fmt::Debug for CreateSubscriptionTargetInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSubscriptionTargetInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("r#type", &self.r#type);
        formatter.field("subscription_target_config", &self.subscription_target_config);
        formatter.field("authorized_principals", &self.authorized_principals);
        formatter.field("manage_access_role", &self.manage_access_role);
        formatter.field("applicable_asset_types", &self.applicable_asset_types);
        formatter.field("provider", &self.provider);
        formatter.field("client_token", &self.client_token);
        formatter.field("subscription_grant_creation_mode", &self.subscription_grant_creation_mode);
        formatter.finish()
    }
}
impl CreateSubscriptionTargetInput {
    /// Creates a new builder-style object to manufacture [`CreateSubscriptionTargetInput`](crate::operation::create_subscription_target::CreateSubscriptionTargetInput).
    pub fn builder() -> crate::operation::create_subscription_target::builders::CreateSubscriptionTargetInputBuilder {
        crate::operation::create_subscription_target::builders::CreateSubscriptionTargetInputBuilder::default()
    }
}

/// A builder for [`CreateSubscriptionTargetInput`](crate::operation::create_subscription_target::CreateSubscriptionTargetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateSubscriptionTargetInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
    pub(crate) subscription_target_config: ::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>>,
    pub(crate) authorized_principals: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) manage_access_role: ::std::option::Option<::std::string::String>,
    pub(crate) applicable_asset_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) provider: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) subscription_grant_creation_mode: ::std::option::Option<crate::types::SubscriptionGrantCreationMode>,
}
impl CreateSubscriptionTargetInputBuilder {
    /// <p>The ID of the Amazon DataZone domain in which subscription target is created.</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 ID of the Amazon DataZone domain in which subscription target is created.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the Amazon DataZone domain in which subscription target is created.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of the environment in which subscription target is created.</p>
    /// This field is required.
    pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the environment in which subscription target is created.</p>
    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_identifier = input;
        self
    }
    /// <p>The ID of the environment in which subscription target is created.</p>
    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_identifier
    }
    /// <p>The name of the subscription target.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the subscription target.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the subscription target.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of the subscription target.</p>
    /// This field is required.
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of the subscription target.</p>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the subscription target.</p>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// Appends an item to `subscription_target_config`.
    ///
    /// To override the contents of this collection use [`set_subscription_target_config`](Self::set_subscription_target_config).
    ///
    /// <p>The configuration of the subscription target.</p>
    pub fn subscription_target_config(mut self, input: crate::types::SubscriptionTargetForm) -> Self {
        let mut v = self.subscription_target_config.unwrap_or_default();
        v.push(input);
        self.subscription_target_config = ::std::option::Option::Some(v);
        self
    }
    /// <p>The configuration of the subscription target.</p>
    pub fn set_subscription_target_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>>) -> Self {
        self.subscription_target_config = input;
        self
    }
    /// <p>The configuration of the subscription target.</p>
    pub fn get_subscription_target_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>> {
        &self.subscription_target_config
    }
    /// Appends an item to `authorized_principals`.
    ///
    /// To override the contents of this collection use [`set_authorized_principals`](Self::set_authorized_principals).
    ///
    /// <p>The authorized principals of the subscription target.</p>
    pub fn authorized_principals(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.authorized_principals.unwrap_or_default();
        v.push(input.into());
        self.authorized_principals = ::std::option::Option::Some(v);
        self
    }
    /// <p>The authorized principals of the subscription target.</p>
    pub fn set_authorized_principals(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.authorized_principals = input;
        self
    }
    /// <p>The authorized principals of the subscription target.</p>
    pub fn get_authorized_principals(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.authorized_principals
    }
    /// <p>The manage access role that is used to create the subscription target.</p>
    /// This field is required.
    pub fn manage_access_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.manage_access_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The manage access role that is used to create the subscription target.</p>
    pub fn set_manage_access_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.manage_access_role = input;
        self
    }
    /// <p>The manage access role that is used to create the subscription target.</p>
    pub fn get_manage_access_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.manage_access_role
    }
    /// Appends an item to `applicable_asset_types`.
    ///
    /// To override the contents of this collection use [`set_applicable_asset_types`](Self::set_applicable_asset_types).
    ///
    /// <p>The asset types that can be included in the subscription target.</p>
    pub fn applicable_asset_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.applicable_asset_types.unwrap_or_default();
        v.push(input.into());
        self.applicable_asset_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The asset types that can be included in the subscription target.</p>
    pub fn set_applicable_asset_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.applicable_asset_types = input;
        self
    }
    /// <p>The asset types that can be included in the subscription target.</p>
    pub fn get_applicable_asset_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.applicable_asset_types
    }
    /// <p>The provider of the subscription target.</p>
    pub fn provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.provider = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The provider of the subscription target.</p>
    pub fn set_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.provider = input;
        self
    }
    /// <p>The provider of the subscription target.</p>
    pub fn get_provider(&self) -> &::std::option::Option<::std::string::String> {
        &self.provider
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</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>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>Determines the subscription grant creation mode for this target, defining if grants are auto-created upon subscription approval or managed manually.</p>
    pub fn subscription_grant_creation_mode(mut self, input: crate::types::SubscriptionGrantCreationMode) -> Self {
        self.subscription_grant_creation_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines the subscription grant creation mode for this target, defining if grants are auto-created upon subscription approval or managed manually.</p>
    pub fn set_subscription_grant_creation_mode(mut self, input: ::std::option::Option<crate::types::SubscriptionGrantCreationMode>) -> Self {
        self.subscription_grant_creation_mode = input;
        self
    }
    /// <p>Determines the subscription grant creation mode for this target, defining if grants are auto-created upon subscription approval or managed manually.</p>
    pub fn get_subscription_grant_creation_mode(&self) -> &::std::option::Option<crate::types::SubscriptionGrantCreationMode> {
        &self.subscription_grant_creation_mode
    }
    /// Consumes the builder and constructs a [`CreateSubscriptionTargetInput`](crate::operation::create_subscription_target::CreateSubscriptionTargetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_subscription_target::CreateSubscriptionTargetInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_subscription_target::CreateSubscriptionTargetInput {
            domain_identifier: self.domain_identifier,
            environment_identifier: self.environment_identifier,
            name: self.name,
            r#type: self.r#type,
            subscription_target_config: self.subscription_target_config,
            authorized_principals: self.authorized_principals,
            manage_access_role: self.manage_access_role,
            applicable_asset_types: self.applicable_asset_types,
            provider: self.provider,
            client_token: self.client_token,
            subscription_grant_creation_mode: self.subscription_grant_creation_mode,
        })
    }
}
impl ::std::fmt::Debug for CreateSubscriptionTargetInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSubscriptionTargetInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("r#type", &self.r#type);
        formatter.field("subscription_target_config", &self.subscription_target_config);
        formatter.field("authorized_principals", &self.authorized_principals);
        formatter.field("manage_access_role", &self.manage_access_role);
        formatter.field("applicable_asset_types", &self.applicable_asset_types);
        formatter.field("provider", &self.provider);
        formatter.field("client_token", &self.client_token);
        formatter.field("subscription_grant_creation_mode", &self.subscription_grant_creation_mode);
        formatter.finish()
    }
}