aws-sdk-iottwinmaker 1.101.0

AWS SDK for AWS IoT TwinMaker
Documentation
// 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 ExecuteQueryInput {
    /// <p>The ID of the workspace.</p>
    pub workspace_id: ::std::option::Option<::std::string::String>,
    /// <p>The query statement.</p>
    pub query_statement: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return at one time. The default is 50.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The string that specifies the next page of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ExecuteQueryInput {
    /// <p>The ID of the workspace.</p>
    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
        self.workspace_id.as_deref()
    }
    /// <p>The query statement.</p>
    pub fn query_statement(&self) -> ::std::option::Option<&str> {
        self.query_statement.as_deref()
    }
    /// <p>The maximum number of results to return at one time. The default is 50.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The string that specifies the next page of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ExecuteQueryInput {
    /// Creates a new builder-style object to manufacture [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
    pub fn builder() -> crate::operation::execute_query::builders::ExecuteQueryInputBuilder {
        crate::operation::execute_query::builders::ExecuteQueryInputBuilder::default()
    }
}

/// A builder for [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExecuteQueryInputBuilder {
    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
    pub(crate) query_statement: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ExecuteQueryInputBuilder {
    /// <p>The ID of the workspace.</p>
    /// This field is required.
    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workspace_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the workspace.</p>
    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workspace_id = input;
        self
    }
    /// <p>The ID of the workspace.</p>
    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.workspace_id
    }
    /// <p>The query statement.</p>
    /// This field is required.
    pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_statement = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The query statement.</p>
    pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_statement = input;
        self
    }
    /// <p>The query statement.</p>
    pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_statement
    }
    /// <p>The maximum number of results to return at one time. The default is 50.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return at one time. The default is 50.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return at one time. The default is 50.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The string that specifies the next page of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The string that specifies the next page of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The string that specifies the next page of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::execute_query::ExecuteQueryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::execute_query::ExecuteQueryInput {
            workspace_id: self.workspace_id,
            query_statement: self.query_statement,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}