aws-sdk-forecast 1.98.0

AWS SDK for Amazon Forecast Service
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 CreateExplainabilityInput {
    /// <p>A unique name for the Explainability.</p>
    pub explainability_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability.</p>
    pub resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>The configuration settings that define the granularity of time series and time points for the Explainability.</p>
    pub explainability_config: ::std::option::Option<crate::types::ExplainabilityConfig>,
    /// <p>The source of your data, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the data and, optionally, an Key Management Service (KMS) key.</p>
    pub data_source: ::std::option::Option<crate::types::DataSource>,
    /// <p>Defines the fields of a dataset.</p>
    pub schema: ::std::option::Option<crate::types::Schema>,
    /// <p>Create an Explainability visualization that is viewable within the Amazon Web Services console.</p>
    pub enable_visualization: ::std::option::Option<bool>,
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the first point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub start_date_time: ::std::option::Option<::std::string::String>,
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the last time point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub end_date_time: ::std::option::Option<::std::string::String>,
    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
    /// <p>The following restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
    /// <li>
    /// <p>Maximum number of tags per resource: 50.</p></li>
    /// <li>
    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
    /// <li>
    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
    /// </ul>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateExplainabilityInput {
    /// <p>A unique name for the Explainability.</p>
    pub fn explainability_name(&self) -> ::std::option::Option<&str> {
        self.explainability_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability.</p>
    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>The configuration settings that define the granularity of time series and time points for the Explainability.</p>
    pub fn explainability_config(&self) -> ::std::option::Option<&crate::types::ExplainabilityConfig> {
        self.explainability_config.as_ref()
    }
    /// <p>The source of your data, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the data and, optionally, an Key Management Service (KMS) key.</p>
    pub fn data_source(&self) -> ::std::option::Option<&crate::types::DataSource> {
        self.data_source.as_ref()
    }
    /// <p>Defines the fields of a dataset.</p>
    pub fn schema(&self) -> ::std::option::Option<&crate::types::Schema> {
        self.schema.as_ref()
    }
    /// <p>Create an Explainability visualization that is viewable within the Amazon Web Services console.</p>
    pub fn enable_visualization(&self) -> ::std::option::Option<bool> {
        self.enable_visualization
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the first point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn start_date_time(&self) -> ::std::option::Option<&str> {
        self.start_date_time.as_deref()
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the last time point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn end_date_time(&self) -> ::std::option::Option<&str> {
        self.end_date_time.as_deref()
    }
    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
    /// <p>The following restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
    /// <li>
    /// <p>Maximum number of tags per resource: 50.</p></li>
    /// <li>
    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
    /// <li>
    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateExplainabilityInput {
    /// Creates a new builder-style object to manufacture [`CreateExplainabilityInput`](crate::operation::create_explainability::CreateExplainabilityInput).
    pub fn builder() -> crate::operation::create_explainability::builders::CreateExplainabilityInputBuilder {
        crate::operation::create_explainability::builders::CreateExplainabilityInputBuilder::default()
    }
}

/// A builder for [`CreateExplainabilityInput`](crate::operation::create_explainability::CreateExplainabilityInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateExplainabilityInputBuilder {
    pub(crate) explainability_name: ::std::option::Option<::std::string::String>,
    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) explainability_config: ::std::option::Option<crate::types::ExplainabilityConfig>,
    pub(crate) data_source: ::std::option::Option<crate::types::DataSource>,
    pub(crate) schema: ::std::option::Option<crate::types::Schema>,
    pub(crate) enable_visualization: ::std::option::Option<bool>,
    pub(crate) start_date_time: ::std::option::Option<::std::string::String>,
    pub(crate) end_date_time: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateExplainabilityInputBuilder {
    /// <p>A unique name for the Explainability.</p>
    /// This field is required.
    pub fn explainability_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.explainability_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique name for the Explainability.</p>
    pub fn set_explainability_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.explainability_name = input;
        self
    }
    /// <p>A unique name for the Explainability.</p>
    pub fn get_explainability_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.explainability_name
    }
    /// <p>The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability.</p>
    /// This field is required.
    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability.</p>
    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability.</p>
    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_arn
    }
    /// <p>The configuration settings that define the granularity of time series and time points for the Explainability.</p>
    /// This field is required.
    pub fn explainability_config(mut self, input: crate::types::ExplainabilityConfig) -> Self {
        self.explainability_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration settings that define the granularity of time series and time points for the Explainability.</p>
    pub fn set_explainability_config(mut self, input: ::std::option::Option<crate::types::ExplainabilityConfig>) -> Self {
        self.explainability_config = input;
        self
    }
    /// <p>The configuration settings that define the granularity of time series and time points for the Explainability.</p>
    pub fn get_explainability_config(&self) -> &::std::option::Option<crate::types::ExplainabilityConfig> {
        &self.explainability_config
    }
    /// <p>The source of your data, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the data and, optionally, an Key Management Service (KMS) key.</p>
    pub fn data_source(mut self, input: crate::types::DataSource) -> Self {
        self.data_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source of your data, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the data and, optionally, an Key Management Service (KMS) key.</p>
    pub fn set_data_source(mut self, input: ::std::option::Option<crate::types::DataSource>) -> Self {
        self.data_source = input;
        self
    }
    /// <p>The source of your data, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the data and, optionally, an Key Management Service (KMS) key.</p>
    pub fn get_data_source(&self) -> &::std::option::Option<crate::types::DataSource> {
        &self.data_source
    }
    /// <p>Defines the fields of a dataset.</p>
    pub fn schema(mut self, input: crate::types::Schema) -> Self {
        self.schema = ::std::option::Option::Some(input);
        self
    }
    /// <p>Defines the fields of a dataset.</p>
    pub fn set_schema(mut self, input: ::std::option::Option<crate::types::Schema>) -> Self {
        self.schema = input;
        self
    }
    /// <p>Defines the fields of a dataset.</p>
    pub fn get_schema(&self) -> &::std::option::Option<crate::types::Schema> {
        &self.schema
    }
    /// <p>Create an Explainability visualization that is viewable within the Amazon Web Services console.</p>
    pub fn enable_visualization(mut self, input: bool) -> Self {
        self.enable_visualization = ::std::option::Option::Some(input);
        self
    }
    /// <p>Create an Explainability visualization that is viewable within the Amazon Web Services console.</p>
    pub fn set_enable_visualization(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_visualization = input;
        self
    }
    /// <p>Create an Explainability visualization that is viewable within the Amazon Web Services console.</p>
    pub fn get_enable_visualization(&self) -> &::std::option::Option<bool> {
        &self.enable_visualization
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the first point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn start_date_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.start_date_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the first point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn set_start_date_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.start_date_time = input;
        self
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the first point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn get_start_date_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.start_date_time
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the last time point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn end_date_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.end_date_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the last time point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn set_end_date_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.end_date_time = input;
        self
    }
    /// <p>If <code>TimePointGranularity</code> is set to <code>SPECIFIC</code>, define the last time point for the Explainability.</p>
    /// <p>Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)</p>
    pub fn get_end_date_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.end_date_time
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
    /// <p>The following restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
    /// <li>
    /// <p>Maximum number of tags per resource: 50.</p></li>
    /// <li>
    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
    /// <li>
    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
    /// </ul>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
    /// <p>The following restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
    /// <li>
    /// <p>Maximum number of tags per resource: 50.</p></li>
    /// <li>
    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
    /// <li>
    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
    /// </ul>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
    /// <p>The following restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
    /// <li>
    /// <p>Maximum number of tags per resource: 50.</p></li>
    /// <li>
    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
    /// <li>
    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
    /// <li>
    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
    /// </ul>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateExplainabilityInput`](crate::operation::create_explainability::CreateExplainabilityInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_explainability::CreateExplainabilityInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_explainability::CreateExplainabilityInput {
            explainability_name: self.explainability_name,
            resource_arn: self.resource_arn,
            explainability_config: self.explainability_config,
            data_source: self.data_source,
            schema: self.schema,
            enable_visualization: self.enable_visualization,
            start_date_time: self.start_date_time,
            end_date_time: self.end_date_time,
            tags: self.tags,
        })
    }
}