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

-- | Configuration for processing job outputs in Amazon SageMaker Feature
-- Store.
--
-- /See:/ 'newProcessingFeatureStoreOutput' smart constructor.
data ProcessingFeatureStoreOutput = ProcessingFeatureStoreOutput'
  { -- | The name of the Amazon SageMaker FeatureGroup to use as the destination
    -- for processing job output. Note that your processing script is
    -- responsible for putting records into your Feature Store.
    ProcessingFeatureStoreOutput -> Text
featureGroupName :: Prelude.Text
  }
  deriving (ProcessingFeatureStoreOutput
-> ProcessingFeatureStoreOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessingFeatureStoreOutput
-> ProcessingFeatureStoreOutput -> Bool
$c/= :: ProcessingFeatureStoreOutput
-> ProcessingFeatureStoreOutput -> Bool
== :: ProcessingFeatureStoreOutput
-> ProcessingFeatureStoreOutput -> Bool
$c== :: ProcessingFeatureStoreOutput
-> ProcessingFeatureStoreOutput -> Bool
Prelude.Eq, ReadPrec [ProcessingFeatureStoreOutput]
ReadPrec ProcessingFeatureStoreOutput
Int -> ReadS ProcessingFeatureStoreOutput
ReadS [ProcessingFeatureStoreOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessingFeatureStoreOutput]
$creadListPrec :: ReadPrec [ProcessingFeatureStoreOutput]
readPrec :: ReadPrec ProcessingFeatureStoreOutput
$creadPrec :: ReadPrec ProcessingFeatureStoreOutput
readList :: ReadS [ProcessingFeatureStoreOutput]
$creadList :: ReadS [ProcessingFeatureStoreOutput]
readsPrec :: Int -> ReadS ProcessingFeatureStoreOutput
$creadsPrec :: Int -> ReadS ProcessingFeatureStoreOutput
Prelude.Read, Int -> ProcessingFeatureStoreOutput -> ShowS
[ProcessingFeatureStoreOutput] -> ShowS
ProcessingFeatureStoreOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessingFeatureStoreOutput] -> ShowS
$cshowList :: [ProcessingFeatureStoreOutput] -> ShowS
show :: ProcessingFeatureStoreOutput -> String
$cshow :: ProcessingFeatureStoreOutput -> String
showsPrec :: Int -> ProcessingFeatureStoreOutput -> ShowS
$cshowsPrec :: Int -> ProcessingFeatureStoreOutput -> ShowS
Prelude.Show, forall x.
Rep ProcessingFeatureStoreOutput x -> ProcessingFeatureStoreOutput
forall x.
ProcessingFeatureStoreOutput -> Rep ProcessingFeatureStoreOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProcessingFeatureStoreOutput x -> ProcessingFeatureStoreOutput
$cfrom :: forall x.
ProcessingFeatureStoreOutput -> Rep ProcessingFeatureStoreOutput x
Prelude.Generic)

-- |
-- Create a value of 'ProcessingFeatureStoreOutput' 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:
--
-- 'featureGroupName', 'processingFeatureStoreOutput_featureGroupName' - The name of the Amazon SageMaker FeatureGroup to use as the destination
-- for processing job output. Note that your processing script is
-- responsible for putting records into your Feature Store.
newProcessingFeatureStoreOutput ::
  -- | 'featureGroupName'
  Prelude.Text ->
  ProcessingFeatureStoreOutput
newProcessingFeatureStoreOutput :: Text -> ProcessingFeatureStoreOutput
newProcessingFeatureStoreOutput Text
pFeatureGroupName_ =
  ProcessingFeatureStoreOutput'
    { $sel:featureGroupName:ProcessingFeatureStoreOutput' :: Text
featureGroupName =
        Text
pFeatureGroupName_
    }

-- | The name of the Amazon SageMaker FeatureGroup to use as the destination
-- for processing job output. Note that your processing script is
-- responsible for putting records into your Feature Store.
processingFeatureStoreOutput_featureGroupName :: Lens.Lens' ProcessingFeatureStoreOutput Prelude.Text
processingFeatureStoreOutput_featureGroupName :: Lens' ProcessingFeatureStoreOutput Text
processingFeatureStoreOutput_featureGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingFeatureStoreOutput' {Text
featureGroupName :: Text
$sel:featureGroupName:ProcessingFeatureStoreOutput' :: ProcessingFeatureStoreOutput -> Text
featureGroupName} -> Text
featureGroupName) (\s :: ProcessingFeatureStoreOutput
s@ProcessingFeatureStoreOutput' {} Text
a -> ProcessingFeatureStoreOutput
s {$sel:featureGroupName:ProcessingFeatureStoreOutput' :: Text
featureGroupName = Text
a} :: ProcessingFeatureStoreOutput)

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

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

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

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