aws_sdk_cloudtrail/operation/generate_query/
_generate_query_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GenerateQueryOutput {
6    /// <p>The SQL query statement generated from the prompt.</p>
7    pub query_statement: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub query_alias: ::std::option::Option<::std::string::String>,
10    /// <p>The account ID of the event data store owner.</p>
11    pub event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl GenerateQueryOutput {
15    /// <p>The SQL query statement generated from the prompt.</p>
16    pub fn query_statement(&self) -> ::std::option::Option<&str> {
17        self.query_statement.as_deref()
18    }
19    /// <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>
20    pub fn query_alias(&self) -> ::std::option::Option<&str> {
21        self.query_alias.as_deref()
22    }
23    /// <p>The account ID of the event data store owner.</p>
24    pub fn event_data_store_owner_account_id(&self) -> ::std::option::Option<&str> {
25        self.event_data_store_owner_account_id.as_deref()
26    }
27}
28impl ::aws_types::request_id::RequestId for GenerateQueryOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl GenerateQueryOutput {
34    /// Creates a new builder-style object to manufacture [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
35    pub fn builder() -> crate::operation::generate_query::builders::GenerateQueryOutputBuilder {
36        crate::operation::generate_query::builders::GenerateQueryOutputBuilder::default()
37    }
38}
39
40/// A builder for [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GenerateQueryOutputBuilder {
44    pub(crate) query_statement: ::std::option::Option<::std::string::String>,
45    pub(crate) query_alias: ::std::option::Option<::std::string::String>,
46    pub(crate) event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
47    _request_id: Option<String>,
48}
49impl GenerateQueryOutputBuilder {
50    /// <p>The SQL query statement generated from the prompt.</p>
51    pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.query_statement = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The SQL query statement generated from the prompt.</p>
56    pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.query_statement = input;
58        self
59    }
60    /// <p>The SQL query statement generated from the prompt.</p>
61    pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
62        &self.query_statement
63    }
64    /// <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>
65    pub fn query_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.query_alias = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <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>
70    pub fn set_query_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.query_alias = input;
72        self
73    }
74    /// <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>
75    pub fn get_query_alias(&self) -> &::std::option::Option<::std::string::String> {
76        &self.query_alias
77    }
78    /// <p>The account ID of the event data store owner.</p>
79    pub fn event_data_store_owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.event_data_store_owner_account_id = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The account ID of the event data store owner.</p>
84    pub fn set_event_data_store_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.event_data_store_owner_account_id = input;
86        self
87    }
88    /// <p>The account ID of the event data store owner.</p>
89    pub fn get_event_data_store_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.event_data_store_owner_account_id
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput).
102    pub fn build(self) -> crate::operation::generate_query::GenerateQueryOutput {
103        crate::operation::generate_query::GenerateQueryOutput {
104            query_statement: self.query_statement,
105            query_alias: self.query_alias,
106            event_data_store_owner_account_id: self.event_data_store_owner_account_id,
107            _request_id: self._request_id,
108        }
109    }
110}