aws-sdk-timestreamquery 1.104.0

AWS SDK for Amazon Timestream Query
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 ExecuteScheduledQueryInput {
    /// <p>ARN of the scheduled query.</p>
    pub scheduled_query_arn: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp.</p>
    pub invocation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Not used.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Encapsulates settings for enabling <code>QueryInsights</code>.</p>
    /// <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>
    pub query_insights: ::std::option::Option<crate::types::ScheduledQueryInsights>,
}
impl ExecuteScheduledQueryInput {
    /// <p>ARN of the scheduled query.</p>
    pub fn scheduled_query_arn(&self) -> ::std::option::Option<&str> {
        self.scheduled_query_arn.as_deref()
    }
    /// <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp.</p>
    pub fn invocation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.invocation_time.as_ref()
    }
    /// <p>Not used.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Encapsulates settings for enabling <code>QueryInsights</code>.</p>
    /// <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>
    pub fn query_insights(&self) -> ::std::option::Option<&crate::types::ScheduledQueryInsights> {
        self.query_insights.as_ref()
    }
}
impl ::std::fmt::Debug for ExecuteScheduledQueryInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExecuteScheduledQueryInput");
        formatter.field("scheduled_query_arn", &self.scheduled_query_arn);
        formatter.field("invocation_time", &self.invocation_time);
        formatter.field("client_token", &"*** Sensitive Data Redacted ***");
        formatter.field("query_insights", &self.query_insights);
        formatter.finish()
    }
}
impl ExecuteScheduledQueryInput {
    /// Creates a new builder-style object to manufacture [`ExecuteScheduledQueryInput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput).
    pub fn builder() -> crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryInputBuilder {
        crate::operation::execute_scheduled_query::builders::ExecuteScheduledQueryInputBuilder::default()
    }
}

/// A builder for [`ExecuteScheduledQueryInput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ExecuteScheduledQueryInputBuilder {
    pub(crate) scheduled_query_arn: ::std::option::Option<::std::string::String>,
    pub(crate) invocation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) query_insights: ::std::option::Option<crate::types::ScheduledQueryInsights>,
}
impl ExecuteScheduledQueryInputBuilder {
    /// <p>ARN of the scheduled query.</p>
    /// This field is required.
    pub fn scheduled_query_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scheduled_query_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of the scheduled query.</p>
    pub fn set_scheduled_query_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.scheduled_query_arn = input;
        self
    }
    /// <p>ARN of the scheduled query.</p>
    pub fn get_scheduled_query_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.scheduled_query_arn
    }
    /// <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp.</p>
    /// This field is required.
    pub fn invocation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.invocation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp.</p>
    pub fn set_invocation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.invocation_time = input;
        self
    }
    /// <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp.</p>
    pub fn get_invocation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.invocation_time
    }
    /// <p>Not used.</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>Not used.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Not used.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>Encapsulates settings for enabling <code>QueryInsights</code>.</p>
    /// <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>
    pub fn query_insights(mut self, input: crate::types::ScheduledQueryInsights) -> Self {
        self.query_insights = ::std::option::Option::Some(input);
        self
    }
    /// <p>Encapsulates settings for enabling <code>QueryInsights</code>.</p>
    /// <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>
    pub fn set_query_insights(mut self, input: ::std::option::Option<crate::types::ScheduledQueryInsights>) -> Self {
        self.query_insights = input;
        self
    }
    /// <p>Encapsulates settings for enabling <code>QueryInsights</code>.</p>
    /// <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>
    pub fn get_query_insights(&self) -> &::std::option::Option<crate::types::ScheduledQueryInsights> {
        &self.query_insights
    }
    /// Consumes the builder and constructs a [`ExecuteScheduledQueryInput`](crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::execute_scheduled_query::ExecuteScheduledQueryInput {
            scheduled_query_arn: self.scheduled_query_arn,
            invocation_time: self.invocation_time,
            client_token: self.client_token,
            query_insights: self.query_insights,
        })
    }
}
impl ::std::fmt::Debug for ExecuteScheduledQueryInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExecuteScheduledQueryInputBuilder");
        formatter.field("scheduled_query_arn", &self.scheduled_query_arn);
        formatter.field("invocation_time", &self.invocation_time);
        formatter.field("client_token", &"*** Sensitive Data Redacted ***");
        formatter.field("query_insights", &self.query_insights);
        formatter.finish()
    }
}