aws-sdk-cloudwatchlogs 1.124.0

AWS SDK for Amazon CloudWatch Logs
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 CreateLookupTableInput {
    /// <p>The name of the lookup table. The name must be unique within your account and Region. The name can contain only alphanumeric characters and underscores, and can be up to 256 characters long.</p>
    pub lookup_table_name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the lookup table. The description can be up to 1024 characters long.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The CSV content of the lookup table. The first row must be a header row with column names. The content must use UTF-8 encoding and not exceed 10 MB.</p>
    pub table_body: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of key-value pairs to associate with the lookup table. You can associate as many as 50 tags with a lookup table. Tags can help you organize and categorize your resources.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateLookupTableInput {
    /// <p>The name of the lookup table. The name must be unique within your account and Region. The name can contain only alphanumeric characters and underscores, and can be up to 256 characters long.</p>
    pub fn lookup_table_name(&self) -> ::std::option::Option<&str> {
        self.lookup_table_name.as_deref()
    }
    /// <p>A description of the lookup table. The description can be up to 1024 characters long.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The CSV content of the lookup table. The first row must be a header row with column names. The content must use UTF-8 encoding and not exceed 10 MB.</p>
    pub fn table_body(&self) -> ::std::option::Option<&str> {
        self.table_body.as_deref()
    }
    /// <p>The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>A list of key-value pairs to associate with the lookup table. You can associate as many as 50 tags with a lookup table. Tags can help you organize and categorize your resources.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateLookupTableInput {
    /// Creates a new builder-style object to manufacture [`CreateLookupTableInput`](crate::operation::create_lookup_table::CreateLookupTableInput).
    pub fn builder() -> crate::operation::create_lookup_table::builders::CreateLookupTableInputBuilder {
        crate::operation::create_lookup_table::builders::CreateLookupTableInputBuilder::default()
    }
}

/// A builder for [`CreateLookupTableInput`](crate::operation::create_lookup_table::CreateLookupTableInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLookupTableInputBuilder {
    pub(crate) lookup_table_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) table_body: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateLookupTableInputBuilder {
    /// <p>The name of the lookup table. The name must be unique within your account and Region. The name can contain only alphanumeric characters and underscores, and can be up to 256 characters long.</p>
    /// This field is required.
    pub fn lookup_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.lookup_table_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the lookup table. The name must be unique within your account and Region. The name can contain only alphanumeric characters and underscores, and can be up to 256 characters long.</p>
    pub fn set_lookup_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.lookup_table_name = input;
        self
    }
    /// <p>The name of the lookup table. The name must be unique within your account and Region. The name can contain only alphanumeric characters and underscores, and can be up to 256 characters long.</p>
    pub fn get_lookup_table_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.lookup_table_name
    }
    /// <p>A description of the lookup table. The description can be up to 1024 characters long.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the lookup table. The description can be up to 1024 characters long.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the lookup table. The description can be up to 1024 characters long.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The CSV content of the lookup table. The first row must be a header row with column names. The content must use UTF-8 encoding and not exceed 10 MB.</p>
    /// This field is required.
    pub fn table_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.table_body = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CSV content of the lookup table. The first row must be a header row with column names. The content must use UTF-8 encoding and not exceed 10 MB.</p>
    pub fn set_table_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.table_body = input;
        self
    }
    /// <p>The CSV content of the lookup table. The first row must be a header row with column names. The content must use UTF-8 encoding and not exceed 10 MB.</p>
    pub fn get_table_body(&self) -> &::std::option::Option<::std::string::String> {
        &self.table_body
    }
    /// <p>The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of key-value pairs to associate with the lookup table. You can associate as many as 50 tags with a lookup table. Tags can help you organize and categorize your resources.</p>
    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
    }
    /// <p>A list of key-value pairs to associate with the lookup table. You can associate as many as 50 tags with a lookup table. Tags can help you organize and categorize your resources.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A list of key-value pairs to associate with the lookup table. You can associate as many as 50 tags with a lookup table. Tags can help you organize and categorize your resources.</p>
    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 [`CreateLookupTableInput`](crate::operation::create_lookup_table::CreateLookupTableInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_lookup_table::CreateLookupTableInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_lookup_table::CreateLookupTableInput {
            lookup_table_name: self.lookup_table_name,
            description: self.description,
            table_body: self.table_body,
            kms_key_id: self.kms_key_id,
            tags: self.tags,
        })
    }
}