{-# 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.ModelCardExportOutputConfig
-- 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.ModelCardExportOutputConfig 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

-- | Configure the export output details for an Amazon SageMaker Model Card.
--
-- /See:/ 'newModelCardExportOutputConfig' smart constructor.
data ModelCardExportOutputConfig = ModelCardExportOutputConfig'
  { -- | The Amazon S3 output path to export your model card PDF.
    ModelCardExportOutputConfig -> Text
s3OutputPath :: Prelude.Text
  }
  deriving (ModelCardExportOutputConfig -> ModelCardExportOutputConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelCardExportOutputConfig -> ModelCardExportOutputConfig -> Bool
$c/= :: ModelCardExportOutputConfig -> ModelCardExportOutputConfig -> Bool
== :: ModelCardExportOutputConfig -> ModelCardExportOutputConfig -> Bool
$c== :: ModelCardExportOutputConfig -> ModelCardExportOutputConfig -> Bool
Prelude.Eq, ReadPrec [ModelCardExportOutputConfig]
ReadPrec ModelCardExportOutputConfig
Int -> ReadS ModelCardExportOutputConfig
ReadS [ModelCardExportOutputConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelCardExportOutputConfig]
$creadListPrec :: ReadPrec [ModelCardExportOutputConfig]
readPrec :: ReadPrec ModelCardExportOutputConfig
$creadPrec :: ReadPrec ModelCardExportOutputConfig
readList :: ReadS [ModelCardExportOutputConfig]
$creadList :: ReadS [ModelCardExportOutputConfig]
readsPrec :: Int -> ReadS ModelCardExportOutputConfig
$creadsPrec :: Int -> ReadS ModelCardExportOutputConfig
Prelude.Read, Int -> ModelCardExportOutputConfig -> ShowS
[ModelCardExportOutputConfig] -> ShowS
ModelCardExportOutputConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelCardExportOutputConfig] -> ShowS
$cshowList :: [ModelCardExportOutputConfig] -> ShowS
show :: ModelCardExportOutputConfig -> String
$cshow :: ModelCardExportOutputConfig -> String
showsPrec :: Int -> ModelCardExportOutputConfig -> ShowS
$cshowsPrec :: Int -> ModelCardExportOutputConfig -> ShowS
Prelude.Show, forall x.
Rep ModelCardExportOutputConfig x -> ModelCardExportOutputConfig
forall x.
ModelCardExportOutputConfig -> Rep ModelCardExportOutputConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModelCardExportOutputConfig x -> ModelCardExportOutputConfig
$cfrom :: forall x.
ModelCardExportOutputConfig -> Rep ModelCardExportOutputConfig x
Prelude.Generic)

-- |
-- Create a value of 'ModelCardExportOutputConfig' 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:
--
-- 's3OutputPath', 'modelCardExportOutputConfig_s3OutputPath' - The Amazon S3 output path to export your model card PDF.
newModelCardExportOutputConfig ::
  -- | 's3OutputPath'
  Prelude.Text ->
  ModelCardExportOutputConfig
newModelCardExportOutputConfig :: Text -> ModelCardExportOutputConfig
newModelCardExportOutputConfig Text
pS3OutputPath_ =
  ModelCardExportOutputConfig'
    { $sel:s3OutputPath:ModelCardExportOutputConfig' :: Text
s3OutputPath =
        Text
pS3OutputPath_
    }

-- | The Amazon S3 output path to export your model card PDF.
modelCardExportOutputConfig_s3OutputPath :: Lens.Lens' ModelCardExportOutputConfig Prelude.Text
modelCardExportOutputConfig_s3OutputPath :: Lens' ModelCardExportOutputConfig Text
modelCardExportOutputConfig_s3OutputPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelCardExportOutputConfig' {Text
s3OutputPath :: Text
$sel:s3OutputPath:ModelCardExportOutputConfig' :: ModelCardExportOutputConfig -> Text
s3OutputPath} -> Text
s3OutputPath) (\s :: ModelCardExportOutputConfig
s@ModelCardExportOutputConfig' {} Text
a -> ModelCardExportOutputConfig
s {$sel:s3OutputPath:ModelCardExportOutputConfig' :: Text
s3OutputPath = Text
a} :: ModelCardExportOutputConfig)

instance Data.FromJSON ModelCardExportOutputConfig where
  parseJSON :: Value -> Parser ModelCardExportOutputConfig
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ModelCardExportOutputConfig"
      ( \Object
x ->
          Text -> ModelCardExportOutputConfig
ModelCardExportOutputConfig'
            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
"S3OutputPath")
      )

instance Prelude.Hashable ModelCardExportOutputConfig where
  hashWithSalt :: Int -> ModelCardExportOutputConfig -> Int
hashWithSalt Int
_salt ModelCardExportOutputConfig' {Text
s3OutputPath :: Text
$sel:s3OutputPath:ModelCardExportOutputConfig' :: ModelCardExportOutputConfig -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3OutputPath

instance Prelude.NFData ModelCardExportOutputConfig where
  rnf :: ModelCardExportOutputConfig -> ()
rnf ModelCardExportOutputConfig' {Text
s3OutputPath :: Text
$sel:s3OutputPath:ModelCardExportOutputConfig' :: ModelCardExportOutputConfig -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
s3OutputPath

instance Data.ToJSON ModelCardExportOutputConfig where
  toJSON :: ModelCardExportOutputConfig -> Value
toJSON ModelCardExportOutputConfig' {Text
s3OutputPath :: Text
$sel:s3OutputPath:ModelCardExportOutputConfig' :: ModelCardExportOutputConfig -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"S3OutputPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
s3OutputPath)]
      )