{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CustomDomainConfigType = CustomDomainConfigType'
{
CustomDomainConfigType -> Text
certificateArn :: Prelude.Text
}
deriving (CustomDomainConfigType -> CustomDomainConfigType -> Bool
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]
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
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. 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'
{ $sel:certificateArn:CustomDomainConfigType' :: Text
certificateArn =
Text
pCertificateArn_
}
customDomainConfigType_certificateArn :: Lens.Lens' CustomDomainConfigType Prelude.Text
customDomainConfigType_certificateArn :: Lens' CustomDomainConfigType Text
customDomainConfigType_certificateArn = 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 Data.FromJSON CustomDomainConfigType where
parseJSON :: Value -> Parser CustomDomainConfigType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomDomainConfigType"
( \Object
x ->
Text -> CustomDomainConfigType
CustomDomainConfigType'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CertificateArn")
)
instance Prelude.Hashable CustomDomainConfigType where
hashWithSalt :: Int -> CustomDomainConfigType -> Int
hashWithSalt Int
_salt CustomDomainConfigType' {Text
certificateArn :: Text
$sel:certificateArn:CustomDomainConfigType' :: CustomDomainConfigType -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
certificateArn
instance Prelude.NFData CustomDomainConfigType where
rnf :: CustomDomainConfigType -> ()
rnf CustomDomainConfigType' {Text
certificateArn :: Text
$sel:certificateArn:CustomDomainConfigType' :: CustomDomainConfigType -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
certificateArn
instance Data.ToJSON CustomDomainConfigType where
toJSON :: CustomDomainConfigType -> Value
toJSON CustomDomainConfigType' {Text
certificateArn :: Text
$sel:certificateArn:CustomDomainConfigType' :: CustomDomainConfigType -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"CertificateArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
certificateArn)
]
)