aws-sdk-cloudtrail 1.104.0

AWS SDK for AWS CloudTrail
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 GenerateQueryOutput {
    /// <p>The SQL query statement generated from the prompt.</p>
    pub query_statement: ::std::option::Option<::std::string::String>,
    /// <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
    pub query_alias: ::std::option::Option<::std::string::String>,
    /// <p>The account ID of the event data store owner.</p>
    pub event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GenerateQueryOutput {
    /// <p>The SQL query statement generated from the prompt.</p>
    pub fn query_statement(&self) -> ::std::option::Option<&str> {
        self.query_statement.as_deref()
    }
    /// <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
    pub fn query_alias(&self) -> ::std::option::Option<&str> {
        self.query_alias.as_deref()
    }
    /// <p>The account ID of the event data store owner.</p>
    pub fn event_data_store_owner_account_id(&self) -> ::std::option::Option<&str> {
        self.event_data_store_owner_account_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GenerateQueryOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GenerateQueryOutput {
    /// Creates a new builder-style object to manufacture [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
    pub fn builder() -> crate::operation::generate_query::builders::GenerateQueryOutputBuilder {
        crate::operation::generate_query::builders::GenerateQueryOutputBuilder::default()
    }
}

/// A builder for [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateQueryOutputBuilder {
    pub(crate) query_statement: ::std::option::Option<::std::string::String>,
    pub(crate) query_alias: ::std::option::Option<::std::string::String>,
    pub(crate) event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GenerateQueryOutputBuilder {
    /// <p>The SQL query statement generated from the prompt.</p>
    pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_statement = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SQL query statement generated from the prompt.</p>
    pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_statement = input;
        self
    }
    /// <p>The SQL query statement generated from the prompt.</p>
    pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_statement
    }
    /// <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
    pub fn query_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_alias = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
    pub fn set_query_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_alias = input;
        self
    }
    /// <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
    pub fn get_query_alias(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_alias
    }
    /// <p>The account ID of the event data store owner.</p>
    pub fn event_data_store_owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_data_store_owner_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The account ID of the event data store owner.</p>
    pub fn set_event_data_store_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_data_store_owner_account_id = input;
        self
    }
    /// <p>The account ID of the event data store owner.</p>
    pub fn get_event_data_store_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_data_store_owner_account_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
    pub fn build(self) -> crate::operation::generate_query::GenerateQueryOutput {
        crate::operation::generate_query::GenerateQueryOutput {
            query_statement: self.query_statement,
            query_alias: self.query_alias,
            event_data_store_owner_account_id: self.event_data_store_owner_account_id,
            _request_id: self._request_id,
        }
    }
}