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

-- | The location of artifacts for an AutoML candidate job.
--
-- /See:/ 'newCandidateArtifactLocations' smart constructor.
data CandidateArtifactLocations = CandidateArtifactLocations'
  { -- | The Amazon S3 prefix to the model insight artifacts generated for the
    -- AutoML candidate.
    CandidateArtifactLocations -> Maybe Text
modelInsights :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 prefix to the explainability artifacts generated for the
    -- AutoML candidate.
    CandidateArtifactLocations -> Text
explainability :: Prelude.Text
  }
  deriving (CandidateArtifactLocations -> CandidateArtifactLocations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CandidateArtifactLocations -> CandidateArtifactLocations -> Bool
$c/= :: CandidateArtifactLocations -> CandidateArtifactLocations -> Bool
== :: CandidateArtifactLocations -> CandidateArtifactLocations -> Bool
$c== :: CandidateArtifactLocations -> CandidateArtifactLocations -> Bool
Prelude.Eq, ReadPrec [CandidateArtifactLocations]
ReadPrec CandidateArtifactLocations
Int -> ReadS CandidateArtifactLocations
ReadS [CandidateArtifactLocations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CandidateArtifactLocations]
$creadListPrec :: ReadPrec [CandidateArtifactLocations]
readPrec :: ReadPrec CandidateArtifactLocations
$creadPrec :: ReadPrec CandidateArtifactLocations
readList :: ReadS [CandidateArtifactLocations]
$creadList :: ReadS [CandidateArtifactLocations]
readsPrec :: Int -> ReadS CandidateArtifactLocations
$creadsPrec :: Int -> ReadS CandidateArtifactLocations
Prelude.Read, Int -> CandidateArtifactLocations -> ShowS
[CandidateArtifactLocations] -> ShowS
CandidateArtifactLocations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CandidateArtifactLocations] -> ShowS
$cshowList :: [CandidateArtifactLocations] -> ShowS
show :: CandidateArtifactLocations -> String
$cshow :: CandidateArtifactLocations -> String
showsPrec :: Int -> CandidateArtifactLocations -> ShowS
$cshowsPrec :: Int -> CandidateArtifactLocations -> ShowS
Prelude.Show, forall x.
Rep CandidateArtifactLocations x -> CandidateArtifactLocations
forall x.
CandidateArtifactLocations -> Rep CandidateArtifactLocations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CandidateArtifactLocations x -> CandidateArtifactLocations
$cfrom :: forall x.
CandidateArtifactLocations -> Rep CandidateArtifactLocations x
Prelude.Generic)

-- |
-- Create a value of 'CandidateArtifactLocations' 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:
--
-- 'modelInsights', 'candidateArtifactLocations_modelInsights' - The Amazon S3 prefix to the model insight artifacts generated for the
-- AutoML candidate.
--
-- 'explainability', 'candidateArtifactLocations_explainability' - The Amazon S3 prefix to the explainability artifacts generated for the
-- AutoML candidate.
newCandidateArtifactLocations ::
  -- | 'explainability'
  Prelude.Text ->
  CandidateArtifactLocations
newCandidateArtifactLocations :: Text -> CandidateArtifactLocations
newCandidateArtifactLocations Text
pExplainability_ =
  CandidateArtifactLocations'
    { $sel:modelInsights:CandidateArtifactLocations' :: Maybe Text
modelInsights =
        forall a. Maybe a
Prelude.Nothing,
      $sel:explainability:CandidateArtifactLocations' :: Text
explainability = Text
pExplainability_
    }

-- | The Amazon S3 prefix to the model insight artifacts generated for the
-- AutoML candidate.
candidateArtifactLocations_modelInsights :: Lens.Lens' CandidateArtifactLocations (Prelude.Maybe Prelude.Text)
candidateArtifactLocations_modelInsights :: Lens' CandidateArtifactLocations (Maybe Text)
candidateArtifactLocations_modelInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CandidateArtifactLocations' {Maybe Text
modelInsights :: Maybe Text
$sel:modelInsights:CandidateArtifactLocations' :: CandidateArtifactLocations -> Maybe Text
modelInsights} -> Maybe Text
modelInsights) (\s :: CandidateArtifactLocations
s@CandidateArtifactLocations' {} Maybe Text
a -> CandidateArtifactLocations
s {$sel:modelInsights:CandidateArtifactLocations' :: Maybe Text
modelInsights = Maybe Text
a} :: CandidateArtifactLocations)

-- | The Amazon S3 prefix to the explainability artifacts generated for the
-- AutoML candidate.
candidateArtifactLocations_explainability :: Lens.Lens' CandidateArtifactLocations Prelude.Text
candidateArtifactLocations_explainability :: Lens' CandidateArtifactLocations Text
candidateArtifactLocations_explainability = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CandidateArtifactLocations' {Text
explainability :: Text
$sel:explainability:CandidateArtifactLocations' :: CandidateArtifactLocations -> Text
explainability} -> Text
explainability) (\s :: CandidateArtifactLocations
s@CandidateArtifactLocations' {} Text
a -> CandidateArtifactLocations
s {$sel:explainability:CandidateArtifactLocations' :: Text
explainability = Text
a} :: CandidateArtifactLocations)

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

instance Prelude.Hashable CandidateArtifactLocations where
  hashWithSalt :: Int -> CandidateArtifactLocations -> Int
hashWithSalt Int
_salt CandidateArtifactLocations' {Maybe Text
Text
explainability :: Text
modelInsights :: Maybe Text
$sel:explainability:CandidateArtifactLocations' :: CandidateArtifactLocations -> Text
$sel:modelInsights:CandidateArtifactLocations' :: CandidateArtifactLocations -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelInsights
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
explainability

instance Prelude.NFData CandidateArtifactLocations where
  rnf :: CandidateArtifactLocations -> ()
rnf CandidateArtifactLocations' {Maybe Text
Text
explainability :: Text
modelInsights :: Maybe Text
$sel:explainability:CandidateArtifactLocations' :: CandidateArtifactLocations -> Text
$sel:modelInsights:CandidateArtifactLocations' :: CandidateArtifactLocations -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelInsights
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
explainability