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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// 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)]
pub struct StartTaskInput {
/// <p>The agent context, as an ID or ARN.</p>
pub agent_context_id: ::std::option::Option<::std::string::String>,
/// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
pub client_token: ::std::option::Option<::std::string::String>,
/// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
pub input_configuration: ::std::option::Option<crate::types::TaskInputConfiguration>,
/// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
pub access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
}
impl StartTaskInput {
/// <p>The agent context, as an ID or ARN.</p>
pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
self.agent_context_id.as_deref()
}
/// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
/// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
pub fn input_configuration(&self) -> ::std::option::Option<&crate::types::TaskInputConfiguration> {
self.input_configuration.as_ref()
}
/// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
pub fn access_control_config(&self) -> ::std::option::Option<&crate::types::AccessControlConfig> {
self.access_control_config.as_ref()
}
}
impl ::std::fmt::Debug for StartTaskInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartTaskInput");
formatter.field("agent_context_id", &self.agent_context_id);
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("input_configuration", &self.input_configuration);
formatter.field("access_control_config", &self.access_control_config);
formatter.finish()
}
}
impl StartTaskInput {
/// Creates a new builder-style object to manufacture [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
pub fn builder() -> crate::operation::start_task::builders::StartTaskInputBuilder {
crate::operation::start_task::builders::StartTaskInputBuilder::default()
}
}
/// A builder for [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartTaskInputBuilder {
pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) input_configuration: ::std::option::Option<crate::types::TaskInputConfiguration>,
pub(crate) access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
}
impl StartTaskInputBuilder {
/// <p>The agent context, as an 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, as an 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, as an ID or ARN.</p>
pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_context_id
}
/// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <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 ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <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 ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
/// This field is required.
pub fn input_configuration(mut self, input: crate::types::TaskInputConfiguration) -> Self {
self.input_configuration = ::std::option::Option::Some(input);
self
}
/// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
pub fn set_input_configuration(mut self, input: ::std::option::Option<crate::types::TaskInputConfiguration>) -> Self {
self.input_configuration = input;
self
}
/// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
pub fn get_input_configuration(&self) -> &::std::option::Option<crate::types::TaskInputConfiguration> {
&self.input_configuration
}
/// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
pub fn access_control_config(mut self, input: crate::types::AccessControlConfig) -> Self {
self.access_control_config = ::std::option::Option::Some(input);
self
}
/// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
pub fn set_access_control_config(mut self, input: ::std::option::Option<crate::types::AccessControlConfig>) -> Self {
self.access_control_config = input;
self
}
/// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
pub fn get_access_control_config(&self) -> &::std::option::Option<crate::types::AccessControlConfig> {
&self.access_control_config
}
/// Consumes the builder and constructs a [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
pub fn build(self) -> ::std::result::Result<crate::operation::start_task::StartTaskInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::start_task::StartTaskInput {
agent_context_id: self.agent_context_id,
client_token: self.client_token,
description: self.description,
input_configuration: self.input_configuration,
access_control_config: self.access_control_config,
})
}
}
impl ::std::fmt::Debug for StartTaskInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartTaskInputBuilder");
formatter.field("agent_context_id", &self.agent_context_id);
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("input_configuration", &self.input_configuration);
formatter.field("access_control_config", &self.access_control_config);
formatter.finish()
}
}