{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.SageMaker.Types.UiConfig -- Copyright : (c) 2013-2021 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.SageMaker.Types.UiConfig where import qualified Amazonka.Core as Core import qualified Amazonka.Lens as Lens import qualified Amazonka.Prelude as Prelude -- | Provided configuration information for the worker UI for a labeling job. -- Provide either @HumanTaskUiArn@ or @UiTemplateS3Uri@. -- -- For named entity recognition, 3D point cloud and video frame labeling -- jobs, use @HumanTaskUiArn@. -- -- For all other Ground Truth built-in task types and custom task types, -- use @UiTemplateS3Uri@ to specify the location of a worker task template -- in Amazon S3. -- -- /See:/ 'newUiConfig' smart constructor. data UiConfig = UiConfig' { -- | The Amazon S3 bucket location of the UI template, or worker task -- template. This is the template used to render the worker UI and tools -- for labeling job tasks. For more information about the contents of a UI -- template, see -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html Creating Your Custom Labeling Task Template>. UiConfig -> Maybe Text uiTemplateS3Uri :: Prelude.Maybe Prelude.Text, -- | The ARN of the worker task template used to render the worker UI and -- tools for labeling job tasks. -- -- Use this parameter when you are creating a labeling job for named entity -- recognition, 3D point cloud and video frame labeling jobs. Use your -- labeling job task type to select one of the following ARNs and use it -- with this parameter when you create a labeling job. Replace @aws-region@ -- with the Amazon Web Services Region you are creating your labeling job -- in. For example, replace @aws-region@ with @us-west-1@ if you create a -- labeling job in US West (N. California). -- -- __Named Entity Recognition__ -- -- Use the following @HumanTaskUiArn@ for named entity recognition labeling -- jobs: -- -- @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/NamedEntityRecognition@ -- -- __3D Point Cloud HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object detection and 3D -- point cloud object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectDetection@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object tracking and 3D -- point cloud object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectTracking@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud semantic segmentation and -- 3D point cloud semantic segmentation adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudSemanticSegmentation@ -- -- __Video Frame HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for video frame object detection and video -- frame object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:region:394669845002:human-task-ui\/VideoObjectDetection@ -- -- Use this @HumanTaskUiArn@ for video frame object tracking and video -- frame object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/VideoObjectTracking@ UiConfig -> Maybe Text humanTaskUiArn :: Prelude.Maybe Prelude.Text } deriving (UiConfig -> UiConfig -> Bool (UiConfig -> UiConfig -> Bool) -> (UiConfig -> UiConfig -> Bool) -> Eq UiConfig forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: UiConfig -> UiConfig -> Bool $c/= :: UiConfig -> UiConfig -> Bool == :: UiConfig -> UiConfig -> Bool $c== :: UiConfig -> UiConfig -> Bool Prelude.Eq, ReadPrec [UiConfig] ReadPrec UiConfig Int -> ReadS UiConfig ReadS [UiConfig] (Int -> ReadS UiConfig) -> ReadS [UiConfig] -> ReadPrec UiConfig -> ReadPrec [UiConfig] -> Read UiConfig forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [UiConfig] $creadListPrec :: ReadPrec [UiConfig] readPrec :: ReadPrec UiConfig $creadPrec :: ReadPrec UiConfig readList :: ReadS [UiConfig] $creadList :: ReadS [UiConfig] readsPrec :: Int -> ReadS UiConfig $creadsPrec :: Int -> ReadS UiConfig Prelude.Read, Int -> UiConfig -> ShowS [UiConfig] -> ShowS UiConfig -> String (Int -> UiConfig -> ShowS) -> (UiConfig -> String) -> ([UiConfig] -> ShowS) -> Show UiConfig forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [UiConfig] -> ShowS $cshowList :: [UiConfig] -> ShowS show :: UiConfig -> String $cshow :: UiConfig -> String showsPrec :: Int -> UiConfig -> ShowS $cshowsPrec :: Int -> UiConfig -> ShowS Prelude.Show, (forall x. UiConfig -> Rep UiConfig x) -> (forall x. Rep UiConfig x -> UiConfig) -> Generic UiConfig forall x. Rep UiConfig x -> UiConfig forall x. UiConfig -> Rep UiConfig x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep UiConfig x -> UiConfig $cfrom :: forall x. UiConfig -> Rep UiConfig x Prelude.Generic) -- | -- Create a value of 'UiConfig' with all optional fields omitted. -- -- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'uiTemplateS3Uri', 'uiConfig_uiTemplateS3Uri' - The Amazon S3 bucket location of the UI template, or worker task -- template. This is the template used to render the worker UI and tools -- for labeling job tasks. For more information about the contents of a UI -- template, see -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html Creating Your Custom Labeling Task Template>. -- -- 'humanTaskUiArn', 'uiConfig_humanTaskUiArn' - The ARN of the worker task template used to render the worker UI and -- tools for labeling job tasks. -- -- Use this parameter when you are creating a labeling job for named entity -- recognition, 3D point cloud and video frame labeling jobs. Use your -- labeling job task type to select one of the following ARNs and use it -- with this parameter when you create a labeling job. Replace @aws-region@ -- with the Amazon Web Services Region you are creating your labeling job -- in. For example, replace @aws-region@ with @us-west-1@ if you create a -- labeling job in US West (N. California). -- -- __Named Entity Recognition__ -- -- Use the following @HumanTaskUiArn@ for named entity recognition labeling -- jobs: -- -- @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/NamedEntityRecognition@ -- -- __3D Point Cloud HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object detection and 3D -- point cloud object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectDetection@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object tracking and 3D -- point cloud object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectTracking@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud semantic segmentation and -- 3D point cloud semantic segmentation adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudSemanticSegmentation@ -- -- __Video Frame HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for video frame object detection and video -- frame object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:region:394669845002:human-task-ui\/VideoObjectDetection@ -- -- Use this @HumanTaskUiArn@ for video frame object tracking and video -- frame object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/VideoObjectTracking@ newUiConfig :: UiConfig newUiConfig :: UiConfig newUiConfig = UiConfig' :: Maybe Text -> Maybe Text -> UiConfig UiConfig' { $sel:uiTemplateS3Uri:UiConfig' :: Maybe Text uiTemplateS3Uri = Maybe Text forall a. Maybe a Prelude.Nothing, $sel:humanTaskUiArn:UiConfig' :: Maybe Text humanTaskUiArn = Maybe Text forall a. Maybe a Prelude.Nothing } -- | The Amazon S3 bucket location of the UI template, or worker task -- template. This is the template used to render the worker UI and tools -- for labeling job tasks. For more information about the contents of a UI -- template, see -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html Creating Your Custom Labeling Task Template>. uiConfig_uiTemplateS3Uri :: Lens.Lens' UiConfig (Prelude.Maybe Prelude.Text) uiConfig_uiTemplateS3Uri :: (Maybe Text -> f (Maybe Text)) -> UiConfig -> f UiConfig uiConfig_uiTemplateS3Uri = (UiConfig -> Maybe Text) -> (UiConfig -> Maybe Text -> UiConfig) -> Lens UiConfig UiConfig (Maybe Text) (Maybe Text) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\UiConfig' {Maybe Text uiTemplateS3Uri :: Maybe Text $sel:uiTemplateS3Uri:UiConfig' :: UiConfig -> Maybe Text uiTemplateS3Uri} -> Maybe Text uiTemplateS3Uri) (\s :: UiConfig s@UiConfig' {} Maybe Text a -> UiConfig s {$sel:uiTemplateS3Uri:UiConfig' :: Maybe Text uiTemplateS3Uri = Maybe Text a} :: UiConfig) -- | The ARN of the worker task template used to render the worker UI and -- tools for labeling job tasks. -- -- Use this parameter when you are creating a labeling job for named entity -- recognition, 3D point cloud and video frame labeling jobs. Use your -- labeling job task type to select one of the following ARNs and use it -- with this parameter when you create a labeling job. Replace @aws-region@ -- with the Amazon Web Services Region you are creating your labeling job -- in. For example, replace @aws-region@ with @us-west-1@ if you create a -- labeling job in US West (N. California). -- -- __Named Entity Recognition__ -- -- Use the following @HumanTaskUiArn@ for named entity recognition labeling -- jobs: -- -- @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/NamedEntityRecognition@ -- -- __3D Point Cloud HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object detection and 3D -- point cloud object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectDetection@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud object tracking and 3D -- point cloud object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudObjectTracking@ -- -- Use this @HumanTaskUiArn@ for 3D point cloud semantic segmentation and -- 3D point cloud semantic segmentation adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/PointCloudSemanticSegmentation@ -- -- __Video Frame HumanTaskUiArns__ -- -- Use this @HumanTaskUiArn@ for video frame object detection and video -- frame object detection adjustment labeling jobs. -- -- - @arn:aws:sagemaker:region:394669845002:human-task-ui\/VideoObjectDetection@ -- -- Use this @HumanTaskUiArn@ for video frame object tracking and video -- frame object tracking adjustment labeling jobs. -- -- - @arn:aws:sagemaker:aws-region:394669845002:human-task-ui\/VideoObjectTracking@ uiConfig_humanTaskUiArn :: Lens.Lens' UiConfig (Prelude.Maybe Prelude.Text) uiConfig_humanTaskUiArn :: (Maybe Text -> f (Maybe Text)) -> UiConfig -> f UiConfig uiConfig_humanTaskUiArn = (UiConfig -> Maybe Text) -> (UiConfig -> Maybe Text -> UiConfig) -> Lens UiConfig UiConfig (Maybe Text) (Maybe Text) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\UiConfig' {Maybe Text humanTaskUiArn :: Maybe Text $sel:humanTaskUiArn:UiConfig' :: UiConfig -> Maybe Text humanTaskUiArn} -> Maybe Text humanTaskUiArn) (\s :: UiConfig s@UiConfig' {} Maybe Text a -> UiConfig s {$sel:humanTaskUiArn:UiConfig' :: Maybe Text humanTaskUiArn = Maybe Text a} :: UiConfig) instance Core.FromJSON UiConfig where parseJSON :: Value -> Parser UiConfig parseJSON = String -> (Object -> Parser UiConfig) -> Value -> Parser UiConfig forall a. String -> (Object -> Parser a) -> Value -> Parser a Core.withObject String "UiConfig" ( \Object x -> Maybe Text -> Maybe Text -> UiConfig UiConfig' (Maybe Text -> Maybe Text -> UiConfig) -> Parser (Maybe Text) -> Parser (Maybe Text -> UiConfig) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> (Object x Object -> Text -> Parser (Maybe Text) forall a. FromJSON a => Object -> Text -> Parser (Maybe a) Core..:? Text "UiTemplateS3Uri") Parser (Maybe Text -> UiConfig) -> Parser (Maybe Text) -> Parser UiConfig forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x Object -> Text -> Parser (Maybe Text) forall a. FromJSON a => Object -> Text -> Parser (Maybe a) Core..:? Text "HumanTaskUiArn") ) instance Prelude.Hashable UiConfig instance Prelude.NFData UiConfig instance Core.ToJSON UiConfig where toJSON :: UiConfig -> Value toJSON UiConfig' {Maybe Text humanTaskUiArn :: Maybe Text uiTemplateS3Uri :: Maybe Text $sel:humanTaskUiArn:UiConfig' :: UiConfig -> Maybe Text $sel:uiTemplateS3Uri:UiConfig' :: UiConfig -> Maybe Text ..} = [Pair] -> Value Core.object ( [Maybe Pair] -> [Pair] forall a. [Maybe a] -> [a] Prelude.catMaybes [ (Text "UiTemplateS3Uri" Text -> Text -> Pair forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> Maybe Text uiTemplateS3Uri, (Text "HumanTaskUiArn" Text -> Text -> Pair forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> Maybe Text humanTaskUiArn ] )