aws-sdk-context 1.0.0

AWS SDK for AWS Context
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 RejectCurationProposalInput {
    /// <p>The ID of the proposal to reject.</p>
    pub curation_proposal_id: ::std::option::Option<::std::string::String>,
    /// <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
    pub agent_context_id: ::std::option::Option<::std::string::String>,
    /// <p>The revisionId the curator observed. A mismatch means a stale view.</p>
    pub revision_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl RejectCurationProposalInput {
    /// <p>The ID of the proposal to reject.</p>
    pub fn curation_proposal_id(&self) -> ::std::option::Option<&str> {
        self.curation_proposal_id.as_deref()
    }
    /// <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
    pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
        self.agent_context_id.as_deref()
    }
    /// <p>The revisionId the curator observed. A mismatch means a stale view.</p>
    pub fn revision_id(&self) -> ::std::option::Option<&str> {
        self.revision_id.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl RejectCurationProposalInput {
    /// Creates a new builder-style object to manufacture [`RejectCurationProposalInput`](crate::operation::reject_curation_proposal::RejectCurationProposalInput).
    pub fn builder() -> crate::operation::reject_curation_proposal::builders::RejectCurationProposalInputBuilder {
        crate::operation::reject_curation_proposal::builders::RejectCurationProposalInputBuilder::default()
    }
}

/// A builder for [`RejectCurationProposalInput`](crate::operation::reject_curation_proposal::RejectCurationProposalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RejectCurationProposalInputBuilder {
    pub(crate) curation_proposal_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl RejectCurationProposalInputBuilder {
    /// <p>The ID of the proposal to reject.</p>
    /// This field is required.
    pub fn curation_proposal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.curation_proposal_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the proposal to reject.</p>
    pub fn set_curation_proposal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.curation_proposal_id = input;
        self
    }
    /// <p>The ID of the proposal to reject.</p>
    pub fn get_curation_proposal_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.curation_proposal_id
    }
    /// <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
    /// This field is required.
    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_context_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_context_id = input;
        self
    }
    /// <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_context_id
    }
    /// <p>The revisionId the curator observed. A mismatch means a stale view.</p>
    /// This field is required.
    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.revision_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The revisionId the curator observed. A mismatch means a stale view.</p>
    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.revision_id = input;
        self
    }
    /// <p>The revisionId the curator observed. A mismatch means a stale view.</p>
    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.revision_id
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`RejectCurationProposalInput`](crate::operation::reject_curation_proposal::RejectCurationProposalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::reject_curation_proposal::RejectCurationProposalInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::reject_curation_proposal::RejectCurationProposalInput {
            curation_proposal_id: self.curation_proposal_id,
            agent_context_id: self.agent_context_id,
            revision_id: self.revision_id,
            client_token: self.client_token,
        })
    }
}