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
// 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 RenderUiTemplateInput {
/// <p>A <code>Template</code> object containing the worker UI template to render.</p>
pub ui_template: ::std::option::Option<crate::types::UiTemplate>,
/// <p>A <code>RenderableTask</code> object containing a representative task to render.</p>
pub task: ::std::option::Option<crate::types::RenderableTask>,
/// <p>The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>The <code>HumanTaskUiArn</code> of the worker UI that you want to render. Do not provide a <code>HumanTaskUiArn</code> if you use the <code>UiTemplate</code> parameter.</p>
/// <p>See a list of available Human Ui Amazon Resource Names (ARNs) in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html">UiConfig</a>.</p>
pub human_task_ui_arn: ::std::option::Option<::std::string::String>,
}
impl RenderUiTemplateInput {
/// <p>A <code>Template</code> object containing the worker UI template to render.</p>
pub fn ui_template(&self) -> ::std::option::Option<&crate::types::UiTemplate> {
self.ui_template.as_ref()
}
/// <p>A <code>RenderableTask</code> object containing a representative task to render.</p>
pub fn task(&self) -> ::std::option::Option<&crate::types::RenderableTask> {
self.task.as_ref()
}
/// <p>The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The <code>HumanTaskUiArn</code> of the worker UI that you want to render. Do not provide a <code>HumanTaskUiArn</code> if you use the <code>UiTemplate</code> parameter.</p>
/// <p>See a list of available Human Ui Amazon Resource Names (ARNs) in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html">UiConfig</a>.</p>
pub fn human_task_ui_arn(&self) -> ::std::option::Option<&str> {
self.human_task_ui_arn.as_deref()
}
}
impl RenderUiTemplateInput {
/// Creates a new builder-style object to manufacture [`RenderUiTemplateInput`](crate::operation::render_ui_template::RenderUiTemplateInput).
pub fn builder() -> crate::operation::render_ui_template::builders::RenderUiTemplateInputBuilder {
crate::operation::render_ui_template::builders::RenderUiTemplateInputBuilder::default()
}
}
/// A builder for [`RenderUiTemplateInput`](crate::operation::render_ui_template::RenderUiTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RenderUiTemplateInputBuilder {
pub(crate) ui_template: ::std::option::Option<crate::types::UiTemplate>,
pub(crate) task: ::std::option::Option<crate::types::RenderableTask>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) human_task_ui_arn: ::std::option::Option<::std::string::String>,
}
impl RenderUiTemplateInputBuilder {
/// <p>A <code>Template</code> object containing the worker UI template to render.</p>
pub fn ui_template(mut self, input: crate::types::UiTemplate) -> Self {
self.ui_template = ::std::option::Option::Some(input);
self
}
/// <p>A <code>Template</code> object containing the worker UI template to render.</p>
pub fn set_ui_template(mut self, input: ::std::option::Option<crate::types::UiTemplate>) -> Self {
self.ui_template = input;
self
}
/// <p>A <code>Template</code> object containing the worker UI template to render.</p>
pub fn get_ui_template(&self) -> &::std::option::Option<crate::types::UiTemplate> {
&self.ui_template
}
/// <p>A <code>RenderableTask</code> object containing a representative task to render.</p>
/// This field is required.
pub fn task(mut self, input: crate::types::RenderableTask) -> Self {
self.task = ::std::option::Option::Some(input);
self
}
/// <p>A <code>RenderableTask</code> object containing a representative task to render.</p>
pub fn set_task(mut self, input: ::std::option::Option<crate::types::RenderableTask>) -> Self {
self.task = input;
self
}
/// <p>A <code>RenderableTask</code> object containing a representative task to render.</p>
pub fn get_task(&self) -> &::std::option::Option<crate::types::RenderableTask> {
&self.task
}
/// <p>The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.</p>
/// This field is required.
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>The <code>HumanTaskUiArn</code> of the worker UI that you want to render. Do not provide a <code>HumanTaskUiArn</code> if you use the <code>UiTemplate</code> parameter.</p>
/// <p>See a list of available Human Ui Amazon Resource Names (ARNs) in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html">UiConfig</a>.</p>
pub fn human_task_ui_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.human_task_ui_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The <code>HumanTaskUiArn</code> of the worker UI that you want to render. Do not provide a <code>HumanTaskUiArn</code> if you use the <code>UiTemplate</code> parameter.</p>
/// <p>See a list of available Human Ui Amazon Resource Names (ARNs) in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html">UiConfig</a>.</p>
pub fn set_human_task_ui_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.human_task_ui_arn = input;
self
}
/// <p>The <code>HumanTaskUiArn</code> of the worker UI that you want to render. Do not provide a <code>HumanTaskUiArn</code> if you use the <code>UiTemplate</code> parameter.</p>
/// <p>See a list of available Human Ui Amazon Resource Names (ARNs) in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html">UiConfig</a>.</p>
pub fn get_human_task_ui_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.human_task_ui_arn
}
/// Consumes the builder and constructs a [`RenderUiTemplateInput`](crate::operation::render_ui_template::RenderUiTemplateInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::render_ui_template::RenderUiTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::render_ui_template::RenderUiTemplateInput {
ui_template: self.ui_template,
task: self.task,
role_arn: self.role_arn,
human_task_ui_arn: self.human_task_ui_arn,
})
}
}