{-# 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 #-}
module Amazonka.CognitoIdentityProvider.Types.CustomDomainConfigType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomDomainConfigType = CustomDomainConfigType'
{
CustomDomainConfigType -> Text
certificateArn :: Prelude.Text
}
deriving (CustomDomainConfigType -> CustomDomainConfigType -> Bool
(CustomDomainConfigType -> CustomDomainConfigType -> Bool)
-> (CustomDomainConfigType -> CustomDomainConfigType -> Bool)
-> Eq CustomDomainConfigType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomDomainConfigType -> CustomDomainConfigType -> Bool
$c/= :: CustomDomainConfigType -> CustomDomainConfigType -> Bool
== :: CustomDomainConfigType -> CustomDomainConfigType -> Bool
$c== :: CustomDomainConfigType -> CustomDomainConfigType -> Bool
Prelude.Eq, ReadPrec [CustomDomainConfigType]
ReadPrec CustomDomainConfigType
Int -> ReadS CustomDomainConfigType
ReadS [CustomDomainConfigType]
(Int -> ReadS CustomDomainConfigType)
-> ReadS [CustomDomainConfigType]
-> ReadPrec CustomDomainConfigType
-> ReadPrec [CustomDomainConfigType]
-> Read CustomDomainConfigType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomDomainConfigType]
$creadListPrec :: ReadPrec [CustomDomainConfigType]
readPrec :: ReadPrec CustomDomainConfigType
$creadPrec :: ReadPrec CustomDomainConfigType
readList :: ReadS [CustomDomainConfigType]
$creadList :: ReadS [CustomDomainConfigType]
readsPrec :: Int -> ReadS CustomDomainConfigType
$creadsPrec :: Int -> ReadS CustomDomainConfigType
Prelude.Read, Int -> CustomDomainConfigType -> ShowS
[CustomDomainConfigType] -> ShowS
CustomDomainConfigType -> String
(Int -> CustomDomainConfigType -> ShowS)
-> (CustomDomainConfigType -> String)
-> ([CustomDomainConfigType] -> ShowS)
-> Show CustomDomainConfigType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomDomainConfigType] -> ShowS
$cshowList :: [CustomDomainConfigType] -> ShowS
show :: CustomDomainConfigType -> String
$cshow :: CustomDomainConfigType -> String
showsPrec :: Int -> CustomDomainConfigType -> ShowS
$cshowsPrec :: Int -> CustomDomainConfigType -> ShowS
Prelude.Show, (forall x. CustomDomainConfigType -> Rep CustomDomainConfigType x)
-> (forall x.
Rep CustomDomainConfigType x -> CustomDomainConfigType)
-> Generic CustomDomainConfigType
forall x. Rep CustomDomainConfigType x -> CustomDomainConfigType
forall x. CustomDomainConfigType -> Rep CustomDomainConfigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomDomainConfigType x -> CustomDomainConfigType
$cfrom :: forall x. CustomDomainConfigType -> Rep CustomDomainConfigType x
Prelude.Generic)
newCustomDomainConfigType ::
Prelude.Text ->
CustomDomainConfigType
newCustomDomainConfigType :: Text -> CustomDomainConfigType
newCustomDomainConfigType Text
pCertificateArn_ =
CustomDomainConfigType' :: Text -> CustomDomainConfigType
CustomDomainConfigType'
{ $sel:certificateArn:CustomDomainConfigType' :: Text
certificateArn =
Text
pCertificateArn_
}
customDomainConfigType_certificateArn :: Lens.Lens' CustomDomainConfigType Prelude.Text
customDomainConfigType_certificateArn :: (Text -> f Text)
-> CustomDomainConfigType -> f CustomDomainConfigType
customDomainConfigType_certificateArn = (CustomDomainConfigType -> Text)
-> (CustomDomainConfigType -> Text -> CustomDomainConfigType)
-> Lens CustomDomainConfigType CustomDomainConfigType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomDomainConfigType' {Text
certificateArn :: Text
$sel:certificateArn:CustomDomainConfigType' :: CustomDomainConfigType -> Text
certificateArn} -> Text
certificateArn) (\s :: CustomDomainConfigType
s@CustomDomainConfigType' {} Text
a -> CustomDomainConfigType
s {$sel:certificateArn:CustomDomainConfigType' :: Text
certificateArn = Text
a} :: CustomDomainConfigType)
instance Core.FromJSON CustomDomainConfigType where
parseJSON :: Value -> Parser CustomDomainConfigType
parseJSON =
String
-> (Object -> Parser CustomDomainConfigType)
-> Value
-> Parser CustomDomainConfigType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomDomainConfigType"
( \Object
x ->
Text -> CustomDomainConfigType
CustomDomainConfigType'
(Text -> CustomDomainConfigType)
-> Parser Text -> Parser CustomDomainConfigType
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CertificateArn")
)
instance Prelude.Hashable CustomDomainConfigType
instance Prelude.NFData CustomDomainConfigType
instance Core.ToJSON CustomDomainConfigType where
toJSON :: CustomDomainConfigType -> Value
toJSON CustomDomainConfigType' {Text
certificateArn :: Text
$sel:certificateArn:CustomDomainConfigType' :: CustomDomainConfigType -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CertificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateArn)
]
)