aws-sdk-qapps 1.63.0

AWS SDK for QApps
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A record created when a user submits a form card.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Submission {
    /// <p>The data submitted by the user.</p>
    pub value: ::std::option::Option<::aws_smithy_types::Document>,
    /// <p>The unique identifier of the submission.</p>
    pub submission_id: ::std::option::Option<::std::string::String>,
    /// <p>The date and time when the card is submitted.</p>
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Submission {
    /// <p>The data submitted by the user.</p>
    pub fn value(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
        self.value.as_ref()
    }
    /// <p>The unique identifier of the submission.</p>
    pub fn submission_id(&self) -> ::std::option::Option<&str> {
        self.submission_id.as_deref()
    }
    /// <p>The date and time when the card is submitted.</p>
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
impl Submission {
    /// Creates a new builder-style object to manufacture [`Submission`](crate::types::Submission).
    pub fn builder() -> crate::types::builders::SubmissionBuilder {
        crate::types::builders::SubmissionBuilder::default()
    }
}

/// A builder for [`Submission`](crate::types::Submission).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubmissionBuilder {
    pub(crate) value: ::std::option::Option<::aws_smithy_types::Document>,
    pub(crate) submission_id: ::std::option::Option<::std::string::String>,
    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SubmissionBuilder {
    /// <p>The data submitted by the user.</p>
    pub fn value(mut self, input: ::aws_smithy_types::Document) -> Self {
        self.value = ::std::option::Option::Some(input);
        self
    }
    /// <p>The data submitted by the user.</p>
    pub fn set_value(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
        self.value = input;
        self
    }
    /// <p>The data submitted by the user.</p>
    pub fn get_value(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
        &self.value
    }
    /// <p>The unique identifier of the submission.</p>
    pub fn submission_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.submission_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the submission.</p>
    pub fn set_submission_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.submission_id = input;
        self
    }
    /// <p>The unique identifier of the submission.</p>
    pub fn get_submission_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.submission_id
    }
    /// <p>The date and time when the card is submitted.</p>
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time when the card is submitted.</p>
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.timestamp = input;
        self
    }
    /// <p>The date and time when the card is submitted.</p>
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.timestamp
    }
    /// Consumes the builder and constructs a [`Submission`](crate::types::Submission).
    pub fn build(self) -> crate::types::Submission {
        crate::types::Submission {
            value: self.value,
            submission_id: self.submission_id,
            timestamp: self.timestamp,
        }
    }
}