{-# 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.ModelCard
-- 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.ModelCard 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.ModelCardSecurityConfig
import Amazonka.SageMaker.Types.ModelCardStatus
import Amazonka.SageMaker.Types.Tag
import Amazonka.SageMaker.Types.UserContext

-- | An Amazon SageMaker Model Card.
--
-- /See:/ 'newModelCard' smart constructor.
data ModelCard = ModelCard'
  { -- | The content of the model card. Content uses the
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-api-json-schema.html model card JSON schema>
    -- and provided as a string.
    ModelCard -> Maybe (Sensitive Text)
content :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    ModelCard -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | The date and time that the model card was created.
    ModelCard -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    ModelCard -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The date and time that the model card was last modified.
    ModelCard -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the model card.
    ModelCard -> Maybe Text
modelCardArn :: Prelude.Maybe Prelude.Text,
    -- | The unique name of the model card.
    ModelCard -> Maybe Text
modelCardName :: Prelude.Maybe Prelude.Text,
    -- | The approval status of the model card within your organization.
    -- Different organizations might have different criteria for model card
    -- review and approval.
    --
    -- -   @Draft@: The model card is a work in progress.
    --
    -- -   @PendingReview@: The model card is pending review.
    --
    -- -   @Approved@: The model card is approved.
    --
    -- -   @Archived@: The model card is archived. No more updates should be
    --     made to the model card, but it can still be exported.
    ModelCard -> Maybe ModelCardStatus
modelCardStatus :: Prelude.Maybe ModelCardStatus,
    -- | The version of the model card.
    ModelCard -> Maybe Int
modelCardVersion :: Prelude.Maybe Prelude.Int,
    -- | The unique name (ID) of the model.
    ModelCard -> Maybe Text
modelId :: Prelude.Maybe Prelude.Text,
    -- | The risk rating of the model. Different organizations might have
    -- different criteria for model card risk ratings. For more information,
    -- see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-risk-rating.html Risk ratings>.
    ModelCard -> Maybe Text
riskRating :: Prelude.Maybe Prelude.Text,
    -- | The security configuration used to protect model card data.
    ModelCard -> Maybe ModelCardSecurityConfig
securityConfig :: Prelude.Maybe ModelCardSecurityConfig,
    -- | Key-value pairs used to manage metadata for the model card.
    ModelCard -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (ModelCard -> ModelCard -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelCard -> ModelCard -> Bool
$c/= :: ModelCard -> ModelCard -> Bool
== :: ModelCard -> ModelCard -> Bool
$c== :: ModelCard -> ModelCard -> Bool
Prelude.Eq, Int -> ModelCard -> ShowS
[ModelCard] -> ShowS
ModelCard -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelCard] -> ShowS
$cshowList :: [ModelCard] -> ShowS
show :: ModelCard -> String
$cshow :: ModelCard -> String
showsPrec :: Int -> ModelCard -> ShowS
$cshowsPrec :: Int -> ModelCard -> ShowS
Prelude.Show, forall x. Rep ModelCard x -> ModelCard
forall x. ModelCard -> Rep ModelCard x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelCard x -> ModelCard
$cfrom :: forall x. ModelCard -> Rep ModelCard x
Prelude.Generic)

-- |
-- Create a value of 'ModelCard' 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:
--
-- 'content', 'modelCard_content' - The content of the model card. Content uses the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-api-json-schema.html model card JSON schema>
-- and provided as a string.
--
-- 'createdBy', 'modelCard_createdBy' - Undocumented member.
--
-- 'creationTime', 'modelCard_creationTime' - The date and time that the model card was created.
--
-- 'lastModifiedBy', 'modelCard_lastModifiedBy' - Undocumented member.
--
-- 'lastModifiedTime', 'modelCard_lastModifiedTime' - The date and time that the model card was last modified.
--
-- 'modelCardArn', 'modelCard_modelCardArn' - The Amazon Resource Name (ARN) of the model card.
--
-- 'modelCardName', 'modelCard_modelCardName' - The unique name of the model card.
--
-- 'modelCardStatus', 'modelCard_modelCardStatus' - The approval status of the model card within your organization.
-- Different organizations might have different criteria for model card
-- review and approval.
--
-- -   @Draft@: The model card is a work in progress.
--
-- -   @PendingReview@: The model card is pending review.
--
-- -   @Approved@: The model card is approved.
--
-- -   @Archived@: The model card is archived. No more updates should be
--     made to the model card, but it can still be exported.
--
-- 'modelCardVersion', 'modelCard_modelCardVersion' - The version of the model card.
--
-- 'modelId', 'modelCard_modelId' - The unique name (ID) of the model.
--
-- 'riskRating', 'modelCard_riskRating' - The risk rating of the model. Different organizations might have
-- different criteria for model card risk ratings. For more information,
-- see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-risk-rating.html Risk ratings>.
--
-- 'securityConfig', 'modelCard_securityConfig' - The security configuration used to protect model card data.
--
-- 'tags', 'modelCard_tags' - Key-value pairs used to manage metadata for the model card.
newModelCard ::
  ModelCard
newModelCard :: ModelCard
newModelCard =
  ModelCard'
    { $sel:content:ModelCard' :: Maybe (Sensitive Text)
content = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:ModelCard' :: Maybe UserContext
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:ModelCard' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:ModelCard' :: Maybe UserContext
lastModifiedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:ModelCard' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:modelCardArn:ModelCard' :: Maybe Text
modelCardArn = forall a. Maybe a
Prelude.Nothing,
      $sel:modelCardName:ModelCard' :: Maybe Text
modelCardName = forall a. Maybe a
Prelude.Nothing,
      $sel:modelCardStatus:ModelCard' :: Maybe ModelCardStatus
modelCardStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:modelCardVersion:ModelCard' :: Maybe Int
modelCardVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:modelId:ModelCard' :: Maybe Text
modelId = forall a. Maybe a
Prelude.Nothing,
      $sel:riskRating:ModelCard' :: Maybe Text
riskRating = forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfig:ModelCard' :: Maybe ModelCardSecurityConfig
securityConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ModelCard' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The content of the model card. Content uses the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-api-json-schema.html model card JSON schema>
-- and provided as a string.
modelCard_content :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Text)
modelCard_content :: Lens' ModelCard (Maybe Text)
modelCard_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe (Sensitive Text)
content :: Maybe (Sensitive Text)
$sel:content:ModelCard' :: ModelCard -> Maybe (Sensitive Text)
content} -> Maybe (Sensitive Text)
content) (\s :: ModelCard
s@ModelCard' {} Maybe (Sensitive Text)
a -> ModelCard
s {$sel:content:ModelCard' :: Maybe (Sensitive Text)
content = Maybe (Sensitive Text)
a} :: ModelCard) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | Undocumented member.
modelCard_createdBy :: Lens.Lens' ModelCard (Prelude.Maybe UserContext)
modelCard_createdBy :: Lens' ModelCard (Maybe UserContext)
modelCard_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:ModelCard' :: ModelCard -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: ModelCard
s@ModelCard' {} Maybe UserContext
a -> ModelCard
s {$sel:createdBy:ModelCard' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: ModelCard)

-- | The date and time that the model card was created.
modelCard_creationTime :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.UTCTime)
modelCard_creationTime :: Lens' ModelCard (Maybe UTCTime)
modelCard_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ModelCard' :: ModelCard -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ModelCard
s@ModelCard' {} Maybe POSIX
a -> ModelCard
s {$sel:creationTime:ModelCard' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ModelCard) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Undocumented member.
modelCard_lastModifiedBy :: Lens.Lens' ModelCard (Prelude.Maybe UserContext)
modelCard_lastModifiedBy :: Lens' ModelCard (Maybe UserContext)
modelCard_lastModifiedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:ModelCard' :: ModelCard -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: ModelCard
s@ModelCard' {} Maybe UserContext
a -> ModelCard
s {$sel:lastModifiedBy:ModelCard' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: ModelCard)

-- | The date and time that the model card was last modified.
modelCard_lastModifiedTime :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.UTCTime)
modelCard_lastModifiedTime :: Lens' ModelCard (Maybe UTCTime)
modelCard_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:ModelCard' :: ModelCard -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: ModelCard
s@ModelCard' {} Maybe POSIX
a -> ModelCard
s {$sel:lastModifiedTime:ModelCard' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: ModelCard) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Resource Name (ARN) of the model card.
modelCard_modelCardArn :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Text)
modelCard_modelCardArn :: Lens' ModelCard (Maybe Text)
modelCard_modelCardArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe Text
modelCardArn :: Maybe Text
$sel:modelCardArn:ModelCard' :: ModelCard -> Maybe Text
modelCardArn} -> Maybe Text
modelCardArn) (\s :: ModelCard
s@ModelCard' {} Maybe Text
a -> ModelCard
s {$sel:modelCardArn:ModelCard' :: Maybe Text
modelCardArn = Maybe Text
a} :: ModelCard)

-- | The unique name of the model card.
modelCard_modelCardName :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Text)
modelCard_modelCardName :: Lens' ModelCard (Maybe Text)
modelCard_modelCardName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe Text
modelCardName :: Maybe Text
$sel:modelCardName:ModelCard' :: ModelCard -> Maybe Text
modelCardName} -> Maybe Text
modelCardName) (\s :: ModelCard
s@ModelCard' {} Maybe Text
a -> ModelCard
s {$sel:modelCardName:ModelCard' :: Maybe Text
modelCardName = Maybe Text
a} :: ModelCard)

-- | The approval status of the model card within your organization.
-- Different organizations might have different criteria for model card
-- review and approval.
--
-- -   @Draft@: The model card is a work in progress.
--
-- -   @PendingReview@: The model card is pending review.
--
-- -   @Approved@: The model card is approved.
--
-- -   @Archived@: The model card is archived. No more updates should be
--     made to the model card, but it can still be exported.
modelCard_modelCardStatus :: Lens.Lens' ModelCard (Prelude.Maybe ModelCardStatus)
modelCard_modelCardStatus :: Lens' ModelCard (Maybe ModelCardStatus)
modelCard_modelCardStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe ModelCardStatus
modelCardStatus :: Maybe ModelCardStatus
$sel:modelCardStatus:ModelCard' :: ModelCard -> Maybe ModelCardStatus
modelCardStatus} -> Maybe ModelCardStatus
modelCardStatus) (\s :: ModelCard
s@ModelCard' {} Maybe ModelCardStatus
a -> ModelCard
s {$sel:modelCardStatus:ModelCard' :: Maybe ModelCardStatus
modelCardStatus = Maybe ModelCardStatus
a} :: ModelCard)

-- | The version of the model card.
modelCard_modelCardVersion :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Int)
modelCard_modelCardVersion :: Lens' ModelCard (Maybe Int)
modelCard_modelCardVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe Int
modelCardVersion :: Maybe Int
$sel:modelCardVersion:ModelCard' :: ModelCard -> Maybe Int
modelCardVersion} -> Maybe Int
modelCardVersion) (\s :: ModelCard
s@ModelCard' {} Maybe Int
a -> ModelCard
s {$sel:modelCardVersion:ModelCard' :: Maybe Int
modelCardVersion = Maybe Int
a} :: ModelCard)

-- | The unique name (ID) of the model.
modelCard_modelId :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Text)
modelCard_modelId :: Lens' ModelCard (Maybe Text)
modelCard_modelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe Text
modelId :: Maybe Text
$sel:modelId:ModelCard' :: ModelCard -> Maybe Text
modelId} -> Maybe Text
modelId) (\s :: ModelCard
s@ModelCard' {} Maybe Text
a -> ModelCard
s {$sel:modelId:ModelCard' :: Maybe Text
modelId = Maybe Text
a} :: ModelCard)

-- | The risk rating of the model. Different organizations might have
-- different criteria for model card risk ratings. For more information,
-- see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards-risk-rating.html Risk ratings>.
modelCard_riskRating :: Lens.Lens' ModelCard (Prelude.Maybe Prelude.Text)
modelCard_riskRating :: Lens' ModelCard (Maybe Text)
modelCard_riskRating = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe Text
riskRating :: Maybe Text
$sel:riskRating:ModelCard' :: ModelCard -> Maybe Text
riskRating} -> Maybe Text
riskRating) (\s :: ModelCard
s@ModelCard' {} Maybe Text
a -> ModelCard
s {$sel:riskRating:ModelCard' :: Maybe Text
riskRating = Maybe Text
a} :: ModelCard)

-- | The security configuration used to protect model card data.
modelCard_securityConfig :: Lens.Lens' ModelCard (Prelude.Maybe ModelCardSecurityConfig)
modelCard_securityConfig :: Lens' ModelCard (Maybe ModelCardSecurityConfig)
modelCard_securityConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe ModelCardSecurityConfig
securityConfig :: Maybe ModelCardSecurityConfig
$sel:securityConfig:ModelCard' :: ModelCard -> Maybe ModelCardSecurityConfig
securityConfig} -> Maybe ModelCardSecurityConfig
securityConfig) (\s :: ModelCard
s@ModelCard' {} Maybe ModelCardSecurityConfig
a -> ModelCard
s {$sel:securityConfig:ModelCard' :: Maybe ModelCardSecurityConfig
securityConfig = Maybe ModelCardSecurityConfig
a} :: ModelCard)

-- | Key-value pairs used to manage metadata for the model card.
modelCard_tags :: Lens.Lens' ModelCard (Prelude.Maybe [Tag])
modelCard_tags :: Lens' ModelCard (Maybe [Tag])
modelCard_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCard' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ModelCard' :: ModelCard -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ModelCard
s@ModelCard' {} Maybe [Tag]
a -> ModelCard
s {$sel:tags:ModelCard' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ModelCard) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON ModelCard where
  parseJSON :: Value -> Parser ModelCard
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ModelCard"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe UserContext
-> Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ModelCardStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ModelCardSecurityConfig
-> Maybe [Tag]
-> ModelCard
ModelCard'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Content")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ModelCardArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe 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 (Maybe a)
Data..:? Key
"ModelCardStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe 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 (Maybe a)
Data..:? Key
"ModelId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RiskRating")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecurityConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ModelCard where
  hashWithSalt :: Int -> ModelCard -> Int
hashWithSalt Int
_salt ModelCard' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Maybe ModelCardSecurityConfig
Maybe ModelCardStatus
Maybe UserContext
tags :: Maybe [Tag]
securityConfig :: Maybe ModelCardSecurityConfig
riskRating :: Maybe Text
modelId :: Maybe Text
modelCardVersion :: Maybe Int
modelCardStatus :: Maybe ModelCardStatus
modelCardName :: Maybe Text
modelCardArn :: Maybe Text
lastModifiedTime :: Maybe POSIX
lastModifiedBy :: Maybe UserContext
creationTime :: Maybe POSIX
createdBy :: Maybe UserContext
content :: Maybe (Sensitive Text)
$sel:tags:ModelCard' :: ModelCard -> Maybe [Tag]
$sel:securityConfig:ModelCard' :: ModelCard -> Maybe ModelCardSecurityConfig
$sel:riskRating:ModelCard' :: ModelCard -> Maybe Text
$sel:modelId:ModelCard' :: ModelCard -> Maybe Text
$sel:modelCardVersion:ModelCard' :: ModelCard -> Maybe Int
$sel:modelCardStatus:ModelCard' :: ModelCard -> Maybe ModelCardStatus
$sel:modelCardName:ModelCard' :: ModelCard -> Maybe Text
$sel:modelCardArn:ModelCard' :: ModelCard -> Maybe Text
$sel:lastModifiedTime:ModelCard' :: ModelCard -> Maybe POSIX
$sel:lastModifiedBy:ModelCard' :: ModelCard -> Maybe UserContext
$sel:creationTime:ModelCard' :: ModelCard -> Maybe POSIX
$sel:createdBy:ModelCard' :: ModelCard -> Maybe UserContext
$sel:content:ModelCard' :: ModelCard -> Maybe (Sensitive Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
content
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UserContext
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UserContext
lastModifiedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelCardArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelCardName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ModelCardStatus
modelCardStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
modelCardVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
riskRating
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ModelCardSecurityConfig
securityConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags

instance Prelude.NFData ModelCard where
  rnf :: ModelCard -> ()
rnf ModelCard' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Maybe ModelCardSecurityConfig
Maybe ModelCardStatus
Maybe UserContext
tags :: Maybe [Tag]
securityConfig :: Maybe ModelCardSecurityConfig
riskRating :: Maybe Text
modelId :: Maybe Text
modelCardVersion :: Maybe Int
modelCardStatus :: Maybe ModelCardStatus
modelCardName :: Maybe Text
modelCardArn :: Maybe Text
lastModifiedTime :: Maybe POSIX
lastModifiedBy :: Maybe UserContext
creationTime :: Maybe POSIX
createdBy :: Maybe UserContext
content :: Maybe (Sensitive Text)
$sel:tags:ModelCard' :: ModelCard -> Maybe [Tag]
$sel:securityConfig:ModelCard' :: ModelCard -> Maybe ModelCardSecurityConfig
$sel:riskRating:ModelCard' :: ModelCard -> Maybe Text
$sel:modelId:ModelCard' :: ModelCard -> Maybe Text
$sel:modelCardVersion:ModelCard' :: ModelCard -> Maybe Int
$sel:modelCardStatus:ModelCard' :: ModelCard -> Maybe ModelCardStatus
$sel:modelCardName:ModelCard' :: ModelCard -> Maybe Text
$sel:modelCardArn:ModelCard' :: ModelCard -> Maybe Text
$sel:lastModifiedTime:ModelCard' :: ModelCard -> Maybe POSIX
$sel:lastModifiedBy:ModelCard' :: ModelCard -> Maybe UserContext
$sel:creationTime:ModelCard' :: ModelCard -> Maybe POSIX
$sel:createdBy:ModelCard' :: ModelCard -> Maybe UserContext
$sel:content:ModelCard' :: ModelCard -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
content
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UserContext
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UserContext
lastModifiedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelCardArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelCardName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ModelCardStatus
modelCardStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
modelCardVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
riskRating
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ModelCardSecurityConfig
securityConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags