aws-sdk-workdocs 1.97.0

AWS SDK for Amazon WorkDocs
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)]
pub struct GetDocumentInput {
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub authentication_token: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the document.</p>
    pub document_id: ::std::option::Option<::std::string::String>,
    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
    pub include_custom_metadata: ::std::option::Option<bool>,
}
impl GetDocumentInput {
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn authentication_token(&self) -> ::std::option::Option<&str> {
        self.authentication_token.as_deref()
    }
    /// <p>The ID of the document.</p>
    pub fn document_id(&self) -> ::std::option::Option<&str> {
        self.document_id.as_deref()
    }
    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
    pub fn include_custom_metadata(&self) -> ::std::option::Option<bool> {
        self.include_custom_metadata
    }
}
impl ::std::fmt::Debug for GetDocumentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetDocumentInput");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("include_custom_metadata", &self.include_custom_metadata);
        formatter.finish()
    }
}
impl GetDocumentInput {
    /// Creates a new builder-style object to manufacture [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
    pub fn builder() -> crate::operation::get_document::builders::GetDocumentInputBuilder {
        crate::operation::get_document::builders::GetDocumentInputBuilder::default()
    }
}

/// A builder for [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetDocumentInputBuilder {
    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
    pub(crate) document_id: ::std::option::Option<::std::string::String>,
    pub(crate) include_custom_metadata: ::std::option::Option<bool>,
}
impl GetDocumentInputBuilder {
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.authentication_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.authentication_token = input;
        self
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.authentication_token
    }
    /// <p>The ID of the document.</p>
    /// This field is required.
    pub fn document_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.document_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the document.</p>
    pub fn set_document_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_id = input;
        self
    }
    /// <p>The ID of the document.</p>
    pub fn get_document_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_id
    }
    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
    pub fn include_custom_metadata(mut self, input: bool) -> Self {
        self.include_custom_metadata = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
    pub fn set_include_custom_metadata(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_custom_metadata = input;
        self
    }
    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
    pub fn get_include_custom_metadata(&self) -> &::std::option::Option<bool> {
        &self.include_custom_metadata
    }
    /// Consumes the builder and constructs a [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_document::GetDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_document::GetDocumentInput {
            authentication_token: self.authentication_token,
            document_id: self.document_id,
            include_custom_metadata: self.include_custom_metadata,
        })
    }
}
impl ::std::fmt::Debug for GetDocumentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetDocumentInputBuilder");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("include_custom_metadata", &self.include_custom_metadata);
        formatter.finish()
    }
}