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.

/// <p>Represents a single row in the query results.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Row {
    /// <p>The data in a row of query results.</p>
    pub row_data: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Document>>,
}
impl Row {
    /// <p>The data in a row of query results.</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 `.row_data.is_none()`.
    pub fn row_data(&self) -> &[::aws_smithy_types::Document] {
        self.row_data.as_deref().unwrap_or_default()
    }
}
impl Row {
    /// Creates a new builder-style object to manufacture [`Row`](crate::types::Row).
    pub fn builder() -> crate::types::builders::RowBuilder {
        crate::types::builders::RowBuilder::default()
    }
}

/// A builder for [`Row`](crate::types::Row).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RowBuilder {
    pub(crate) row_data: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Document>>,
}
impl RowBuilder {
    /// Appends an item to `row_data`.
    ///
    /// To override the contents of this collection use [`set_row_data`](Self::set_row_data).
    ///
    /// <p>The data in a row of query results.</p>
    pub fn row_data(mut self, input: ::aws_smithy_types::Document) -> Self {
        let mut v = self.row_data.unwrap_or_default();
        v.push(input);
        self.row_data = ::std::option::Option::Some(v);
        self
    }
    /// <p>The data in a row of query results.</p>
    pub fn set_row_data(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Document>>) -> Self {
        self.row_data = input;
        self
    }
    /// <p>The data in a row of query results.</p>
    pub fn get_row_data(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Document>> {
        &self.row_data
    }
    /// Consumes the builder and constructs a [`Row`](crate::types::Row).
    pub fn build(self) -> crate::types::Row {
        crate::types::Row { row_data: self.row_data }
    }
}