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
// 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 AssociateCurationPolicyInput {
/// <p>The agent context, by its ID or ARN.</p>
pub agent_context_id: ::std::option::Option<::std::string::String>,
/// <p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p>
pub curation_policy_id: ::std::option::Option<::std::string::String>,
}
impl AssociateCurationPolicyInput {
/// <p>The agent context, by its ID or ARN.</p>
pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
self.agent_context_id.as_deref()
}
/// <p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p>
pub fn curation_policy_id(&self) -> ::std::option::Option<&str> {
self.curation_policy_id.as_deref()
}
}
impl AssociateCurationPolicyInput {
/// Creates a new builder-style object to manufacture [`AssociateCurationPolicyInput`](crate::operation::associate_curation_policy::AssociateCurationPolicyInput).
pub fn builder() -> crate::operation::associate_curation_policy::builders::AssociateCurationPolicyInputBuilder {
crate::operation::associate_curation_policy::builders::AssociateCurationPolicyInputBuilder::default()
}
}
/// A builder for [`AssociateCurationPolicyInput`](crate::operation::associate_curation_policy::AssociateCurationPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateCurationPolicyInputBuilder {
pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
pub(crate) curation_policy_id: ::std::option::Option<::std::string::String>,
}
impl AssociateCurationPolicyInputBuilder {
/// <p>The agent context, by its ID or ARN.</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, by its ID or ARN.</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, by its ID or ARN.</p>
pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_context_id
}
/// <p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p>
/// This field is required.
pub fn curation_policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.curation_policy_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p>
pub fn set_curation_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.curation_policy_id = input;
self
}
/// <p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p>
pub fn get_curation_policy_id(&self) -> &::std::option::Option<::std::string::String> {
&self.curation_policy_id
}
/// Consumes the builder and constructs a [`AssociateCurationPolicyInput`](crate::operation::associate_curation_policy::AssociateCurationPolicyInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::associate_curation_policy::AssociateCurationPolicyInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::associate_curation_policy::AssociateCurationPolicyInput {
agent_context_id: self.agent_context_id,
curation_policy_id: self.curation_policy_id,
})
}
}