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}
9impl DescribeStatementInput {
10 /// <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>
11 pub fn id(&self) -> ::std::option::Option<&str> {
12 self.id.as_deref()
13 }
14}
15impl DescribeStatementInput {
16 /// Creates a new builder-style object to manufacture [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
17 pub fn builder() -> crate::operation::describe_statement::builders::DescribeStatementInputBuilder {
18 crate::operation::describe_statement::builders::DescribeStatementInputBuilder::default()
19 }
20}
21
22/// A builder for [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct DescribeStatementInputBuilder {
26 pub(crate) id: ::std::option::Option<::std::string::String>,
27}
28impl DescribeStatementInputBuilder {
29 /// <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>
30 /// This field is required.
31 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32 self.id = ::std::option::Option::Some(input.into());
33 self
34 }
35 /// <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>
36 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37 self.id = input;
38 self
39 }
40 /// <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>
41 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
42 &self.id
43 }
44 /// Consumes the builder and constructs a [`DescribeStatementInput`](crate::operation::describe_statement::DescribeStatementInput).
45 pub fn build(
46 self,
47 ) -> ::std::result::Result<crate::operation::describe_statement::DescribeStatementInput, ::aws_smithy_types::error::operation::BuildError> {
48 ::std::result::Result::Ok(crate::operation::describe_statement::DescribeStatementInput { id: self.id })
49 }
50}