aws-sdk-sagemaker 1.190.0

AWS SDK for Amazon SageMaker Service
Documentation
// 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,
        })
    }
}