Skip to main content

aws_sdk_athena/types/
_datum.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A piece of data (a field in the table).</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Datum {
7    /// <p>The value of the datum.</p>
8    pub var_char_value: ::std::option::Option<::std::string::String>,
9}
10impl Datum {
11    /// <p>The value of the datum.</p>
12    pub fn var_char_value(&self) -> ::std::option::Option<&str> {
13        self.var_char_value.as_deref()
14    }
15}
16impl Datum {
17    /// Creates a new builder-style object to manufacture [`Datum`](crate::types::Datum).
18    pub fn builder() -> crate::types::builders::DatumBuilder {
19        crate::types::builders::DatumBuilder::default()
20    }
21}
22
23/// A builder for [`Datum`](crate::types::Datum).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct DatumBuilder {
27    pub(crate) var_char_value: ::std::option::Option<::std::string::String>,
28}
29impl DatumBuilder {
30    /// <p>The value of the datum.</p>
31    pub fn var_char_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.var_char_value = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The value of the datum.</p>
36    pub fn set_var_char_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.var_char_value = input;
38        self
39    }
40    /// <p>The value of the datum.</p>
41    pub fn get_var_char_value(&self) -> &::std::option::Option<::std::string::String> {
42        &self.var_char_value
43    }
44    /// Consumes the builder and constructs a [`Datum`](crate::types::Datum).
45    pub fn build(self) -> crate::types::Datum {
46        crate::types::Datum {
47            var_char_value: self.var_char_value,
48        }
49    }
50}