aws_sdk_cloudtrail/operation/start_query/
_start_query_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartQueryInput {
6 pub query_statement: ::std::option::Option<::std::string::String>,
8 pub delivery_s3_uri: ::std::option::Option<::std::string::String>,
10 pub query_alias: ::std::option::Option<::std::string::String>,
12 pub query_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 pub event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
16}
17impl StartQueryInput {
18 pub fn query_statement(&self) -> ::std::option::Option<&str> {
20 self.query_statement.as_deref()
21 }
22 pub fn delivery_s3_uri(&self) -> ::std::option::Option<&str> {
24 self.delivery_s3_uri.as_deref()
25 }
26 pub fn query_alias(&self) -> ::std::option::Option<&str> {
28 self.query_alias.as_deref()
29 }
30 pub fn query_parameters(&self) -> &[::std::string::String] {
34 self.query_parameters.as_deref().unwrap_or_default()
35 }
36 pub fn event_data_store_owner_account_id(&self) -> ::std::option::Option<&str> {
38 self.event_data_store_owner_account_id.as_deref()
39 }
40}
41impl StartQueryInput {
42 pub fn builder() -> crate::operation::start_query::builders::StartQueryInputBuilder {
44 crate::operation::start_query::builders::StartQueryInputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct StartQueryInputBuilder {
52 pub(crate) query_statement: ::std::option::Option<::std::string::String>,
53 pub(crate) delivery_s3_uri: ::std::option::Option<::std::string::String>,
54 pub(crate) query_alias: ::std::option::Option<::std::string::String>,
55 pub(crate) query_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
56 pub(crate) event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
57}
58impl StartQueryInputBuilder {
59 pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.query_statement = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.query_statement = input;
67 self
68 }
69 pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
71 &self.query_statement
72 }
73 pub fn delivery_s3_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.delivery_s3_uri = ::std::option::Option::Some(input.into());
76 self
77 }
78 pub fn set_delivery_s3_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.delivery_s3_uri = input;
81 self
82 }
83 pub fn get_delivery_s3_uri(&self) -> &::std::option::Option<::std::string::String> {
85 &self.delivery_s3_uri
86 }
87 pub fn query_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.query_alias = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_query_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.query_alias = input;
95 self
96 }
97 pub fn get_query_alias(&self) -> &::std::option::Option<::std::string::String> {
99 &self.query_alias
100 }
101 pub fn query_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 let mut v = self.query_parameters.unwrap_or_default();
108 v.push(input.into());
109 self.query_parameters = ::std::option::Option::Some(v);
110 self
111 }
112 pub fn set_query_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
114 self.query_parameters = input;
115 self
116 }
117 pub fn get_query_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
119 &self.query_parameters
120 }
121 pub fn event_data_store_owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.event_data_store_owner_account_id = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_event_data_store_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.event_data_store_owner_account_id = input;
129 self
130 }
131 pub fn get_event_data_store_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
133 &self.event_data_store_owner_account_id
134 }
135 pub fn build(self) -> ::std::result::Result<crate::operation::start_query::StartQueryInput, ::aws_smithy_types::error::operation::BuildError> {
137 ::std::result::Result::Ok(crate::operation::start_query::StartQueryInput {
138 query_statement: self.query_statement,
139 delivery_s3_uri: self.delivery_s3_uri,
140 query_alias: self.query_alias,
141 query_parameters: self.query_parameters,
142 event_data_store_owner_account_id: self.event_data_store_owner_account_id,
143 })
144 }
145}