{-# 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.CognitoIdentityProvider.Types.UICustomizationType
-- 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.CognitoIdentityProvider.Types.UICustomizationType 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

-- | A container for the UI customization information for a user pool\'s
-- built-in app UI.
--
-- /See:/ 'newUICustomizationType' smart constructor.
data UICustomizationType = UICustomizationType'
  { -- | The CSS values in the UI customization.
    UICustomizationType -> Maybe Text
css :: Prelude.Maybe Prelude.Text,
    -- | The CSS version number.
    UICustomizationType -> Maybe Text
cSSVersion :: Prelude.Maybe Prelude.Text,
    -- | The client ID for the client app.
    UICustomizationType -> Maybe (Sensitive Text)
clientId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The creation date for the UI customization.
    UICustomizationType -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
    -- | The logo image for the UI customization.
    UICustomizationType -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
    -- | The last-modified date for the UI customization.
    UICustomizationType -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
    -- | The user pool ID for the user pool.
    UICustomizationType -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text
  }
  deriving (UICustomizationType -> UICustomizationType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UICustomizationType -> UICustomizationType -> Bool
$c/= :: UICustomizationType -> UICustomizationType -> Bool
== :: UICustomizationType -> UICustomizationType -> Bool
$c== :: UICustomizationType -> UICustomizationType -> Bool
Prelude.Eq, Int -> UICustomizationType -> ShowS
[UICustomizationType] -> ShowS
UICustomizationType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UICustomizationType] -> ShowS
$cshowList :: [UICustomizationType] -> ShowS
show :: UICustomizationType -> String
$cshow :: UICustomizationType -> String
showsPrec :: Int -> UICustomizationType -> ShowS
$cshowsPrec :: Int -> UICustomizationType -> ShowS
Prelude.Show, forall x. Rep UICustomizationType x -> UICustomizationType
forall x. UICustomizationType -> Rep UICustomizationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UICustomizationType x -> UICustomizationType
$cfrom :: forall x. UICustomizationType -> Rep UICustomizationType x
Prelude.Generic)

-- |
-- Create a value of 'UICustomizationType' 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:
--
-- 'css', 'uICustomizationType_css' - The CSS values in the UI customization.
--
-- 'cSSVersion', 'uICustomizationType_cSSVersion' - The CSS version number.
--
-- 'clientId', 'uICustomizationType_clientId' - The client ID for the client app.
--
-- 'creationDate', 'uICustomizationType_creationDate' - The creation date for the UI customization.
--
-- 'imageUrl', 'uICustomizationType_imageUrl' - The logo image for the UI customization.
--
-- 'lastModifiedDate', 'uICustomizationType_lastModifiedDate' - The last-modified date for the UI customization.
--
-- 'userPoolId', 'uICustomizationType_userPoolId' - The user pool ID for the user pool.
newUICustomizationType ::
  UICustomizationType
newUICustomizationType :: UICustomizationType
newUICustomizationType =
  UICustomizationType'
    { $sel:css:UICustomizationType' :: Maybe Text
css = forall a. Maybe a
Prelude.Nothing,
      $sel:cSSVersion:UICustomizationType' :: Maybe Text
cSSVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:clientId:UICustomizationType' :: Maybe (Sensitive Text)
clientId = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:UICustomizationType' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
      $sel:imageUrl:UICustomizationType' :: Maybe Text
imageUrl = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:UICustomizationType' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:userPoolId:UICustomizationType' :: Maybe Text
userPoolId = forall a. Maybe a
Prelude.Nothing
    }

-- | The CSS values in the UI customization.
uICustomizationType_css :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_css :: Lens' UICustomizationType (Maybe Text)
uICustomizationType_css = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe Text
css :: Maybe Text
$sel:css:UICustomizationType' :: UICustomizationType -> Maybe Text
css} -> Maybe Text
css) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe Text
a -> UICustomizationType
s {$sel:css:UICustomizationType' :: Maybe Text
css = Maybe Text
a} :: UICustomizationType)

-- | The CSS version number.
uICustomizationType_cSSVersion :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_cSSVersion :: Lens' UICustomizationType (Maybe Text)
uICustomizationType_cSSVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe Text
cSSVersion :: Maybe Text
$sel:cSSVersion:UICustomizationType' :: UICustomizationType -> Maybe Text
cSSVersion} -> Maybe Text
cSSVersion) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe Text
a -> UICustomizationType
s {$sel:cSSVersion:UICustomizationType' :: Maybe Text
cSSVersion = Maybe Text
a} :: UICustomizationType)

-- | The client ID for the client app.
uICustomizationType_clientId :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_clientId :: Lens' UICustomizationType (Maybe Text)
uICustomizationType_clientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe (Sensitive Text)
clientId :: Maybe (Sensitive Text)
$sel:clientId:UICustomizationType' :: UICustomizationType -> Maybe (Sensitive Text)
clientId} -> Maybe (Sensitive Text)
clientId) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe (Sensitive Text)
a -> UICustomizationType
s {$sel:clientId:UICustomizationType' :: Maybe (Sensitive Text)
clientId = Maybe (Sensitive Text)
a} :: UICustomizationType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The creation date for the UI customization.
uICustomizationType_creationDate :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.UTCTime)
uICustomizationType_creationDate :: Lens' UICustomizationType (Maybe UTCTime)
uICustomizationType_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe POSIX
a -> UICustomizationType
s {$sel:creationDate:UICustomizationType' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: UICustomizationType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The logo image for the UI customization.
uICustomizationType_imageUrl :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_imageUrl :: Lens' UICustomizationType (Maybe Text)
uICustomizationType_imageUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe Text
imageUrl :: Maybe Text
$sel:imageUrl:UICustomizationType' :: UICustomizationType -> Maybe Text
imageUrl} -> Maybe Text
imageUrl) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe Text
a -> UICustomizationType
s {$sel:imageUrl:UICustomizationType' :: Maybe Text
imageUrl = Maybe Text
a} :: UICustomizationType)

-- | The last-modified date for the UI customization.
uICustomizationType_lastModifiedDate :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.UTCTime)
uICustomizationType_lastModifiedDate :: Lens' UICustomizationType (Maybe UTCTime)
uICustomizationType_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe POSIX
a -> UICustomizationType
s {$sel:lastModifiedDate:UICustomizationType' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: UICustomizationType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user pool ID for the user pool.
uICustomizationType_userPoolId :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_userPoolId :: Lens' UICustomizationType (Maybe Text)
uICustomizationType_userPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UICustomizationType' {Maybe Text
userPoolId :: Maybe Text
$sel:userPoolId:UICustomizationType' :: UICustomizationType -> Maybe Text
userPoolId} -> Maybe Text
userPoolId) (\s :: UICustomizationType
s@UICustomizationType' {} Maybe Text
a -> UICustomizationType
s {$sel:userPoolId:UICustomizationType' :: Maybe Text
userPoolId = Maybe Text
a} :: UICustomizationType)

instance Data.FromJSON UICustomizationType where
  parseJSON :: Value -> Parser UICustomizationType
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"UICustomizationType"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> UICustomizationType
UICustomizationType'
            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
"CSS")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CSSVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ClientId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ImageUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UserPoolId")
      )

instance Prelude.Hashable UICustomizationType where
  hashWithSalt :: Int -> UICustomizationType -> Int
hashWithSalt Int
_salt UICustomizationType' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
userPoolId :: Maybe Text
lastModifiedDate :: Maybe POSIX
imageUrl :: Maybe Text
creationDate :: Maybe POSIX
clientId :: Maybe (Sensitive Text)
cSSVersion :: Maybe Text
css :: Maybe Text
$sel:userPoolId:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:lastModifiedDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
$sel:imageUrl:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:creationDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
$sel:clientId:UICustomizationType' :: UICustomizationType -> Maybe (Sensitive Text)
$sel:cSSVersion:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:css:UICustomizationType' :: UICustomizationType -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
css
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cSSVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
clientId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userPoolId

instance Prelude.NFData UICustomizationType where
  rnf :: UICustomizationType -> ()
rnf UICustomizationType' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
userPoolId :: Maybe Text
lastModifiedDate :: Maybe POSIX
imageUrl :: Maybe Text
creationDate :: Maybe POSIX
clientId :: Maybe (Sensitive Text)
cSSVersion :: Maybe Text
css :: Maybe Text
$sel:userPoolId:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:lastModifiedDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
$sel:imageUrl:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:creationDate:UICustomizationType' :: UICustomizationType -> Maybe POSIX
$sel:clientId:UICustomizationType' :: UICustomizationType -> Maybe (Sensitive Text)
$sel:cSSVersion:UICustomizationType' :: UICustomizationType -> Maybe Text
$sel:css:UICustomizationType' :: UICustomizationType -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
css
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cSSVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
clientId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userPoolId