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 UpdateDocumentInput {
    /// <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>The name of the document.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the parent folder.</p>
    pub parent_folder_id: ::std::option::Option<::std::string::String>,
    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
    pub resource_state: ::std::option::Option<crate::types::ResourceStateType>,
}
impl UpdateDocumentInput {
    /// <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>The name of the document.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the parent folder.</p>
    pub fn parent_folder_id(&self) -> ::std::option::Option<&str> {
        self.parent_folder_id.as_deref()
    }
    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
    pub fn resource_state(&self) -> ::std::option::Option<&crate::types::ResourceStateType> {
        self.resource_state.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateDocumentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDocumentInput");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("parent_folder_id", &self.parent_folder_id);
        formatter.field("resource_state", &self.resource_state);
        formatter.finish()
    }
}
impl UpdateDocumentInput {
    /// Creates a new builder-style object to manufacture [`UpdateDocumentInput`](crate::operation::update_document::UpdateDocumentInput).
    pub fn builder() -> crate::operation::update_document::builders::UpdateDocumentInputBuilder {
        crate::operation::update_document::builders::UpdateDocumentInputBuilder::default()
    }
}

/// A builder for [`UpdateDocumentInput`](crate::operation::update_document::UpdateDocumentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateDocumentInputBuilder {
    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
    pub(crate) document_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) parent_folder_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_state: ::std::option::Option<crate::types::ResourceStateType>,
}
impl UpdateDocumentInputBuilder {
    /// <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>The name of the document.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the document.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the document.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The ID of the parent folder.</p>
    pub fn parent_folder_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parent_folder_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the parent folder.</p>
    pub fn set_parent_folder_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parent_folder_id = input;
        self
    }
    /// <p>The ID of the parent folder.</p>
    pub fn get_parent_folder_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.parent_folder_id
    }
    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
    pub fn resource_state(mut self, input: crate::types::ResourceStateType) -> Self {
        self.resource_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
    pub fn set_resource_state(mut self, input: ::std::option::Option<crate::types::ResourceStateType>) -> Self {
        self.resource_state = input;
        self
    }
    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
    pub fn get_resource_state(&self) -> &::std::option::Option<crate::types::ResourceStateType> {
        &self.resource_state
    }
    /// Consumes the builder and constructs a [`UpdateDocumentInput`](crate::operation::update_document::UpdateDocumentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_document::UpdateDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_document::UpdateDocumentInput {
            authentication_token: self.authentication_token,
            document_id: self.document_id,
            name: self.name,
            parent_folder_id: self.parent_folder_id,
            resource_state: self.resource_state,
        })
    }
}
impl ::std::fmt::Debug for UpdateDocumentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDocumentInputBuilder");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("parent_folder_id", &self.parent_folder_id);
        formatter.field("resource_state", &self.resource_state);
        formatter.finish()
    }
}