{-# 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.QuickSight.Types.AnonymousUserEmbeddingExperienceConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.QuickSight.Types.AnonymousUserEmbeddingExperienceConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.AnonymousUserDashboardEmbeddingConfiguration

-- | The type of experience you want to embed. For anonymous users, you can
-- embed an Amazon QuickSight dashboard.
--
-- /See:/ 'newAnonymousUserEmbeddingExperienceConfiguration' smart constructor.
data AnonymousUserEmbeddingExperienceConfiguration = AnonymousUserEmbeddingExperienceConfiguration'
  { -- | The type of embedding experience. In this case, an Amazon QuickSight
    -- dashboard.
    AnonymousUserEmbeddingExperienceConfiguration
-> Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard :: Prelude.Maybe AnonymousUserDashboardEmbeddingConfiguration
  }
  deriving (AnonymousUserEmbeddingExperienceConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration -> Bool
(AnonymousUserEmbeddingExperienceConfiguration
 -> AnonymousUserEmbeddingExperienceConfiguration -> Bool)
-> (AnonymousUserEmbeddingExperienceConfiguration
    -> AnonymousUserEmbeddingExperienceConfiguration -> Bool)
-> Eq AnonymousUserEmbeddingExperienceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnonymousUserEmbeddingExperienceConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration -> Bool
$c/= :: AnonymousUserEmbeddingExperienceConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration -> Bool
== :: AnonymousUserEmbeddingExperienceConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration -> Bool
$c== :: AnonymousUserEmbeddingExperienceConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration -> Bool
Prelude.Eq, ReadPrec [AnonymousUserEmbeddingExperienceConfiguration]
ReadPrec AnonymousUserEmbeddingExperienceConfiguration
Int -> ReadS AnonymousUserEmbeddingExperienceConfiguration
ReadS [AnonymousUserEmbeddingExperienceConfiguration]
(Int -> ReadS AnonymousUserEmbeddingExperienceConfiguration)
-> ReadS [AnonymousUserEmbeddingExperienceConfiguration]
-> ReadPrec AnonymousUserEmbeddingExperienceConfiguration
-> ReadPrec [AnonymousUserEmbeddingExperienceConfiguration]
-> Read AnonymousUserEmbeddingExperienceConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnonymousUserEmbeddingExperienceConfiguration]
$creadListPrec :: ReadPrec [AnonymousUserEmbeddingExperienceConfiguration]
readPrec :: ReadPrec AnonymousUserEmbeddingExperienceConfiguration
$creadPrec :: ReadPrec AnonymousUserEmbeddingExperienceConfiguration
readList :: ReadS [AnonymousUserEmbeddingExperienceConfiguration]
$creadList :: ReadS [AnonymousUserEmbeddingExperienceConfiguration]
readsPrec :: Int -> ReadS AnonymousUserEmbeddingExperienceConfiguration
$creadsPrec :: Int -> ReadS AnonymousUserEmbeddingExperienceConfiguration
Prelude.Read, Int -> AnonymousUserEmbeddingExperienceConfiguration -> ShowS
[AnonymousUserEmbeddingExperienceConfiguration] -> ShowS
AnonymousUserEmbeddingExperienceConfiguration -> String
(Int -> AnonymousUserEmbeddingExperienceConfiguration -> ShowS)
-> (AnonymousUserEmbeddingExperienceConfiguration -> String)
-> ([AnonymousUserEmbeddingExperienceConfiguration] -> ShowS)
-> Show AnonymousUserEmbeddingExperienceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnonymousUserEmbeddingExperienceConfiguration] -> ShowS
$cshowList :: [AnonymousUserEmbeddingExperienceConfiguration] -> ShowS
show :: AnonymousUserEmbeddingExperienceConfiguration -> String
$cshow :: AnonymousUserEmbeddingExperienceConfiguration -> String
showsPrec :: Int -> AnonymousUserEmbeddingExperienceConfiguration -> ShowS
$cshowsPrec :: Int -> AnonymousUserEmbeddingExperienceConfiguration -> ShowS
Prelude.Show, (forall x.
 AnonymousUserEmbeddingExperienceConfiguration
 -> Rep AnonymousUserEmbeddingExperienceConfiguration x)
-> (forall x.
    Rep AnonymousUserEmbeddingExperienceConfiguration x
    -> AnonymousUserEmbeddingExperienceConfiguration)
-> Generic AnonymousUserEmbeddingExperienceConfiguration
forall x.
Rep AnonymousUserEmbeddingExperienceConfiguration x
-> AnonymousUserEmbeddingExperienceConfiguration
forall x.
AnonymousUserEmbeddingExperienceConfiguration
-> Rep AnonymousUserEmbeddingExperienceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnonymousUserEmbeddingExperienceConfiguration x
-> AnonymousUserEmbeddingExperienceConfiguration
$cfrom :: forall x.
AnonymousUserEmbeddingExperienceConfiguration
-> Rep AnonymousUserEmbeddingExperienceConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'AnonymousUserEmbeddingExperienceConfiguration' 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:
--
-- 'dashboard', 'anonymousUserEmbeddingExperienceConfiguration_dashboard' - The type of embedding experience. In this case, an Amazon QuickSight
-- dashboard.
newAnonymousUserEmbeddingExperienceConfiguration ::
  AnonymousUserEmbeddingExperienceConfiguration
newAnonymousUserEmbeddingExperienceConfiguration :: AnonymousUserEmbeddingExperienceConfiguration
newAnonymousUserEmbeddingExperienceConfiguration =
  AnonymousUserEmbeddingExperienceConfiguration' :: Maybe AnonymousUserDashboardEmbeddingConfiguration
-> AnonymousUserEmbeddingExperienceConfiguration
AnonymousUserEmbeddingExperienceConfiguration'
    { $sel:dashboard:AnonymousUserEmbeddingExperienceConfiguration' :: Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard =
        Maybe AnonymousUserDashboardEmbeddingConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | The type of embedding experience. In this case, an Amazon QuickSight
-- dashboard.
anonymousUserEmbeddingExperienceConfiguration_dashboard :: Lens.Lens' AnonymousUserEmbeddingExperienceConfiguration (Prelude.Maybe AnonymousUserDashboardEmbeddingConfiguration)
anonymousUserEmbeddingExperienceConfiguration_dashboard :: (Maybe AnonymousUserDashboardEmbeddingConfiguration
 -> f (Maybe AnonymousUserDashboardEmbeddingConfiguration))
-> AnonymousUserEmbeddingExperienceConfiguration
-> f AnonymousUserEmbeddingExperienceConfiguration
anonymousUserEmbeddingExperienceConfiguration_dashboard = (AnonymousUserEmbeddingExperienceConfiguration
 -> Maybe AnonymousUserDashboardEmbeddingConfiguration)
-> (AnonymousUserEmbeddingExperienceConfiguration
    -> Maybe AnonymousUserDashboardEmbeddingConfiguration
    -> AnonymousUserEmbeddingExperienceConfiguration)
-> Lens
     AnonymousUserEmbeddingExperienceConfiguration
     AnonymousUserEmbeddingExperienceConfiguration
     (Maybe AnonymousUserDashboardEmbeddingConfiguration)
     (Maybe AnonymousUserDashboardEmbeddingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnonymousUserEmbeddingExperienceConfiguration' {Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard :: Maybe AnonymousUserDashboardEmbeddingConfiguration
$sel:dashboard:AnonymousUserEmbeddingExperienceConfiguration' :: AnonymousUserEmbeddingExperienceConfiguration
-> Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard} -> Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard) (\s :: AnonymousUserEmbeddingExperienceConfiguration
s@AnonymousUserEmbeddingExperienceConfiguration' {} Maybe AnonymousUserDashboardEmbeddingConfiguration
a -> AnonymousUserEmbeddingExperienceConfiguration
s {$sel:dashboard:AnonymousUserEmbeddingExperienceConfiguration' :: Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard = Maybe AnonymousUserDashboardEmbeddingConfiguration
a} :: AnonymousUserEmbeddingExperienceConfiguration)

instance
  Prelude.Hashable
    AnonymousUserEmbeddingExperienceConfiguration

instance
  Prelude.NFData
    AnonymousUserEmbeddingExperienceConfiguration

instance
  Core.ToJSON
    AnonymousUserEmbeddingExperienceConfiguration
  where
  toJSON :: AnonymousUserEmbeddingExperienceConfiguration -> Value
toJSON
    AnonymousUserEmbeddingExperienceConfiguration' {Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard :: Maybe AnonymousUserDashboardEmbeddingConfiguration
$sel:dashboard:AnonymousUserEmbeddingExperienceConfiguration' :: AnonymousUserEmbeddingExperienceConfiguration
-> Maybe AnonymousUserDashboardEmbeddingConfiguration
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [(Text
"Dashboard" Text -> AnonymousUserDashboardEmbeddingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AnonymousUserDashboardEmbeddingConfiguration -> Pair)
-> Maybe AnonymousUserDashboardEmbeddingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AnonymousUserDashboardEmbeddingConfiguration
dashboard]
        )