{-# 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.ChimeSdkMediaPipelines.Types.PresenterOnlyConfiguration
-- 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.ChimeSdkMediaPipelines.Types.PresenterOnlyConfiguration where

import Amazonka.ChimeSdkMediaPipelines.Types.PresenterPosition
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

-- | Defines the configuration for a presenter only video tile.
--
-- /See:/ 'newPresenterOnlyConfiguration' smart constructor.
data PresenterOnlyConfiguration = PresenterOnlyConfiguration'
  { -- | Defines the position of the presenter video tile. Default: @TopRight@.
    PresenterOnlyConfiguration -> Maybe PresenterPosition
presenterPosition :: Prelude.Maybe PresenterPosition
  }
  deriving (PresenterOnlyConfiguration -> PresenterOnlyConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PresenterOnlyConfiguration -> PresenterOnlyConfiguration -> Bool
$c/= :: PresenterOnlyConfiguration -> PresenterOnlyConfiguration -> Bool
== :: PresenterOnlyConfiguration -> PresenterOnlyConfiguration -> Bool
$c== :: PresenterOnlyConfiguration -> PresenterOnlyConfiguration -> Bool
Prelude.Eq, ReadPrec [PresenterOnlyConfiguration]
ReadPrec PresenterOnlyConfiguration
Int -> ReadS PresenterOnlyConfiguration
ReadS [PresenterOnlyConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PresenterOnlyConfiguration]
$creadListPrec :: ReadPrec [PresenterOnlyConfiguration]
readPrec :: ReadPrec PresenterOnlyConfiguration
$creadPrec :: ReadPrec PresenterOnlyConfiguration
readList :: ReadS [PresenterOnlyConfiguration]
$creadList :: ReadS [PresenterOnlyConfiguration]
readsPrec :: Int -> ReadS PresenterOnlyConfiguration
$creadsPrec :: Int -> ReadS PresenterOnlyConfiguration
Prelude.Read, Int -> PresenterOnlyConfiguration -> ShowS
[PresenterOnlyConfiguration] -> ShowS
PresenterOnlyConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PresenterOnlyConfiguration] -> ShowS
$cshowList :: [PresenterOnlyConfiguration] -> ShowS
show :: PresenterOnlyConfiguration -> String
$cshow :: PresenterOnlyConfiguration -> String
showsPrec :: Int -> PresenterOnlyConfiguration -> ShowS
$cshowsPrec :: Int -> PresenterOnlyConfiguration -> ShowS
Prelude.Show, forall x.
Rep PresenterOnlyConfiguration x -> PresenterOnlyConfiguration
forall x.
PresenterOnlyConfiguration -> Rep PresenterOnlyConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PresenterOnlyConfiguration x -> PresenterOnlyConfiguration
$cfrom :: forall x.
PresenterOnlyConfiguration -> Rep PresenterOnlyConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PresenterOnlyConfiguration' 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:
--
-- 'presenterPosition', 'presenterOnlyConfiguration_presenterPosition' - Defines the position of the presenter video tile. Default: @TopRight@.
newPresenterOnlyConfiguration ::
  PresenterOnlyConfiguration
newPresenterOnlyConfiguration :: PresenterOnlyConfiguration
newPresenterOnlyConfiguration =
  PresenterOnlyConfiguration'
    { $sel:presenterPosition:PresenterOnlyConfiguration' :: Maybe PresenterPosition
presenterPosition =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Defines the position of the presenter video tile. Default: @TopRight@.
presenterOnlyConfiguration_presenterPosition :: Lens.Lens' PresenterOnlyConfiguration (Prelude.Maybe PresenterPosition)
presenterOnlyConfiguration_presenterPosition :: Lens' PresenterOnlyConfiguration (Maybe PresenterPosition)
presenterOnlyConfiguration_presenterPosition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PresenterOnlyConfiguration' {Maybe PresenterPosition
presenterPosition :: Maybe PresenterPosition
$sel:presenterPosition:PresenterOnlyConfiguration' :: PresenterOnlyConfiguration -> Maybe PresenterPosition
presenterPosition} -> Maybe PresenterPosition
presenterPosition) (\s :: PresenterOnlyConfiguration
s@PresenterOnlyConfiguration' {} Maybe PresenterPosition
a -> PresenterOnlyConfiguration
s {$sel:presenterPosition:PresenterOnlyConfiguration' :: Maybe PresenterPosition
presenterPosition = Maybe PresenterPosition
a} :: PresenterOnlyConfiguration)

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

instance Prelude.Hashable PresenterOnlyConfiguration where
  hashWithSalt :: Int -> PresenterOnlyConfiguration -> Int
hashWithSalt Int
_salt PresenterOnlyConfiguration' {Maybe PresenterPosition
presenterPosition :: Maybe PresenterPosition
$sel:presenterPosition:PresenterOnlyConfiguration' :: PresenterOnlyConfiguration -> Maybe PresenterPosition
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PresenterPosition
presenterPosition

instance Prelude.NFData PresenterOnlyConfiguration where
  rnf :: PresenterOnlyConfiguration -> ()
rnf PresenterOnlyConfiguration' {Maybe PresenterPosition
presenterPosition :: Maybe PresenterPosition
$sel:presenterPosition:PresenterOnlyConfiguration' :: PresenterOnlyConfiguration -> Maybe PresenterPosition
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PresenterPosition
presenterPosition

instance Data.ToJSON PresenterOnlyConfiguration where
  toJSON :: PresenterOnlyConfiguration -> Value
toJSON PresenterOnlyConfiguration' {Maybe PresenterPosition
presenterPosition :: Maybe PresenterPosition
$sel:presenterPosition:PresenterOnlyConfiguration' :: PresenterOnlyConfiguration -> Maybe PresenterPosition
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"PresenterPosition" 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 PresenterPosition
presenterPosition
          ]
      )