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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 client ID for the client app.
    UICustomizationType -> Maybe (Sensitive Text)
clientId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The last-modified date for the UI customization.
    UICustomizationType -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The user pool ID for the user pool.
    UICustomizationType -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text,
    -- | 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 logo image for the UI customization.
    UICustomizationType -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
    -- | The creation date for the UI customization.
    UICustomizationType -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX
  }
  deriving (UICustomizationType -> UICustomizationType -> Bool
(UICustomizationType -> UICustomizationType -> Bool)
-> (UICustomizationType -> UICustomizationType -> Bool)
-> Eq UICustomizationType
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
(Int -> UICustomizationType -> ShowS)
-> (UICustomizationType -> String)
-> ([UICustomizationType] -> ShowS)
-> Show UICustomizationType
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. UICustomizationType -> Rep UICustomizationType x)
-> (forall x. Rep UICustomizationType x -> UICustomizationType)
-> Generic UICustomizationType
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:
--
-- 'clientId', 'uICustomizationType_clientId' - The client ID for the client app.
--
-- 'lastModifiedDate', 'uICustomizationType_lastModifiedDate' - The last-modified date for the UI customization.
--
-- 'userPoolId', 'uICustomizationType_userPoolId' - The user pool ID for the user pool.
--
-- 'css', 'uICustomizationType_css' - The CSS values in the UI customization.
--
-- 'cSSVersion', 'uICustomizationType_cSSVersion' - The CSS version number.
--
-- 'imageUrl', 'uICustomizationType_imageUrl' - The logo image for the UI customization.
--
-- 'creationDate', 'uICustomizationType_creationDate' - The creation date for the UI customization.
newUICustomizationType ::
  UICustomizationType
newUICustomizationType :: UICustomizationType
newUICustomizationType =
  UICustomizationType' :: Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> UICustomizationType
UICustomizationType'
    { $sel:clientId:UICustomizationType' :: Maybe (Sensitive Text)
clientId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:UICustomizationType' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:userPoolId:UICustomizationType' :: Maybe Text
userPoolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:css:UICustomizationType' :: Maybe Text
css = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cSSVersion:UICustomizationType' :: Maybe Text
cSSVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageUrl:UICustomizationType' :: Maybe Text
imageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:UICustomizationType' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The client ID for the client app.
uICustomizationType_clientId :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_clientId :: (Maybe Text -> f (Maybe Text))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_clientId = (UICustomizationType -> Maybe (Sensitive Text))
-> (UICustomizationType
    -> Maybe (Sensitive Text) -> UICustomizationType)
-> Lens
     UICustomizationType
     UICustomizationType
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UICustomizationType -> f UICustomizationType)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UICustomizationType
-> f UICustomizationType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The last-modified date for the UI customization.
uICustomizationType_lastModifiedDate :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.UTCTime)
uICustomizationType_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_lastModifiedDate = (UICustomizationType -> Maybe POSIX)
-> (UICustomizationType -> Maybe POSIX -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> UICustomizationType -> f UICustomizationType)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UICustomizationType
-> f UICustomizationType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The user pool ID for the user pool.
uICustomizationType_userPoolId :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_userPoolId :: (Maybe Text -> f (Maybe Text))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_userPoolId = (UICustomizationType -> Maybe Text)
-> (UICustomizationType -> Maybe Text -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe Text) (Maybe Text)
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)

-- | The CSS values in the UI customization.
uICustomizationType_css :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_css :: (Maybe Text -> f (Maybe Text))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_css = (UICustomizationType -> Maybe Text)
-> (UICustomizationType -> Maybe Text -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_cSSVersion = (UICustomizationType -> Maybe Text)
-> (UICustomizationType -> Maybe Text -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe Text) (Maybe Text)
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 logo image for the UI customization.
uICustomizationType_imageUrl :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.Text)
uICustomizationType_imageUrl :: (Maybe Text -> f (Maybe Text))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_imageUrl = (UICustomizationType -> Maybe Text)
-> (UICustomizationType -> Maybe Text -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe Text) (Maybe Text)
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 creation date for the UI customization.
uICustomizationType_creationDate :: Lens.Lens' UICustomizationType (Prelude.Maybe Prelude.UTCTime)
uICustomizationType_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UICustomizationType -> f UICustomizationType
uICustomizationType_creationDate = (UICustomizationType -> Maybe POSIX)
-> (UICustomizationType -> Maybe POSIX -> UICustomizationType)
-> Lens
     UICustomizationType UICustomizationType (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> UICustomizationType -> f UICustomizationType)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UICustomizationType
-> f UICustomizationType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance Prelude.Hashable UICustomizationType

instance Prelude.NFData UICustomizationType