{-# 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.LabelingJobOutput
-- 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.LabelingJobOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies the location of the output produced by the labeling job.
--
-- /See:/ 'newLabelingJobOutput' smart constructor.
data LabelingJobOutput = LabelingJobOutput'
  { -- | The Amazon Resource Name (ARN) for the most recent Amazon SageMaker
    -- model trained as part of automated data labeling.
    LabelingJobOutput -> Maybe Text
finalActiveLearningModelArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 bucket location of the manifest file for labeled data.
    LabelingJobOutput -> Text
outputDatasetS3Uri :: Prelude.Text
  }
  deriving (LabelingJobOutput -> LabelingJobOutput -> Bool
(LabelingJobOutput -> LabelingJobOutput -> Bool)
-> (LabelingJobOutput -> LabelingJobOutput -> Bool)
-> Eq LabelingJobOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelingJobOutput -> LabelingJobOutput -> Bool
$c/= :: LabelingJobOutput -> LabelingJobOutput -> Bool
== :: LabelingJobOutput -> LabelingJobOutput -> Bool
$c== :: LabelingJobOutput -> LabelingJobOutput -> Bool
Prelude.Eq, ReadPrec [LabelingJobOutput]
ReadPrec LabelingJobOutput
Int -> ReadS LabelingJobOutput
ReadS [LabelingJobOutput]
(Int -> ReadS LabelingJobOutput)
-> ReadS [LabelingJobOutput]
-> ReadPrec LabelingJobOutput
-> ReadPrec [LabelingJobOutput]
-> Read LabelingJobOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelingJobOutput]
$creadListPrec :: ReadPrec [LabelingJobOutput]
readPrec :: ReadPrec LabelingJobOutput
$creadPrec :: ReadPrec LabelingJobOutput
readList :: ReadS [LabelingJobOutput]
$creadList :: ReadS [LabelingJobOutput]
readsPrec :: Int -> ReadS LabelingJobOutput
$creadsPrec :: Int -> ReadS LabelingJobOutput
Prelude.Read, Int -> LabelingJobOutput -> ShowS
[LabelingJobOutput] -> ShowS
LabelingJobOutput -> String
(Int -> LabelingJobOutput -> ShowS)
-> (LabelingJobOutput -> String)
-> ([LabelingJobOutput] -> ShowS)
-> Show LabelingJobOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelingJobOutput] -> ShowS
$cshowList :: [LabelingJobOutput] -> ShowS
show :: LabelingJobOutput -> String
$cshow :: LabelingJobOutput -> String
showsPrec :: Int -> LabelingJobOutput -> ShowS
$cshowsPrec :: Int -> LabelingJobOutput -> ShowS
Prelude.Show, (forall x. LabelingJobOutput -> Rep LabelingJobOutput x)
-> (forall x. Rep LabelingJobOutput x -> LabelingJobOutput)
-> Generic LabelingJobOutput
forall x. Rep LabelingJobOutput x -> LabelingJobOutput
forall x. LabelingJobOutput -> Rep LabelingJobOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelingJobOutput x -> LabelingJobOutput
$cfrom :: forall x. LabelingJobOutput -> Rep LabelingJobOutput x
Prelude.Generic)

-- |
-- Create a value of 'LabelingJobOutput' 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:
--
-- 'finalActiveLearningModelArn', 'labelingJobOutput_finalActiveLearningModelArn' - The Amazon Resource Name (ARN) for the most recent Amazon SageMaker
-- model trained as part of automated data labeling.
--
-- 'outputDatasetS3Uri', 'labelingJobOutput_outputDatasetS3Uri' - The Amazon S3 bucket location of the manifest file for labeled data.
newLabelingJobOutput ::
  -- | 'outputDatasetS3Uri'
  Prelude.Text ->
  LabelingJobOutput
newLabelingJobOutput :: Text -> LabelingJobOutput
newLabelingJobOutput Text
pOutputDatasetS3Uri_ =
  LabelingJobOutput' :: Maybe Text -> Text -> LabelingJobOutput
LabelingJobOutput'
    { $sel:finalActiveLearningModelArn:LabelingJobOutput' :: Maybe Text
finalActiveLearningModelArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputDatasetS3Uri:LabelingJobOutput' :: Text
outputDatasetS3Uri = Text
pOutputDatasetS3Uri_
    }

-- | The Amazon Resource Name (ARN) for the most recent Amazon SageMaker
-- model trained as part of automated data labeling.
labelingJobOutput_finalActiveLearningModelArn :: Lens.Lens' LabelingJobOutput (Prelude.Maybe Prelude.Text)
labelingJobOutput_finalActiveLearningModelArn :: (Maybe Text -> f (Maybe Text))
-> LabelingJobOutput -> f LabelingJobOutput
labelingJobOutput_finalActiveLearningModelArn = (LabelingJobOutput -> Maybe Text)
-> (LabelingJobOutput -> Maybe Text -> LabelingJobOutput)
-> Lens
     LabelingJobOutput LabelingJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobOutput' {Maybe Text
finalActiveLearningModelArn :: Maybe Text
$sel:finalActiveLearningModelArn:LabelingJobOutput' :: LabelingJobOutput -> Maybe Text
finalActiveLearningModelArn} -> Maybe Text
finalActiveLearningModelArn) (\s :: LabelingJobOutput
s@LabelingJobOutput' {} Maybe Text
a -> LabelingJobOutput
s {$sel:finalActiveLearningModelArn:LabelingJobOutput' :: Maybe Text
finalActiveLearningModelArn = Maybe Text
a} :: LabelingJobOutput)

-- | The Amazon S3 bucket location of the manifest file for labeled data.
labelingJobOutput_outputDatasetS3Uri :: Lens.Lens' LabelingJobOutput Prelude.Text
labelingJobOutput_outputDatasetS3Uri :: (Text -> f Text) -> LabelingJobOutput -> f LabelingJobOutput
labelingJobOutput_outputDatasetS3Uri = (LabelingJobOutput -> Text)
-> (LabelingJobOutput -> Text -> LabelingJobOutput)
-> Lens LabelingJobOutput LabelingJobOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobOutput' {Text
outputDatasetS3Uri :: Text
$sel:outputDatasetS3Uri:LabelingJobOutput' :: LabelingJobOutput -> Text
outputDatasetS3Uri} -> Text
outputDatasetS3Uri) (\s :: LabelingJobOutput
s@LabelingJobOutput' {} Text
a -> LabelingJobOutput
s {$sel:outputDatasetS3Uri:LabelingJobOutput' :: Text
outputDatasetS3Uri = Text
a} :: LabelingJobOutput)

instance Core.FromJSON LabelingJobOutput where
  parseJSON :: Value -> Parser LabelingJobOutput
parseJSON =
    String
-> (Object -> Parser LabelingJobOutput)
-> Value
-> Parser LabelingJobOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LabelingJobOutput"
      ( \Object
x ->
          Maybe Text -> Text -> LabelingJobOutput
LabelingJobOutput'
            (Maybe Text -> Text -> LabelingJobOutput)
-> Parser (Maybe Text) -> Parser (Text -> LabelingJobOutput)
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
"FinalActiveLearningModelArn")
            Parser (Text -> LabelingJobOutput)
-> Parser Text -> Parser LabelingJobOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputDatasetS3Uri")
      )

instance Prelude.Hashable LabelingJobOutput

instance Prelude.NFData LabelingJobOutput