aws-sdk-devopsagent 1.10.0

AWS SDK for AWS DevOps Agent Service
Documentation
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a recommendation with all its properties and metadata</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recommendation {
    /// <p>ARN of the agent space this recommendation belongs to</p>
    pub agent_space_arn: ::std::string::String,
    /// <p>The unique identifier for this recommendation</p>
    pub recommendation_id: ::std::string::String,
    /// <p>ID of the task that generated the recommendation</p>
    pub task_id: ::std::string::String,
    /// <p>ID of the goal this recommendation is associated with</p>
    pub goal_id: ::std::option::Option<::std::string::String>,
    /// <p>The title of the recommendation</p>
    pub title: ::std::string::String,
    /// <p>Content of the recommendation</p>
    pub content: ::std::option::Option<crate::types::RecommendationContent>,
    /// <p>Current status of the recommendation</p>
    pub status: crate::types::RecommendationStatus,
    /// <p>Priority level of the recommendation</p>
    pub priority: crate::types::RecommendationPriority,
    /// <p>Version of the goal at the time this recommendation was generated</p>
    pub goal_version: ::std::option::Option<i64>,
    /// <p>Additional context for recommendation</p>
    pub additional_context: ::std::option::Option<::std::string::String>,
    /// <p>Position in ranked list (1 = highest priority)</p>
    pub rank_position: ::std::option::Option<i32>,
    /// <p>Timestamp when the recommendation was last ranked</p>
    pub ranked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Timestamp when this recommendation was created</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>Timestamp when this recommendation was last updated</p>
    pub updated_at: ::aws_smithy_types::DateTime,
    /// <p>Version number for optimistic locking</p>
    pub version: i64,
}
impl Recommendation {
    /// <p>ARN of the agent space this recommendation belongs to</p>
    pub fn agent_space_arn(&self) -> &str {
        use std::ops::Deref;
        self.agent_space_arn.deref()
    }
    /// <p>The unique identifier for this recommendation</p>
    pub fn recommendation_id(&self) -> &str {
        use std::ops::Deref;
        self.recommendation_id.deref()
    }
    /// <p>ID of the task that generated the recommendation</p>
    pub fn task_id(&self) -> &str {
        use std::ops::Deref;
        self.task_id.deref()
    }
    /// <p>ID of the goal this recommendation is associated with</p>
    pub fn goal_id(&self) -> ::std::option::Option<&str> {
        self.goal_id.as_deref()
    }
    /// <p>The title of the recommendation</p>
    pub fn title(&self) -> &str {
        use std::ops::Deref;
        self.title.deref()
    }
    /// <p>Content of the recommendation</p>
    pub fn content(&self) -> ::std::option::Option<&crate::types::RecommendationContent> {
        self.content.as_ref()
    }
    /// <p>Current status of the recommendation</p>
    pub fn status(&self) -> &crate::types::RecommendationStatus {
        &self.status
    }
    /// <p>Priority level of the recommendation</p>
    pub fn priority(&self) -> &crate::types::RecommendationPriority {
        &self.priority
    }
    /// <p>Version of the goal at the time this recommendation was generated</p>
    pub fn goal_version(&self) -> ::std::option::Option<i64> {
        self.goal_version
    }
    /// <p>Additional context for recommendation</p>
    pub fn additional_context(&self) -> ::std::option::Option<&str> {
        self.additional_context.as_deref()
    }
    /// <p>Position in ranked list (1 = highest priority)</p>
    pub fn rank_position(&self) -> ::std::option::Option<i32> {
        self.rank_position
    }
    /// <p>Timestamp when the recommendation was last ranked</p>
    pub fn ranked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ranked_at.as_ref()
    }
    /// <p>Timestamp when this recommendation was created</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>Timestamp when this recommendation was last updated</p>
    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
        &self.updated_at
    }
    /// <p>Version number for optimistic locking</p>
    pub fn version(&self) -> i64 {
        self.version
    }
}
impl Recommendation {
    /// Creates a new builder-style object to manufacture [`Recommendation`](crate::types::Recommendation).
    pub fn builder() -> crate::types::builders::RecommendationBuilder {
        crate::types::builders::RecommendationBuilder::default()
    }
}

/// A builder for [`Recommendation`](crate::types::Recommendation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecommendationBuilder {
    pub(crate) agent_space_arn: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) goal_id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<crate::types::RecommendationContent>,
    pub(crate) status: ::std::option::Option<crate::types::RecommendationStatus>,
    pub(crate) priority: ::std::option::Option<crate::types::RecommendationPriority>,
    pub(crate) goal_version: ::std::option::Option<i64>,
    pub(crate) additional_context: ::std::option::Option<::std::string::String>,
    pub(crate) rank_position: ::std::option::Option<i32>,
    pub(crate) ranked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) version: ::std::option::Option<i64>,
}
impl RecommendationBuilder {
    /// <p>ARN of the agent space this recommendation belongs to</p>
    /// This field is required.
    pub fn agent_space_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of the agent space this recommendation belongs to</p>
    pub fn set_agent_space_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_arn = input;
        self
    }
    /// <p>ARN of the agent space this recommendation belongs to</p>
    pub fn get_agent_space_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_arn
    }
    /// <p>The unique identifier for this recommendation</p>
    /// This field is required.
    pub fn recommendation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommendation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for this recommendation</p>
    pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_id = input;
        self
    }
    /// <p>The unique identifier for this recommendation</p>
    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_id
    }
    /// <p>ID of the task that generated the recommendation</p>
    /// This field is required.
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID of the task that generated the recommendation</p>
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// <p>ID of the task that generated the recommendation</p>
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// <p>ID of the goal this recommendation is associated with</p>
    pub fn goal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.goal_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID of the goal this recommendation is associated with</p>
    pub fn set_goal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.goal_id = input;
        self
    }
    /// <p>ID of the goal this recommendation is associated with</p>
    pub fn get_goal_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.goal_id
    }
    /// <p>The title of the recommendation</p>
    /// This field is required.
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the recommendation</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the recommendation</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>Content of the recommendation</p>
    /// This field is required.
    pub fn content(mut self, input: crate::types::RecommendationContent) -> Self {
        self.content = ::std::option::Option::Some(input);
        self
    }
    /// <p>Content of the recommendation</p>
    pub fn set_content(mut self, input: ::std::option::Option<crate::types::RecommendationContent>) -> Self {
        self.content = input;
        self
    }
    /// <p>Content of the recommendation</p>
    pub fn get_content(&self) -> &::std::option::Option<crate::types::RecommendationContent> {
        &self.content
    }
    /// <p>Current status of the recommendation</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::RecommendationStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Current status of the recommendation</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RecommendationStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Current status of the recommendation</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RecommendationStatus> {
        &self.status
    }
    /// <p>Priority level of the recommendation</p>
    /// This field is required.
    pub fn priority(mut self, input: crate::types::RecommendationPriority) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>Priority level of the recommendation</p>
    pub fn set_priority(mut self, input: ::std::option::Option<crate::types::RecommendationPriority>) -> Self {
        self.priority = input;
        self
    }
    /// <p>Priority level of the recommendation</p>
    pub fn get_priority(&self) -> &::std::option::Option<crate::types::RecommendationPriority> {
        &self.priority
    }
    /// <p>Version of the goal at the time this recommendation was generated</p>
    pub fn goal_version(mut self, input: i64) -> Self {
        self.goal_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Version of the goal at the time this recommendation was generated</p>
    pub fn set_goal_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.goal_version = input;
        self
    }
    /// <p>Version of the goal at the time this recommendation was generated</p>
    pub fn get_goal_version(&self) -> &::std::option::Option<i64> {
        &self.goal_version
    }
    /// <p>Additional context for recommendation</p>
    pub fn additional_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.additional_context = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Additional context for recommendation</p>
    pub fn set_additional_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.additional_context = input;
        self
    }
    /// <p>Additional context for recommendation</p>
    pub fn get_additional_context(&self) -> &::std::option::Option<::std::string::String> {
        &self.additional_context
    }
    /// <p>Position in ranked list (1 = highest priority)</p>
    pub fn rank_position(mut self, input: i32) -> Self {
        self.rank_position = ::std::option::Option::Some(input);
        self
    }
    /// <p>Position in ranked list (1 = highest priority)</p>
    pub fn set_rank_position(mut self, input: ::std::option::Option<i32>) -> Self {
        self.rank_position = input;
        self
    }
    /// <p>Position in ranked list (1 = highest priority)</p>
    pub fn get_rank_position(&self) -> &::std::option::Option<i32> {
        &self.rank_position
    }
    /// <p>Timestamp when the recommendation was last ranked</p>
    pub fn ranked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ranked_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>Timestamp when the recommendation was last ranked</p>
    pub fn set_ranked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ranked_at = input;
        self
    }
    /// <p>Timestamp when the recommendation was last ranked</p>
    pub fn get_ranked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ranked_at
    }
    /// <p>Timestamp when this recommendation was created</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>Timestamp when this recommendation was created</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>Timestamp when this recommendation was created</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>Timestamp when this recommendation was last updated</p>
    /// This field is required.
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>Timestamp when this recommendation was last updated</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>Timestamp when this recommendation was last updated</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>Version number for optimistic locking</p>
    /// This field is required.
    pub fn version(mut self, input: i64) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Version number for optimistic locking</p>
    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.version = input;
        self
    }
    /// <p>Version number for optimistic locking</p>
    pub fn get_version(&self) -> &::std::option::Option<i64> {
        &self.version
    }
    /// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
    /// This method will fail if any of the following fields are not set:
    /// - [`agent_space_arn`](crate::types::builders::RecommendationBuilder::agent_space_arn)
    /// - [`recommendation_id`](crate::types::builders::RecommendationBuilder::recommendation_id)
    /// - [`task_id`](crate::types::builders::RecommendationBuilder::task_id)
    /// - [`title`](crate::types::builders::RecommendationBuilder::title)
    /// - [`status`](crate::types::builders::RecommendationBuilder::status)
    /// - [`priority`](crate::types::builders::RecommendationBuilder::priority)
    /// - [`created_at`](crate::types::builders::RecommendationBuilder::created_at)
    /// - [`updated_at`](crate::types::builders::RecommendationBuilder::updated_at)
    /// - [`version`](crate::types::builders::RecommendationBuilder::version)
    pub fn build(self) -> ::std::result::Result<crate::types::Recommendation, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Recommendation {
            agent_space_arn: self.agent_space_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_space_arn",
                    "agent_space_arn was not specified but it is required when building Recommendation",
                )
            })?,
            recommendation_id: self.recommendation_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "recommendation_id",
                    "recommendation_id was not specified but it is required when building Recommendation",
                )
            })?,
            task_id: self.task_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "task_id",
                    "task_id was not specified but it is required when building Recommendation",
                )
            })?,
            goal_id: self.goal_id,
            title: self.title.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "title",
                    "title was not specified but it is required when building Recommendation",
                )
            })?,
            content: self.content,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building Recommendation",
                )
            })?,
            priority: self.priority.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "priority",
                    "priority was not specified but it is required when building Recommendation",
                )
            })?,
            goal_version: self.goal_version,
            additional_context: self.additional_context,
            rank_position: self.rank_position,
            ranked_at: self.ranked_at,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building Recommendation",
                )
            })?,
            updated_at: self.updated_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "updated_at",
                    "updated_at was not specified but it is required when building Recommendation",
                )
            })?,
            version: self.version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "version",
                    "version was not specified but it is required when building Recommendation",
                )
            })?,
        })
    }
}