aws-sdk-sagemaker 1.189.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 CreateFlowDefinitionInput {
    /// <p>The name of your flow definition.</p>
    pub flow_definition_name: ::std::option::Option<::std::string::String>,
    /// <p>Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.</p>
    pub human_loop_request_source: ::std::option::Option<crate::types::HumanLoopRequestSource>,
    /// <p>An object containing information about the events that trigger a human workflow.</p>
    pub human_loop_activation_config: ::std::option::Option<crate::types::HumanLoopActivationConfig>,
    /// <p>An object containing information about the tasks the human reviewers will perform.</p>
    pub human_loop_config: ::std::option::Option<crate::types::HumanLoopConfig>,
    /// <p>An object containing information about where the human review results will be uploaded.</p>
    pub output_config: ::std::option::Option<crate::types::FlowDefinitionOutputConfig>,
    /// <p>The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, <code>arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298</code>.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateFlowDefinitionInput {
    /// <p>The name of your flow definition.</p>
    pub fn flow_definition_name(&self) -> ::std::option::Option<&str> {
        self.flow_definition_name.as_deref()
    }
    /// <p>Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.</p>
    pub fn human_loop_request_source(&self) -> ::std::option::Option<&crate::types::HumanLoopRequestSource> {
        self.human_loop_request_source.as_ref()
    }
    /// <p>An object containing information about the events that trigger a human workflow.</p>
    pub fn human_loop_activation_config(&self) -> ::std::option::Option<&crate::types::HumanLoopActivationConfig> {
        self.human_loop_activation_config.as_ref()
    }
    /// <p>An object containing information about the tasks the human reviewers will perform.</p>
    pub fn human_loop_config(&self) -> ::std::option::Option<&crate::types::HumanLoopConfig> {
        self.human_loop_config.as_ref()
    }
    /// <p>An object containing information about where the human review results will be uploaded.</p>
    pub fn output_config(&self) -> ::std::option::Option<&crate::types::FlowDefinitionOutputConfig> {
        self.output_config.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, <code>arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298</code>.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateFlowDefinitionInput {
    /// Creates a new builder-style object to manufacture [`CreateFlowDefinitionInput`](crate::operation::create_flow_definition::CreateFlowDefinitionInput).
    pub fn builder() -> crate::operation::create_flow_definition::builders::CreateFlowDefinitionInputBuilder {
        crate::operation::create_flow_definition::builders::CreateFlowDefinitionInputBuilder::default()
    }
}

/// A builder for [`CreateFlowDefinitionInput`](crate::operation::create_flow_definition::CreateFlowDefinitionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFlowDefinitionInputBuilder {
    pub(crate) flow_definition_name: ::std::option::Option<::std::string::String>,
    pub(crate) human_loop_request_source: ::std::option::Option<crate::types::HumanLoopRequestSource>,
    pub(crate) human_loop_activation_config: ::std::option::Option<crate::types::HumanLoopActivationConfig>,
    pub(crate) human_loop_config: ::std::option::Option<crate::types::HumanLoopConfig>,
    pub(crate) output_config: ::std::option::Option<crate::types::FlowDefinitionOutputConfig>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateFlowDefinitionInputBuilder {
    /// <p>The name of your flow definition.</p>
    /// This field is required.
    pub fn flow_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_definition_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of your flow definition.</p>
    pub fn set_flow_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_definition_name = input;
        self
    }
    /// <p>The name of your flow definition.</p>
    pub fn get_flow_definition_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_definition_name
    }
    /// <p>Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.</p>
    pub fn human_loop_request_source(mut self, input: crate::types::HumanLoopRequestSource) -> Self {
        self.human_loop_request_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.</p>
    pub fn set_human_loop_request_source(mut self, input: ::std::option::Option<crate::types::HumanLoopRequestSource>) -> Self {
        self.human_loop_request_source = input;
        self
    }
    /// <p>Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.</p>
    pub fn get_human_loop_request_source(&self) -> &::std::option::Option<crate::types::HumanLoopRequestSource> {
        &self.human_loop_request_source
    }
    /// <p>An object containing information about the events that trigger a human workflow.</p>
    pub fn human_loop_activation_config(mut self, input: crate::types::HumanLoopActivationConfig) -> Self {
        self.human_loop_activation_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object containing information about the events that trigger a human workflow.</p>
    pub fn set_human_loop_activation_config(mut self, input: ::std::option::Option<crate::types::HumanLoopActivationConfig>) -> Self {
        self.human_loop_activation_config = input;
        self
    }
    /// <p>An object containing information about the events that trigger a human workflow.</p>
    pub fn get_human_loop_activation_config(&self) -> &::std::option::Option<crate::types::HumanLoopActivationConfig> {
        &self.human_loop_activation_config
    }
    /// <p>An object containing information about the tasks the human reviewers will perform.</p>
    pub fn human_loop_config(mut self, input: crate::types::HumanLoopConfig) -> Self {
        self.human_loop_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object containing information about the tasks the human reviewers will perform.</p>
    pub fn set_human_loop_config(mut self, input: ::std::option::Option<crate::types::HumanLoopConfig>) -> Self {
        self.human_loop_config = input;
        self
    }
    /// <p>An object containing information about the tasks the human reviewers will perform.</p>
    pub fn get_human_loop_config(&self) -> &::std::option::Option<crate::types::HumanLoopConfig> {
        &self.human_loop_config
    }
    /// <p>An object containing information about where the human review results will be uploaded.</p>
    /// This field is required.
    pub fn output_config(mut self, input: crate::types::FlowDefinitionOutputConfig) -> Self {
        self.output_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object containing information about where the human review results will be uploaded.</p>
    pub fn set_output_config(mut self, input: ::std::option::Option<crate::types::FlowDefinitionOutputConfig>) -> Self {
        self.output_config = input;
        self
    }
    /// <p>An object containing information about where the human review results will be uploaded.</p>
    pub fn get_output_config(&self) -> &::std::option::Option<crate::types::FlowDefinitionOutputConfig> {
        &self.output_config
    }
    /// <p>The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, <code>arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298</code>.</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) of the role needed to call other services on your behalf. For example, <code>arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298</code>.</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) of the role needed to call other services on your behalf. For example, <code>arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298</code>.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateFlowDefinitionInput`](crate::operation::create_flow_definition::CreateFlowDefinitionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_flow_definition::CreateFlowDefinitionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_flow_definition::CreateFlowDefinitionInput {
            flow_definition_name: self.flow_definition_name,
            human_loop_request_source: self.human_loop_request_source,
            human_loop_activation_config: self.human_loop_activation_config,
            human_loop_config: self.human_loop_config,
            output_config: self.output_config,
            role_arn: self.role_arn,
            tags: self.tags,
        })
    }
}