1 - | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <important>
|
4 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
5 - | /// </important>
|
6 - | /// <p>Describes the parameters for Select job types.</p>
|
7 - | /// <p>Learn <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">How to optimize querying your data in Amazon S3</a> using <a href="https://docs.aws.amazon.com/athena/latest/ug/what-is.html">Amazon Athena</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html">S3 Object Lambda</a>, or client-side filtering.</p>
|
8 - | #[non_exhaustive]
|
9 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
10 - | pub struct SelectParameters {
|
11 - | /// <p>Describes the serialization format of the object.</p>
|
12 - | pub input_serialization: ::std::option::Option<crate::types::InputSerialization>,
|
13 - | /// <p>The type of the provided expression (for example, SQL).</p>
|
14 - | pub expression_type: crate::types::ExpressionType,
|
15 - | /// <important>
|
16 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
17 - | /// </important>
|
18 - | /// <p>The expression that is used to query the object.</p>
|
19 - | pub expression: ::std::string::String,
|
20 - | /// <p>Describes how the results of the Select job are serialized.</p>
|
21 - | pub output_serialization: ::std::option::Option<crate::types::OutputSerialization>,
|
22 - | }
|
23 - | impl SelectParameters {
|
24 - | /// <p>Describes the serialization format of the object.</p>
|
25 - | pub fn input_serialization(&self) -> ::std::option::Option<&crate::types::InputSerialization> {
|
26 - | self.input_serialization.as_ref()
|
27 - | }
|
28 - | /// <p>The type of the provided expression (for example, SQL).</p>
|
29 - | pub fn expression_type(&self) -> &crate::types::ExpressionType {
|
30 - | &self.expression_type
|
31 - | }
|
32 - | /// <important>
|
33 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
34 - | /// </important>
|
35 - | /// <p>The expression that is used to query the object.</p>
|
36 - | pub fn expression(&self) -> &str {
|
37 - | use std::ops::Deref;
|
38 - | self.expression.deref()
|
39 - | }
|
40 - | /// <p>Describes how the results of the Select job are serialized.</p>
|
41 - | pub fn output_serialization(&self) -> ::std::option::Option<&crate::types::OutputSerialization> {
|
42 - | self.output_serialization.as_ref()
|
43 - | }
|
44 - | }
|
45 - | impl SelectParameters {
|
46 - | /// Creates a new builder-style object to manufacture [`SelectParameters`](crate::types::SelectParameters).
|
47 - | pub fn builder() -> crate::types::builders::SelectParametersBuilder {
|
48 - | crate::types::builders::SelectParametersBuilder::default()
|
49 - | }
|
50 - | }
|
51 - |
|
52 - | /// A builder for [`SelectParameters`](crate::types::SelectParameters).
|
53 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
54 - | #[non_exhaustive]
|
55 - | pub struct SelectParametersBuilder {
|
56 - | pub(crate) input_serialization: ::std::option::Option<crate::types::InputSerialization>,
|
57 - | pub(crate) expression_type: ::std::option::Option<crate::types::ExpressionType>,
|
58 - | pub(crate) expression: ::std::option::Option<::std::string::String>,
|
59 - | pub(crate) output_serialization: ::std::option::Option<crate::types::OutputSerialization>,
|
60 - | }
|
61 - | impl SelectParametersBuilder {
|
62 - | /// <p>Describes the serialization format of the object.</p>
|
63 - | /// This field is required.
|
64 - | pub fn input_serialization(mut self, input: crate::types::InputSerialization) -> Self {
|
65 - | self.input_serialization = ::std::option::Option::Some(input);
|
66 - | self
|
67 - | }
|
68 - | /// <p>Describes the serialization format of the object.</p>
|
69 - | pub fn set_input_serialization(mut self, input: ::std::option::Option<crate::types::InputSerialization>) -> Self {
|
70 - | self.input_serialization = input;
|
71 - | self
|
72 - | }
|
73 - | /// <p>Describes the serialization format of the object.</p>
|
74 - | pub fn get_input_serialization(&self) -> &::std::option::Option<crate::types::InputSerialization> {
|
75 - | &self.input_serialization
|
76 - | }
|
77 - | /// <p>The type of the provided expression (for example, SQL).</p>
|
78 - | /// This field is required.
|
79 - | pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
|
80 - | self.expression_type = ::std::option::Option::Some(input);
|
81 - | self
|
82 - | }
|
83 - | /// <p>The type of the provided expression (for example, SQL).</p>
|
84 - | pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
|
85 - | self.expression_type = input;
|
86 - | self
|
87 - | }
|
88 - | /// <p>The type of the provided expression (for example, SQL).</p>
|
89 - | pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
|
90 - | &self.expression_type
|
91 - | }
|
92 - | /// <important>
|
93 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
94 - | /// </important>
|
95 - | /// <p>The expression that is used to query the object.</p>
|
96 - | /// This field is required.
|
97 - | pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
98 - | self.expression = ::std::option::Option::Some(input.into());
|
99 - | self
|
100 - | }
|
101 - | /// <important>
|
102 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
103 - | /// </important>
|
104 - | /// <p>The expression that is used to query the object.</p>
|
105 - | pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
106 - | self.expression = input;
|
107 - | self
|
108 - | }
|
109 - | /// <important>
|
110 - | /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
|
111 - | /// </important>
|
112 - | /// <p>The expression that is used to query the object.</p>
|
113 - | pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
|
114 - | &self.expression
|
115 - | }
|
116 - | /// <p>Describes how the results of the Select job are serialized.</p>
|
117 - | /// This field is required.
|
118 - | pub fn output_serialization(mut self, input: crate::types::OutputSerialization) -> Self {
|
119 - | self.output_serialization = ::std::option::Option::Some(input);
|
120 - | self
|
121 - | }
|
122 - | /// <p>Describes how the results of the Select job are serialized.</p>
|
123 - | pub fn set_output_serialization(mut self, input: ::std::option::Option<crate::types::OutputSerialization>) -> Self {
|
124 - | self.output_serialization = input;
|
125 - | self
|
126 - | }
|
127 - | /// <p>Describes how the results of the Select job are serialized.</p>
|
128 - | pub fn get_output_serialization(&self) -> &::std::option::Option<crate::types::OutputSerialization> {
|
129 - | &self.output_serialization
|
130 - | }
|
131 - | /// Consumes the builder and constructs a [`SelectParameters`](crate::types::SelectParameters).
|
132 - | /// This method will fail if any of the following fields are not set:
|
133 - | /// - [`expression_type`](crate::types::builders::SelectParametersBuilder::expression_type)
|
134 - | /// - [`expression`](crate::types::builders::SelectParametersBuilder::expression)
|
135 - | pub fn build(self) -> ::std::result::Result<crate::types::SelectParameters, ::aws_smithy_types::error::operation::BuildError> {
|
136 - | ::std::result::Result::Ok(crate::types::SelectParameters {
|
137 - | input_serialization: self.input_serialization,
|
138 - | expression_type: self.expression_type.ok_or_else(|| {
|
139 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
140 - | "expression_type",
|
141 - | "expression_type was not specified but it is required when building SelectParameters",
|
142 - | )
|
143 - | })?,
|
144 - | expression: self.expression.ok_or_else(|| {
|
145 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
146 - | "expression",
|
147 - | "expression was not specified but it is required when building SelectParameters",
|
148 - | )
|
149 - | })?,
|
150 - | output_serialization: self.output_serialization,
|
151 - | })
|
152 - | }
|
153 - | }
|