aws_sdk_redshiftdata/operation/describe_statement/_describe_statement_input.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 DescribeStatementInput {
6 /// <p>The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>.</p>
7 pub id: ::std::option::Option<::std::string::String>,
8 /// <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
9 pub wait_time_seconds: ::std::option::Option<i32>,
10}
11impl DescribeStatementInput {
12 /// <p>The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>.</p>
13 pub fn id(&self) -> ::std::option::Option<&str> {
14 self.id.as_deref()
15 }
16 /// <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
17 pub fn wait_time_seconds(&self) -> ::std::option::Option<i32> {
18 self.wait_time_seconds
19 }
20}
21impl DescribeStatementInput {
22 /// Creates a new builder-style object to manufacture [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
23 pub fn builder() -> crate::operation::describe_statement::builders::DescribeStatementInputBuilder {
24 crate::operation::describe_statement::builders::DescribeStatementInputBuilder::default()
25 }
26}
27
28/// A builder for [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeStatementInputBuilder {
32 pub(crate) id: ::std::option::Option<::std::string::String>,
33 pub(crate) wait_time_seconds: ::std::option::Option<i32>,
34}
35impl DescribeStatementInputBuilder {
36 /// <p>The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>.</p>
37 /// This field is required.
38 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>.</p>
43 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.id = input;
45 self
46 }
47 /// <p>The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>.</p>
48 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.id
50 }
51 /// <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
52 pub fn wait_time_seconds(mut self, input: i32) -> Self {
53 self.wait_time_seconds = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
57 pub fn set_wait_time_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
58 self.wait_time_seconds = input;
59 self
60 }
61 /// <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
62 pub fn get_wait_time_seconds(&self) -> &::std::option::Option<i32> {
63 &self.wait_time_seconds
64 }
65 /// Consumes the builder and constructs a [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
66 pub fn build(
67 self,
68 ) -> ::std::result::Result<crate::operation::describe_statement::DescribeStatementInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::describe_statement::DescribeStatementInput {
70 id: self.id,
71 wait_time_seconds: self.wait_time_seconds,
72 })
73 }
74}