aws-sdk-codecommit 1.99.0

AWS SDK for AWS CodeCommit
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, ::std::fmt::Debug)]
pub struct PutCommentReactionInput {
    /// <p>The ID of the comment to which you want to add or update a reaction.</p>
    pub comment_id: ::std::option::Option<::std::string::String>,
    /// <p>The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table">CodeCommit User Guide</a>.</p>
    pub reaction_value: ::std::option::Option<::std::string::String>,
}
impl PutCommentReactionInput {
    /// <p>The ID of the comment to which you want to add or update a reaction.</p>
    pub fn comment_id(&self) -> ::std::option::Option<&str> {
        self.comment_id.as_deref()
    }
    /// <p>The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table">CodeCommit User Guide</a>.</p>
    pub fn reaction_value(&self) -> ::std::option::Option<&str> {
        self.reaction_value.as_deref()
    }
}
impl PutCommentReactionInput {
    /// Creates a new builder-style object to manufacture [`PutCommentReactionInput`](crate::operation::put_comment_reaction::PutCommentReactionInput).
    pub fn builder() -> crate::operation::put_comment_reaction::builders::PutCommentReactionInputBuilder {
        crate::operation::put_comment_reaction::builders::PutCommentReactionInputBuilder::default()
    }
}

/// A builder for [`PutCommentReactionInput`](crate::operation::put_comment_reaction::PutCommentReactionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutCommentReactionInputBuilder {
    pub(crate) comment_id: ::std::option::Option<::std::string::String>,
    pub(crate) reaction_value: ::std::option::Option<::std::string::String>,
}
impl PutCommentReactionInputBuilder {
    /// <p>The ID of the comment to which you want to add or update a reaction.</p>
    /// This field is required.
    pub fn comment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.comment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the comment to which you want to add or update a reaction.</p>
    pub fn set_comment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.comment_id = input;
        self
    }
    /// <p>The ID of the comment to which you want to add or update a reaction.</p>
    pub fn get_comment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.comment_id
    }
    /// <p>The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table">CodeCommit User Guide</a>.</p>
    /// This field is required.
    pub fn reaction_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reaction_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table">CodeCommit User Guide</a>.</p>
    pub fn set_reaction_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reaction_value = input;
        self
    }
    /// <p>The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table">CodeCommit User Guide</a>.</p>
    pub fn get_reaction_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.reaction_value
    }
    /// Consumes the builder and constructs a [`PutCommentReactionInput`](crate::operation::put_comment_reaction::PutCommentReactionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_comment_reaction::PutCommentReactionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::put_comment_reaction::PutCommentReactionInput {
            comment_id: self.comment_id,
            reaction_value: self.reaction_value,
        })
    }
}