{-# 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.RegisteredUserQuickSightConsoleEmbeddingConfiguration
-- 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.RegisteredUserQuickSightConsoleEmbeddingConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the Amazon QuickSight console that you want to embed.
--
-- /See:/ 'newRegisteredUserQuickSightConsoleEmbeddingConfiguration' smart constructor.
data RegisteredUserQuickSightConsoleEmbeddingConfiguration = RegisteredUserQuickSightConsoleEmbeddingConfiguration'
  { -- | The initial URL path for the Amazon QuickSight console. @InitialPath@ is
    -- required.
    --
    -- The entry point URL is constrained to the following paths:
    --
    -- -   @\/start@
    --
    -- -   @\/start\/analyses@
    --
    -- -   @\/start\/dashboards@
    --
    -- -   @\/start\/favorites@
    --
    -- -   @\/dashboards\/DashboardId@. /DashboardId/ is the actual ID key from
    --     the Amazon QuickSight console URL of the dashboard.
    --
    -- -   @\/analyses\/AnalysisId@. /AnalysisId/ is the actual ID key from the
    --     Amazon QuickSight console URL of the analysis.
    RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Maybe Text
initialPath :: Prelude.Maybe Prelude.Text
  }
  deriving (RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool
(RegisteredUserQuickSightConsoleEmbeddingConfiguration
 -> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool)
-> (RegisteredUserQuickSightConsoleEmbeddingConfiguration
    -> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool)
-> Eq RegisteredUserQuickSightConsoleEmbeddingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool
$c/= :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool
== :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool
$c== :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Bool
Prelude.Eq, ReadPrec [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
ReadPrec RegisteredUserQuickSightConsoleEmbeddingConfiguration
Int -> ReadS RegisteredUserQuickSightConsoleEmbeddingConfiguration
ReadS [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
(Int
 -> ReadS RegisteredUserQuickSightConsoleEmbeddingConfiguration)
-> ReadS [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
-> ReadPrec RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> ReadPrec [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
-> Read RegisteredUserQuickSightConsoleEmbeddingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
$creadListPrec :: ReadPrec [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
readPrec :: ReadPrec RegisteredUserQuickSightConsoleEmbeddingConfiguration
$creadPrec :: ReadPrec RegisteredUserQuickSightConsoleEmbeddingConfiguration
readList :: ReadS [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
$creadList :: ReadS [RegisteredUserQuickSightConsoleEmbeddingConfiguration]
readsPrec :: Int -> ReadS RegisteredUserQuickSightConsoleEmbeddingConfiguration
$creadsPrec :: Int -> ReadS RegisteredUserQuickSightConsoleEmbeddingConfiguration
Prelude.Read, Int
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> ShowS
[RegisteredUserQuickSightConsoleEmbeddingConfiguration] -> ShowS
RegisteredUserQuickSightConsoleEmbeddingConfiguration -> String
(Int
 -> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> ShowS)
-> (RegisteredUserQuickSightConsoleEmbeddingConfiguration
    -> String)
-> ([RegisteredUserQuickSightConsoleEmbeddingConfiguration]
    -> ShowS)
-> Show RegisteredUserQuickSightConsoleEmbeddingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisteredUserQuickSightConsoleEmbeddingConfiguration] -> ShowS
$cshowList :: [RegisteredUserQuickSightConsoleEmbeddingConfiguration] -> ShowS
show :: RegisteredUserQuickSightConsoleEmbeddingConfiguration -> String
$cshow :: RegisteredUserQuickSightConsoleEmbeddingConfiguration -> String
showsPrec :: Int
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> ShowS
$cshowsPrec :: Int
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration -> ShowS
Prelude.Show, (forall x.
 RegisteredUserQuickSightConsoleEmbeddingConfiguration
 -> Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x)
-> (forall x.
    Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x
    -> RegisteredUserQuickSightConsoleEmbeddingConfiguration)
-> Generic RegisteredUserQuickSightConsoleEmbeddingConfiguration
forall x.
Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration
forall x.
RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration
$cfrom :: forall x.
RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> Rep RegisteredUserQuickSightConsoleEmbeddingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'RegisteredUserQuickSightConsoleEmbeddingConfiguration' 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:
--
-- 'initialPath', 'registeredUserQuickSightConsoleEmbeddingConfiguration_initialPath' - The initial URL path for the Amazon QuickSight console. @InitialPath@ is
-- required.
--
-- The entry point URL is constrained to the following paths:
--
-- -   @\/start@
--
-- -   @\/start\/analyses@
--
-- -   @\/start\/dashboards@
--
-- -   @\/start\/favorites@
--
-- -   @\/dashboards\/DashboardId@. /DashboardId/ is the actual ID key from
--     the Amazon QuickSight console URL of the dashboard.
--
-- -   @\/analyses\/AnalysisId@. /AnalysisId/ is the actual ID key from the
--     Amazon QuickSight console URL of the analysis.
newRegisteredUserQuickSightConsoleEmbeddingConfiguration ::
  RegisteredUserQuickSightConsoleEmbeddingConfiguration
newRegisteredUserQuickSightConsoleEmbeddingConfiguration :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
newRegisteredUserQuickSightConsoleEmbeddingConfiguration =
  RegisteredUserQuickSightConsoleEmbeddingConfiguration' :: Maybe Text -> RegisteredUserQuickSightConsoleEmbeddingConfiguration
RegisteredUserQuickSightConsoleEmbeddingConfiguration'
    { $sel:initialPath:RegisteredUserQuickSightConsoleEmbeddingConfiguration' :: Maybe Text
initialPath =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The initial URL path for the Amazon QuickSight console. @InitialPath@ is
-- required.
--
-- The entry point URL is constrained to the following paths:
--
-- -   @\/start@
--
-- -   @\/start\/analyses@
--
-- -   @\/start\/dashboards@
--
-- -   @\/start\/favorites@
--
-- -   @\/dashboards\/DashboardId@. /DashboardId/ is the actual ID key from
--     the Amazon QuickSight console URL of the dashboard.
--
-- -   @\/analyses\/AnalysisId@. /AnalysisId/ is the actual ID key from the
--     Amazon QuickSight console URL of the analysis.
registeredUserQuickSightConsoleEmbeddingConfiguration_initialPath :: Lens.Lens' RegisteredUserQuickSightConsoleEmbeddingConfiguration (Prelude.Maybe Prelude.Text)
registeredUserQuickSightConsoleEmbeddingConfiguration_initialPath :: (Maybe Text -> f (Maybe Text))
-> RegisteredUserQuickSightConsoleEmbeddingConfiguration
-> f RegisteredUserQuickSightConsoleEmbeddingConfiguration
registeredUserQuickSightConsoleEmbeddingConfiguration_initialPath = (RegisteredUserQuickSightConsoleEmbeddingConfiguration
 -> Maybe Text)
-> (RegisteredUserQuickSightConsoleEmbeddingConfiguration
    -> Maybe Text
    -> RegisteredUserQuickSightConsoleEmbeddingConfiguration)
-> Lens
     RegisteredUserQuickSightConsoleEmbeddingConfiguration
     RegisteredUserQuickSightConsoleEmbeddingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisteredUserQuickSightConsoleEmbeddingConfiguration' {Maybe Text
initialPath :: Maybe Text
$sel:initialPath:RegisteredUserQuickSightConsoleEmbeddingConfiguration' :: RegisteredUserQuickSightConsoleEmbeddingConfiguration -> Maybe Text
initialPath} -> Maybe Text
initialPath) (\s :: RegisteredUserQuickSightConsoleEmbeddingConfiguration
s@RegisteredUserQuickSightConsoleEmbeddingConfiguration' {} Maybe Text
a -> RegisteredUserQuickSightConsoleEmbeddingConfiguration
s {$sel:initialPath:RegisteredUserQuickSightConsoleEmbeddingConfiguration' :: Maybe Text
initialPath = Maybe Text
a} :: RegisteredUserQuickSightConsoleEmbeddingConfiguration)

instance
  Prelude.Hashable
    RegisteredUserQuickSightConsoleEmbeddingConfiguration

instance
  Prelude.NFData
    RegisteredUserQuickSightConsoleEmbeddingConfiguration

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