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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// 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 AcceptCurationProposalInput {
/// <p>The ID of the proposal to accept.</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 proposal's current state, and the same token used with another proposal returns a <code>ValidationException</code>.</p>
pub client_token: ::std::option::Option<::std::string::String>,
}
impl AcceptCurationProposalInput {
/// <p>The ID of the proposal to accept.</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 proposal's current state, 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 AcceptCurationProposalInput {
/// Creates a new builder-style object to manufacture [`AcceptCurationProposalInput`](crate::operation::accept_curation_proposal::AcceptCurationProposalInput).
pub fn builder() -> crate::operation::accept_curation_proposal::builders::AcceptCurationProposalInputBuilder {
crate::operation::accept_curation_proposal::builders::AcceptCurationProposalInputBuilder::default()
}
}
/// A builder for [`AcceptCurationProposalInput`](crate::operation::accept_curation_proposal::AcceptCurationProposalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptCurationProposalInputBuilder {
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 AcceptCurationProposalInputBuilder {
/// <p>The ID of the proposal to accept.</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 accept.</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 accept.</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 proposal's current state, 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 proposal's current state, 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 proposal's current state, 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 [`AcceptCurationProposalInput`](crate::operation::accept_curation_proposal::AcceptCurationProposalInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::accept_curation_proposal::AcceptCurationProposalInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::accept_curation_proposal::AcceptCurationProposalInput {
curation_proposal_id: self.curation_proposal_id,
agent_context_id: self.agent_context_id,
revision_id: self.revision_id,
client_token: self.client_token,
})
}
}