{-# 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.ModelCardExportJobSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.ModelCardExportJobSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ModelCardExportJobStatus

-- | The summary of the Amazon SageMaker Model Card export job.
--
-- /See:/ 'newModelCardExportJobSummary' smart constructor.
data ModelCardExportJobSummary = ModelCardExportJobSummary'
  { -- | The name of the model card export job.
    ModelCardExportJobSummary -> Text
modelCardExportJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the model card export job.
    ModelCardExportJobSummary -> Text
modelCardExportJobArn :: Prelude.Text,
    -- | The completion status of the model card export job.
    ModelCardExportJobSummary -> ModelCardExportJobStatus
status :: ModelCardExportJobStatus,
    -- | The name of the model card that the export job exports.
    ModelCardExportJobSummary -> Text
modelCardName :: Prelude.Text,
    -- | The version of the model card that the export job exports.
    ModelCardExportJobSummary -> Int
modelCardVersion :: Prelude.Int,
    -- | The date and time that the model card export job was created.
    ModelCardExportJobSummary -> POSIX
createdAt :: Data.POSIX,
    -- | The date and time that the model card export job was last modified..
    ModelCardExportJobSummary -> POSIX
lastModifiedAt :: Data.POSIX
  }
  deriving (ModelCardExportJobSummary -> ModelCardExportJobSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelCardExportJobSummary -> ModelCardExportJobSummary -> Bool
$c/= :: ModelCardExportJobSummary -> ModelCardExportJobSummary -> Bool
== :: ModelCardExportJobSummary -> ModelCardExportJobSummary -> Bool
$c== :: ModelCardExportJobSummary -> ModelCardExportJobSummary -> Bool
Prelude.Eq, ReadPrec [ModelCardExportJobSummary]
ReadPrec ModelCardExportJobSummary
Int -> ReadS ModelCardExportJobSummary
ReadS [ModelCardExportJobSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelCardExportJobSummary]
$creadListPrec :: ReadPrec [ModelCardExportJobSummary]
readPrec :: ReadPrec ModelCardExportJobSummary
$creadPrec :: ReadPrec ModelCardExportJobSummary
readList :: ReadS [ModelCardExportJobSummary]
$creadList :: ReadS [ModelCardExportJobSummary]
readsPrec :: Int -> ReadS ModelCardExportJobSummary
$creadsPrec :: Int -> ReadS ModelCardExportJobSummary
Prelude.Read, Int -> ModelCardExportJobSummary -> ShowS
[ModelCardExportJobSummary] -> ShowS
ModelCardExportJobSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelCardExportJobSummary] -> ShowS
$cshowList :: [ModelCardExportJobSummary] -> ShowS
show :: ModelCardExportJobSummary -> String
$cshow :: ModelCardExportJobSummary -> String
showsPrec :: Int -> ModelCardExportJobSummary -> ShowS
$cshowsPrec :: Int -> ModelCardExportJobSummary -> ShowS
Prelude.Show, forall x.
Rep ModelCardExportJobSummary x -> ModelCardExportJobSummary
forall x.
ModelCardExportJobSummary -> Rep ModelCardExportJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModelCardExportJobSummary x -> ModelCardExportJobSummary
$cfrom :: forall x.
ModelCardExportJobSummary -> Rep ModelCardExportJobSummary x
Prelude.Generic)

-- |
-- Create a value of 'ModelCardExportJobSummary' 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:
--
-- 'modelCardExportJobName', 'modelCardExportJobSummary_modelCardExportJobName' - The name of the model card export job.
--
-- 'modelCardExportJobArn', 'modelCardExportJobSummary_modelCardExportJobArn' - The Amazon Resource Name (ARN) of the model card export job.
--
-- 'status', 'modelCardExportJobSummary_status' - The completion status of the model card export job.
--
-- 'modelCardName', 'modelCardExportJobSummary_modelCardName' - The name of the model card that the export job exports.
--
-- 'modelCardVersion', 'modelCardExportJobSummary_modelCardVersion' - The version of the model card that the export job exports.
--
-- 'createdAt', 'modelCardExportJobSummary_createdAt' - The date and time that the model card export job was created.
--
-- 'lastModifiedAt', 'modelCardExportJobSummary_lastModifiedAt' - The date and time that the model card export job was last modified..
newModelCardExportJobSummary ::
  -- | 'modelCardExportJobName'
  Prelude.Text ->
  -- | 'modelCardExportJobArn'
  Prelude.Text ->
  -- | 'status'
  ModelCardExportJobStatus ->
  -- | 'modelCardName'
  Prelude.Text ->
  -- | 'modelCardVersion'
  Prelude.Int ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastModifiedAt'
  Prelude.UTCTime ->
  ModelCardExportJobSummary
newModelCardExportJobSummary :: Text
-> Text
-> ModelCardExportJobStatus
-> Text
-> Int
-> UTCTime
-> UTCTime
-> ModelCardExportJobSummary
newModelCardExportJobSummary
  Text
pModelCardExportJobName_
  Text
pModelCardExportJobArn_
  ModelCardExportJobStatus
pStatus_
  Text
pModelCardName_
  Int
pModelCardVersion_
  UTCTime
pCreatedAt_
  UTCTime
pLastModifiedAt_ =
    ModelCardExportJobSummary'
      { $sel:modelCardExportJobName:ModelCardExportJobSummary' :: Text
modelCardExportJobName =
          Text
pModelCardExportJobName_,
        $sel:modelCardExportJobArn:ModelCardExportJobSummary' :: Text
modelCardExportJobArn = Text
pModelCardExportJobArn_,
        $sel:status:ModelCardExportJobSummary' :: ModelCardExportJobStatus
status = ModelCardExportJobStatus
pStatus_,
        $sel:modelCardName:ModelCardExportJobSummary' :: Text
modelCardName = Text
pModelCardName_,
        $sel:modelCardVersion:ModelCardExportJobSummary' :: Int
modelCardVersion = Int
pModelCardVersion_,
        $sel:createdAt:ModelCardExportJobSummary' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:lastModifiedAt:ModelCardExportJobSummary' :: POSIX
lastModifiedAt =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedAt_
      }

-- | The name of the model card export job.
modelCardExportJobSummary_modelCardExportJobName :: Lens.Lens' ModelCardExportJobSummary Prelude.Text
modelCardExportJobSummary_modelCardExportJobName :: Lens' ModelCardExportJobSummary Text
modelCardExportJobSummary_modelCardExportJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {Text
modelCardExportJobName :: Text
$sel:modelCardExportJobName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
modelCardExportJobName} -> Text
modelCardExportJobName) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} Text
a -> ModelCardExportJobSummary
s {$sel:modelCardExportJobName:ModelCardExportJobSummary' :: Text
modelCardExportJobName = Text
a} :: ModelCardExportJobSummary)

-- | The Amazon Resource Name (ARN) of the model card export job.
modelCardExportJobSummary_modelCardExportJobArn :: Lens.Lens' ModelCardExportJobSummary Prelude.Text
modelCardExportJobSummary_modelCardExportJobArn :: Lens' ModelCardExportJobSummary Text
modelCardExportJobSummary_modelCardExportJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {Text
modelCardExportJobArn :: Text
$sel:modelCardExportJobArn:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
modelCardExportJobArn} -> Text
modelCardExportJobArn) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} Text
a -> ModelCardExportJobSummary
s {$sel:modelCardExportJobArn:ModelCardExportJobSummary' :: Text
modelCardExportJobArn = Text
a} :: ModelCardExportJobSummary)

-- | The completion status of the model card export job.
modelCardExportJobSummary_status :: Lens.Lens' ModelCardExportJobSummary ModelCardExportJobStatus
modelCardExportJobSummary_status :: Lens' ModelCardExportJobSummary ModelCardExportJobStatus
modelCardExportJobSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {ModelCardExportJobStatus
status :: ModelCardExportJobStatus
$sel:status:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> ModelCardExportJobStatus
status} -> ModelCardExportJobStatus
status) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} ModelCardExportJobStatus
a -> ModelCardExportJobSummary
s {$sel:status:ModelCardExportJobSummary' :: ModelCardExportJobStatus
status = ModelCardExportJobStatus
a} :: ModelCardExportJobSummary)

-- | The name of the model card that the export job exports.
modelCardExportJobSummary_modelCardName :: Lens.Lens' ModelCardExportJobSummary Prelude.Text
modelCardExportJobSummary_modelCardName :: Lens' ModelCardExportJobSummary Text
modelCardExportJobSummary_modelCardName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {Text
modelCardName :: Text
$sel:modelCardName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
modelCardName} -> Text
modelCardName) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} Text
a -> ModelCardExportJobSummary
s {$sel:modelCardName:ModelCardExportJobSummary' :: Text
modelCardName = Text
a} :: ModelCardExportJobSummary)

-- | The version of the model card that the export job exports.
modelCardExportJobSummary_modelCardVersion :: Lens.Lens' ModelCardExportJobSummary Prelude.Int
modelCardExportJobSummary_modelCardVersion :: Lens' ModelCardExportJobSummary Int
modelCardExportJobSummary_modelCardVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {Int
modelCardVersion :: Int
$sel:modelCardVersion:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Int
modelCardVersion} -> Int
modelCardVersion) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} Int
a -> ModelCardExportJobSummary
s {$sel:modelCardVersion:ModelCardExportJobSummary' :: Int
modelCardVersion = Int
a} :: ModelCardExportJobSummary)

-- | The date and time that the model card export job was created.
modelCardExportJobSummary_createdAt :: Lens.Lens' ModelCardExportJobSummary Prelude.UTCTime
modelCardExportJobSummary_createdAt :: Lens' ModelCardExportJobSummary UTCTime
modelCardExportJobSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} POSIX
a -> ModelCardExportJobSummary
s {$sel:createdAt:ModelCardExportJobSummary' :: POSIX
createdAt = POSIX
a} :: ModelCardExportJobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time that the model card export job was last modified..
modelCardExportJobSummary_lastModifiedAt :: Lens.Lens' ModelCardExportJobSummary Prelude.UTCTime
modelCardExportJobSummary_lastModifiedAt :: Lens' ModelCardExportJobSummary UTCTime
modelCardExportJobSummary_lastModifiedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportJobSummary' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: ModelCardExportJobSummary
s@ModelCardExportJobSummary' {} POSIX
a -> ModelCardExportJobSummary
s {$sel:lastModifiedAt:ModelCardExportJobSummary' :: POSIX
lastModifiedAt = POSIX
a} :: ModelCardExportJobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON ModelCardExportJobSummary where
  parseJSON :: Value -> Parser ModelCardExportJobSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ModelCardExportJobSummary"
      ( \Object
x ->
          Text
-> Text
-> ModelCardExportJobStatus
-> Text
-> Int
-> POSIX
-> POSIX
-> ModelCardExportJobSummary
ModelCardExportJobSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardExportJobName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardExportJobArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelCardVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LastModifiedAt")
      )

instance Prelude.Hashable ModelCardExportJobSummary where
  hashWithSalt :: Int -> ModelCardExportJobSummary -> Int
hashWithSalt Int
_salt ModelCardExportJobSummary' {Int
Text
POSIX
ModelCardExportJobStatus
lastModifiedAt :: POSIX
createdAt :: POSIX
modelCardVersion :: Int
modelCardName :: Text
status :: ModelCardExportJobStatus
modelCardExportJobArn :: Text
modelCardExportJobName :: Text
$sel:lastModifiedAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
$sel:createdAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
$sel:modelCardVersion:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Int
$sel:modelCardName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
$sel:status:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> ModelCardExportJobStatus
$sel:modelCardExportJobArn:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
$sel:modelCardExportJobName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelCardExportJobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelCardExportJobArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelCardExportJobStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelCardName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
modelCardVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModifiedAt

instance Prelude.NFData ModelCardExportJobSummary where
  rnf :: ModelCardExportJobSummary -> ()
rnf ModelCardExportJobSummary' {Int
Text
POSIX
ModelCardExportJobStatus
lastModifiedAt :: POSIX
createdAt :: POSIX
modelCardVersion :: Int
modelCardName :: Text
status :: ModelCardExportJobStatus
modelCardExportJobArn :: Text
modelCardExportJobName :: Text
$sel:lastModifiedAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
$sel:createdAt:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> POSIX
$sel:modelCardVersion:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Int
$sel:modelCardName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
$sel:status:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> ModelCardExportJobStatus
$sel:modelCardExportJobArn:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
$sel:modelCardExportJobName:ModelCardExportJobSummary' :: ModelCardExportJobSummary -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
modelCardExportJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelCardExportJobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelCardExportJobStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelCardName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
modelCardVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModifiedAt