1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// 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 GenerateQueryInput {
/// <p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p>
pub event_data_stores: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p>
pub prompt: ::std::option::Option<::std::string::String>,
}
impl GenerateQueryInput {
/// <p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.event_data_stores.is_none()`.
pub fn event_data_stores(&self) -> &[::std::string::String] {
self.event_data_stores.as_deref().unwrap_or_default()
}
/// <p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p>
pub fn prompt(&self) -> ::std::option::Option<&str> {
self.prompt.as_deref()
}
}
impl GenerateQueryInput {
/// Creates a new builder-style object to manufacture [`GenerateQueryInput`](crate::operation::generate_query::GenerateQueryInput).
pub fn builder() -> crate::operation::generate_query::builders::GenerateQueryInputBuilder {
crate::operation::generate_query::builders::GenerateQueryInputBuilder::default()
}
}
/// A builder for [`GenerateQueryInput`](crate::operation::generate_query::GenerateQueryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateQueryInputBuilder {
pub(crate) event_data_stores: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) prompt: ::std::option::Option<::std::string::String>,
}
impl GenerateQueryInputBuilder {
/// Appends an item to `event_data_stores`.
///
/// To override the contents of this collection use [`set_event_data_stores`](Self::set_event_data_stores).
///
/// <p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p>
pub fn event_data_stores(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.event_data_stores.unwrap_or_default();
v.push(input.into());
self.event_data_stores = ::std::option::Option::Some(v);
self
}
/// <p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p>
pub fn set_event_data_stores(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.event_data_stores = input;
self
}
/// <p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p>
pub fn get_event_data_stores(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.event_data_stores
}
/// <p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p>
/// This field is required.
pub fn prompt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.prompt = ::std::option::Option::Some(input.into());
self
}
/// <p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p>
pub fn set_prompt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.prompt = input;
self
}
/// <p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p>
pub fn get_prompt(&self) -> &::std::option::Option<::std::string::String> {
&self.prompt
}
/// Consumes the builder and constructs a [`GenerateQueryInput`](crate::operation::generate_query::GenerateQueryInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::generate_query::GenerateQueryInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::generate_query::GenerateQueryInput {
event_data_stores: self.event_data_stores,
prompt: self.prompt,
})
}
}