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 GetCurationProposalInput {
    /// <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 proposal to fetch, by its opaque instance ID.</p>
    pub curation_proposal_id: ::std::option::Option<::std::string::String>,
}
impl GetCurationProposalInput {
    /// <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 proposal to fetch, by its opaque instance ID.</p>
    pub fn curation_proposal_id(&self) -> ::std::option::Option<&str> {
        self.curation_proposal_id.as_deref()
    }
}
impl GetCurationProposalInput {
    /// Creates a new builder-style object to manufacture [`GetCurationProposalInput`](crate::operation::get_curation_proposal::GetCurationProposalInput).
    pub fn builder() -> crate::operation::get_curation_proposal::builders::GetCurationProposalInputBuilder {
        crate::operation::get_curation_proposal::builders::GetCurationProposalInputBuilder::default()
    }
}

/// A builder for [`GetCurationProposalInput`](crate::operation::get_curation_proposal::GetCurationProposalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetCurationProposalInputBuilder {
    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
    pub(crate) curation_proposal_id: ::std::option::Option<::std::string::String>,
}
impl GetCurationProposalInputBuilder {
    /// <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 proposal to fetch, by its opaque instance ID.</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 proposal to fetch, by its opaque instance ID.</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 proposal to fetch, by its opaque instance ID.</p>
    pub fn get_curation_proposal_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.curation_proposal_id
    }
    /// Consumes the builder and constructs a [`GetCurationProposalInput`](crate::operation::get_curation_proposal::GetCurationProposalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_curation_proposal::GetCurationProposalInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_curation_proposal::GetCurationProposalInput {
            agent_context_id: self.agent_context_id,
            curation_proposal_id: self.curation_proposal_id,
        })
    }
}