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 CreateCommentInput {
    /// <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 ID of the document version.</p>
    pub version_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the parent comment.</p>
    pub parent_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the root comment in the thread.</p>
    pub thread_id: ::std::option::Option<::std::string::String>,
    /// <p>The text of the comment.</p>
    pub text: ::std::option::Option<::std::string::String>,
    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
    pub visibility: ::std::option::Option<crate::types::CommentVisibilityType>,
    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
    pub notify_collaborators: ::std::option::Option<bool>,
}
impl CreateCommentInput {
    /// <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 ID of the document version.</p>
    pub fn version_id(&self) -> ::std::option::Option<&str> {
        self.version_id.as_deref()
    }
    /// <p>The ID of the parent comment.</p>
    pub fn parent_id(&self) -> ::std::option::Option<&str> {
        self.parent_id.as_deref()
    }
    /// <p>The ID of the root comment in the thread.</p>
    pub fn thread_id(&self) -> ::std::option::Option<&str> {
        self.thread_id.as_deref()
    }
    /// <p>The text of the comment.</p>
    pub fn text(&self) -> ::std::option::Option<&str> {
        self.text.as_deref()
    }
    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
    pub fn visibility(&self) -> ::std::option::Option<&crate::types::CommentVisibilityType> {
        self.visibility.as_ref()
    }
    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
    pub fn notify_collaborators(&self) -> ::std::option::Option<bool> {
        self.notify_collaborators
    }
}
impl ::std::fmt::Debug for CreateCommentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateCommentInput");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("version_id", &self.version_id);
        formatter.field("parent_id", &self.parent_id);
        formatter.field("thread_id", &self.thread_id);
        formatter.field("text", &"*** Sensitive Data Redacted ***");
        formatter.field("visibility", &self.visibility);
        formatter.field("notify_collaborators", &self.notify_collaborators);
        formatter.finish()
    }
}
impl CreateCommentInput {
    /// Creates a new builder-style object to manufacture [`CreateCommentInput`](crate::operation::create_comment::CreateCommentInput).
    pub fn builder() -> crate::operation::create_comment::builders::CreateCommentInputBuilder {
        crate::operation::create_comment::builders::CreateCommentInputBuilder::default()
    }
}

/// A builder for [`CreateCommentInput`](crate::operation::create_comment::CreateCommentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateCommentInputBuilder {
    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
    pub(crate) document_id: ::std::option::Option<::std::string::String>,
    pub(crate) version_id: ::std::option::Option<::std::string::String>,
    pub(crate) parent_id: ::std::option::Option<::std::string::String>,
    pub(crate) thread_id: ::std::option::Option<::std::string::String>,
    pub(crate) text: ::std::option::Option<::std::string::String>,
    pub(crate) visibility: ::std::option::Option<crate::types::CommentVisibilityType>,
    pub(crate) notify_collaborators: ::std::option::Option<bool>,
}
impl CreateCommentInputBuilder {
    /// <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 ID of the document version.</p>
    /// This field is required.
    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the document version.</p>
    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_id = input;
        self
    }
    /// <p>The ID of the document version.</p>
    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_id
    }
    /// <p>The ID of the parent comment.</p>
    pub fn parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the parent comment.</p>
    pub fn set_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parent_id = input;
        self
    }
    /// <p>The ID of the parent comment.</p>
    pub fn get_parent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.parent_id
    }
    /// <p>The ID of the root comment in the thread.</p>
    pub fn thread_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.thread_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the root comment in the thread.</p>
    pub fn set_thread_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.thread_id = input;
        self
    }
    /// <p>The ID of the root comment in the thread.</p>
    pub fn get_thread_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.thread_id
    }
    /// <p>The text of the comment.</p>
    /// This field is required.
    pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The text of the comment.</p>
    pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.text = input;
        self
    }
    /// <p>The text of the comment.</p>
    pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.text
    }
    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
    pub fn visibility(mut self, input: crate::types::CommentVisibilityType) -> Self {
        self.visibility = ::std::option::Option::Some(input);
        self
    }
    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
    pub fn set_visibility(mut self, input: ::std::option::Option<crate::types::CommentVisibilityType>) -> Self {
        self.visibility = input;
        self
    }
    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
    pub fn get_visibility(&self) -> &::std::option::Option<crate::types::CommentVisibilityType> {
        &self.visibility
    }
    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
    pub fn notify_collaborators(mut self, input: bool) -> Self {
        self.notify_collaborators = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
    pub fn set_notify_collaborators(mut self, input: ::std::option::Option<bool>) -> Self {
        self.notify_collaborators = input;
        self
    }
    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
    pub fn get_notify_collaborators(&self) -> &::std::option::Option<bool> {
        &self.notify_collaborators
    }
    /// Consumes the builder and constructs a [`CreateCommentInput`](crate::operation::create_comment::CreateCommentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_comment::CreateCommentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_comment::CreateCommentInput {
            authentication_token: self.authentication_token,
            document_id: self.document_id,
            version_id: self.version_id,
            parent_id: self.parent_id,
            thread_id: self.thread_id,
            text: self.text,
            visibility: self.visibility,
            notify_collaborators: self.notify_collaborators,
        })
    }
}
impl ::std::fmt::Debug for CreateCommentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateCommentInputBuilder");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("document_id", &self.document_id);
        formatter.field("version_id", &self.version_id);
        formatter.field("parent_id", &self.parent_id);
        formatter.field("thread_id", &self.thread_id);
        formatter.field("text", &"*** Sensitive Data Redacted ***");
        formatter.field("visibility", &self.visibility);
        formatter.field("notify_collaborators", &self.notify_collaborators);
        formatter.finish()
    }
}