aws-sdk-partnercentralanalytics 1.0.0

AWS SDK for Partner Central Analytics API
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 CreateDataSubscriptionInput {
    /// The catalog the subscription belongs to.
    pub catalog: ::std::option::Option<::std::string::String>,
    /// The name of the dataset to subscribe to.
    pub dataset_name: ::std::option::Option<::std::string::String>,
    /// How the dataset is delivered.
    pub delivery_method: ::std::option::Option<crate::types::DeliveryMethod>,
    /// The ARN of the S3 bucket in the caller's account that receives deliveries.
    pub s3_arn: ::std::option::Option<::std::string::String>,
    /// The ARN of the caller-owned KMS key used to encrypt delivered objects.
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
    pub client_token: ::std::option::Option<::std::string::String>,
    /// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDataSubscriptionInput {
    /// The catalog the subscription belongs to.
    pub fn catalog(&self) -> ::std::option::Option<&str> {
        self.catalog.as_deref()
    }
    /// The name of the dataset to subscribe to.
    pub fn dataset_name(&self) -> ::std::option::Option<&str> {
        self.dataset_name.as_deref()
    }
    /// How the dataset is delivered.
    pub fn delivery_method(&self) -> ::std::option::Option<&crate::types::DeliveryMethod> {
        self.delivery_method.as_ref()
    }
    /// The ARN of the S3 bucket in the caller's account that receives deliveries.
    pub fn s3_arn(&self) -> ::std::option::Option<&str> {
        self.s3_arn.as_deref()
    }
    /// The ARN of the caller-owned KMS key used to encrypt delivered objects.
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateDataSubscriptionInput {
    /// Creates a new builder-style object to manufacture [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
    pub fn builder() -> crate::operation::create_data_subscription::builders::CreateDataSubscriptionInputBuilder {
        crate::operation::create_data_subscription::builders::CreateDataSubscriptionInputBuilder::default()
    }
}

/// A builder for [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDataSubscriptionInputBuilder {
    pub(crate) catalog: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
    pub(crate) delivery_method: ::std::option::Option<crate::types::DeliveryMethod>,
    pub(crate) s3_arn: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDataSubscriptionInputBuilder {
    /// The catalog the subscription belongs to.
    /// This field is required.
    pub fn catalog(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.catalog = ::std::option::Option::Some(input.into());
        self
    }
    /// The catalog the subscription belongs to.
    pub fn set_catalog(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.catalog = input;
        self
    }
    /// The catalog the subscription belongs to.
    pub fn get_catalog(&self) -> &::std::option::Option<::std::string::String> {
        &self.catalog
    }
    /// The name of the dataset to subscribe to.
    /// This field is required.
    pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the dataset to subscribe to.
    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_name = input;
        self
    }
    /// The name of the dataset to subscribe to.
    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_name
    }
    /// How the dataset is delivered.
    /// This field is required.
    pub fn delivery_method(mut self, input: crate::types::DeliveryMethod) -> Self {
        self.delivery_method = ::std::option::Option::Some(input);
        self
    }
    /// How the dataset is delivered.
    pub fn set_delivery_method(mut self, input: ::std::option::Option<crate::types::DeliveryMethod>) -> Self {
        self.delivery_method = input;
        self
    }
    /// How the dataset is delivered.
    pub fn get_delivery_method(&self) -> &::std::option::Option<crate::types::DeliveryMethod> {
        &self.delivery_method
    }
    /// The ARN of the S3 bucket in the caller's account that receives deliveries.
    /// This field is required.
    pub fn s3_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the S3 bucket in the caller's account that receives deliveries.
    pub fn set_s3_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_arn = input;
        self
    }
    /// The ARN of the S3 bucket in the caller's account that receives deliveries.
    pub fn get_s3_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_arn
    }
    /// The ARN of the caller-owned KMS key used to encrypt delivered objects.
    /// This field is required.
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the caller-owned KMS key used to encrypt delivered objects.
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// The ARN of the caller-owned KMS key used to encrypt delivered objects.
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
    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
    }
    /// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_data_subscription::CreateDataSubscriptionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_data_subscription::CreateDataSubscriptionInput {
            catalog: self.catalog,
            dataset_name: self.dataset_name,
            delivery_method: self.delivery_method,
            s3_arn: self.s3_arn,
            kms_key_arn: self.kms_key_arn,
            client_token: self.client_token,
            tags: self.tags,
        })
    }
}