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 PostCommentReplyInput {
    /// <p>The system-generated ID of the comment to which you want to reply. To get this ID, use <code>GetCommentsForComparedCommit</code> or <code>GetCommentsForPullRequest</code>.</p>
    pub in_reply_to: ::std::option::Option<::std::string::String>,
    /// <p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
    /// <p>The contents of your reply to a comment.</p>
    pub content: ::std::option::Option<::std::string::String>,
}
impl PostCommentReplyInput {
    /// <p>The system-generated ID of the comment to which you want to reply. To get this ID, use <code>GetCommentsForComparedCommit</code> or <code>GetCommentsForPullRequest</code>.</p>
    pub fn in_reply_to(&self) -> ::std::option::Option<&str> {
        self.in_reply_to.as_deref()
    }
    /// <p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
    /// <p>The contents of your reply to a comment.</p>
    pub fn content(&self) -> ::std::option::Option<&str> {
        self.content.as_deref()
    }
}
impl PostCommentReplyInput {
    /// Creates a new builder-style object to manufacture [`PostCommentReplyInput`](crate::operation::post_comment_reply::PostCommentReplyInput).
    pub fn builder() -> crate::operation::post_comment_reply::builders::PostCommentReplyInputBuilder {
        crate::operation::post_comment_reply::builders::PostCommentReplyInputBuilder::default()
    }
}

/// A builder for [`PostCommentReplyInput`](crate::operation::post_comment_reply::PostCommentReplyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PostCommentReplyInputBuilder {
    pub(crate) in_reply_to: ::std::option::Option<::std::string::String>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<::std::string::String>,
}
impl PostCommentReplyInputBuilder {
    /// <p>The system-generated ID of the comment to which you want to reply. To get this ID, use <code>GetCommentsForComparedCommit</code> or <code>GetCommentsForPullRequest</code>.</p>
    /// This field is required.
    pub fn in_reply_to(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.in_reply_to = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The system-generated ID of the comment to which you want to reply. To get this ID, use <code>GetCommentsForComparedCommit</code> or <code>GetCommentsForPullRequest</code>.</p>
    pub fn set_in_reply_to(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.in_reply_to = input;
        self
    }
    /// <p>The system-generated ID of the comment to which you want to reply. To get this ID, use <code>GetCommentsForComparedCommit</code> or <code>GetCommentsForPullRequest</code>.</p>
    pub fn get_in_reply_to(&self) -> &::std::option::Option<::std::string::String> {
        &self.in_reply_to
    }
    /// <p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.</p>
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// <p>The contents of your reply to a comment.</p>
    /// This field is required.
    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The contents of your reply to a comment.</p>
    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content = input;
        self
    }
    /// <p>The contents of your reply to a comment.</p>
    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.content
    }
    /// Consumes the builder and constructs a [`PostCommentReplyInput`](crate::operation::post_comment_reply::PostCommentReplyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::post_comment_reply::PostCommentReplyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::post_comment_reply::PostCommentReplyInput {
            in_reply_to: self.in_reply_to,
            client_request_token: self.client_request_token,
            content: self.content,
        })
    }
}