1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// 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,
})
}
}