{-# 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.Rekognition.Types.StreamProcessorSettingsForUpdate
-- 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.Rekognition.Types.StreamProcessorSettingsForUpdate 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.Rekognition.Types.ConnectedHomeSettingsForUpdate

-- | The stream processor settings that you want to update. @ConnectedHome@
-- settings can be updated to detect different labels with a different
-- minimum confidence.
--
-- /See:/ 'newStreamProcessorSettingsForUpdate' smart constructor.
data StreamProcessorSettingsForUpdate = StreamProcessorSettingsForUpdate'
  { -- | The label detection settings you want to use for your stream processor.
    StreamProcessorSettingsForUpdate
-> Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate :: Prelude.Maybe ConnectedHomeSettingsForUpdate
  }
  deriving (StreamProcessorSettingsForUpdate
-> StreamProcessorSettingsForUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamProcessorSettingsForUpdate
-> StreamProcessorSettingsForUpdate -> Bool
$c/= :: StreamProcessorSettingsForUpdate
-> StreamProcessorSettingsForUpdate -> Bool
== :: StreamProcessorSettingsForUpdate
-> StreamProcessorSettingsForUpdate -> Bool
$c== :: StreamProcessorSettingsForUpdate
-> StreamProcessorSettingsForUpdate -> Bool
Prelude.Eq, ReadPrec [StreamProcessorSettingsForUpdate]
ReadPrec StreamProcessorSettingsForUpdate
Int -> ReadS StreamProcessorSettingsForUpdate
ReadS [StreamProcessorSettingsForUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamProcessorSettingsForUpdate]
$creadListPrec :: ReadPrec [StreamProcessorSettingsForUpdate]
readPrec :: ReadPrec StreamProcessorSettingsForUpdate
$creadPrec :: ReadPrec StreamProcessorSettingsForUpdate
readList :: ReadS [StreamProcessorSettingsForUpdate]
$creadList :: ReadS [StreamProcessorSettingsForUpdate]
readsPrec :: Int -> ReadS StreamProcessorSettingsForUpdate
$creadsPrec :: Int -> ReadS StreamProcessorSettingsForUpdate
Prelude.Read, Int -> StreamProcessorSettingsForUpdate -> ShowS
[StreamProcessorSettingsForUpdate] -> ShowS
StreamProcessorSettingsForUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamProcessorSettingsForUpdate] -> ShowS
$cshowList :: [StreamProcessorSettingsForUpdate] -> ShowS
show :: StreamProcessorSettingsForUpdate -> String
$cshow :: StreamProcessorSettingsForUpdate -> String
showsPrec :: Int -> StreamProcessorSettingsForUpdate -> ShowS
$cshowsPrec :: Int -> StreamProcessorSettingsForUpdate -> ShowS
Prelude.Show, forall x.
Rep StreamProcessorSettingsForUpdate x
-> StreamProcessorSettingsForUpdate
forall x.
StreamProcessorSettingsForUpdate
-> Rep StreamProcessorSettingsForUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamProcessorSettingsForUpdate x
-> StreamProcessorSettingsForUpdate
$cfrom :: forall x.
StreamProcessorSettingsForUpdate
-> Rep StreamProcessorSettingsForUpdate x
Prelude.Generic)

-- |
-- Create a value of 'StreamProcessorSettingsForUpdate' 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:
--
-- 'connectedHomeForUpdate', 'streamProcessorSettingsForUpdate_connectedHomeForUpdate' - The label detection settings you want to use for your stream processor.
newStreamProcessorSettingsForUpdate ::
  StreamProcessorSettingsForUpdate
newStreamProcessorSettingsForUpdate :: StreamProcessorSettingsForUpdate
newStreamProcessorSettingsForUpdate =
  StreamProcessorSettingsForUpdate'
    { $sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The label detection settings you want to use for your stream processor.
streamProcessorSettingsForUpdate_connectedHomeForUpdate :: Lens.Lens' StreamProcessorSettingsForUpdate (Prelude.Maybe ConnectedHomeSettingsForUpdate)
streamProcessorSettingsForUpdate_connectedHomeForUpdate :: Lens'
  StreamProcessorSettingsForUpdate
  (Maybe ConnectedHomeSettingsForUpdate)
streamProcessorSettingsForUpdate_connectedHomeForUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamProcessorSettingsForUpdate' {Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate :: Maybe ConnectedHomeSettingsForUpdate
$sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: StreamProcessorSettingsForUpdate
-> Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate} -> Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate) (\s :: StreamProcessorSettingsForUpdate
s@StreamProcessorSettingsForUpdate' {} Maybe ConnectedHomeSettingsForUpdate
a -> StreamProcessorSettingsForUpdate
s {$sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate = Maybe ConnectedHomeSettingsForUpdate
a} :: StreamProcessorSettingsForUpdate)

instance
  Prelude.Hashable
    StreamProcessorSettingsForUpdate
  where
  hashWithSalt :: Int -> StreamProcessorSettingsForUpdate -> Int
hashWithSalt
    Int
_salt
    StreamProcessorSettingsForUpdate' {Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate :: Maybe ConnectedHomeSettingsForUpdate
$sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: StreamProcessorSettingsForUpdate
-> Maybe ConnectedHomeSettingsForUpdate
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate

instance
  Prelude.NFData
    StreamProcessorSettingsForUpdate
  where
  rnf :: StreamProcessorSettingsForUpdate -> ()
rnf StreamProcessorSettingsForUpdate' {Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate :: Maybe ConnectedHomeSettingsForUpdate
$sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: StreamProcessorSettingsForUpdate
-> Maybe ConnectedHomeSettingsForUpdate
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate

instance Data.ToJSON StreamProcessorSettingsForUpdate where
  toJSON :: StreamProcessorSettingsForUpdate -> Value
toJSON StreamProcessorSettingsForUpdate' {Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate :: Maybe ConnectedHomeSettingsForUpdate
$sel:connectedHomeForUpdate:StreamProcessorSettingsForUpdate' :: StreamProcessorSettingsForUpdate
-> Maybe ConnectedHomeSettingsForUpdate
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ConnectedHomeForUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectedHomeSettingsForUpdate
connectedHomeForUpdate
          ]
      )