{-# 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.CodeDeliveryDetailsType where
import Amazonka.CognitoIdentityProvider.Types.DeliveryMediumType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeDeliveryDetailsType = CodeDeliveryDetailsType'
{
CodeDeliveryDetailsType -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
CodeDeliveryDetailsType -> Maybe DeliveryMediumType
deliveryMedium :: Prelude.Maybe DeliveryMediumType,
CodeDeliveryDetailsType -> Maybe Text
attributeName :: Prelude.Maybe Prelude.Text
}
deriving (CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool
(CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool)
-> (CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool)
-> Eq CodeDeliveryDetailsType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool
$c/= :: CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool
== :: CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool
$c== :: CodeDeliveryDetailsType -> CodeDeliveryDetailsType -> Bool
Prelude.Eq, ReadPrec [CodeDeliveryDetailsType]
ReadPrec CodeDeliveryDetailsType
Int -> ReadS CodeDeliveryDetailsType
ReadS [CodeDeliveryDetailsType]
(Int -> ReadS CodeDeliveryDetailsType)
-> ReadS [CodeDeliveryDetailsType]
-> ReadPrec CodeDeliveryDetailsType
-> ReadPrec [CodeDeliveryDetailsType]
-> Read CodeDeliveryDetailsType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeDeliveryDetailsType]
$creadListPrec :: ReadPrec [CodeDeliveryDetailsType]
readPrec :: ReadPrec CodeDeliveryDetailsType
$creadPrec :: ReadPrec CodeDeliveryDetailsType
readList :: ReadS [CodeDeliveryDetailsType]
$creadList :: ReadS [CodeDeliveryDetailsType]
readsPrec :: Int -> ReadS CodeDeliveryDetailsType
$creadsPrec :: Int -> ReadS CodeDeliveryDetailsType
Prelude.Read, Int -> CodeDeliveryDetailsType -> ShowS
[CodeDeliveryDetailsType] -> ShowS
CodeDeliveryDetailsType -> String
(Int -> CodeDeliveryDetailsType -> ShowS)
-> (CodeDeliveryDetailsType -> String)
-> ([CodeDeliveryDetailsType] -> ShowS)
-> Show CodeDeliveryDetailsType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeDeliveryDetailsType] -> ShowS
$cshowList :: [CodeDeliveryDetailsType] -> ShowS
show :: CodeDeliveryDetailsType -> String
$cshow :: CodeDeliveryDetailsType -> String
showsPrec :: Int -> CodeDeliveryDetailsType -> ShowS
$cshowsPrec :: Int -> CodeDeliveryDetailsType -> ShowS
Prelude.Show, (forall x.
CodeDeliveryDetailsType -> Rep CodeDeliveryDetailsType x)
-> (forall x.
Rep CodeDeliveryDetailsType x -> CodeDeliveryDetailsType)
-> Generic CodeDeliveryDetailsType
forall x. Rep CodeDeliveryDetailsType x -> CodeDeliveryDetailsType
forall x. CodeDeliveryDetailsType -> Rep CodeDeliveryDetailsType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeDeliveryDetailsType x -> CodeDeliveryDetailsType
$cfrom :: forall x. CodeDeliveryDetailsType -> Rep CodeDeliveryDetailsType x
Prelude.Generic)
newCodeDeliveryDetailsType ::
CodeDeliveryDetailsType
newCodeDeliveryDetailsType :: CodeDeliveryDetailsType
newCodeDeliveryDetailsType =
CodeDeliveryDetailsType' :: Maybe Text
-> Maybe DeliveryMediumType
-> Maybe Text
-> CodeDeliveryDetailsType
CodeDeliveryDetailsType'
{ $sel:destination:CodeDeliveryDetailsType' :: Maybe Text
destination =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deliveryMedium:CodeDeliveryDetailsType' :: Maybe DeliveryMediumType
deliveryMedium = Maybe DeliveryMediumType
forall a. Maybe a
Prelude.Nothing,
$sel:attributeName:CodeDeliveryDetailsType' :: Maybe Text
attributeName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
codeDeliveryDetailsType_destination :: Lens.Lens' CodeDeliveryDetailsType (Prelude.Maybe Prelude.Text)
codeDeliveryDetailsType_destination :: (Maybe Text -> f (Maybe Text))
-> CodeDeliveryDetailsType -> f CodeDeliveryDetailsType
codeDeliveryDetailsType_destination = (CodeDeliveryDetailsType -> Maybe Text)
-> (CodeDeliveryDetailsType
-> Maybe Text -> CodeDeliveryDetailsType)
-> Lens
CodeDeliveryDetailsType
CodeDeliveryDetailsType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeDeliveryDetailsType' {Maybe Text
destination :: Maybe Text
$sel:destination:CodeDeliveryDetailsType' :: CodeDeliveryDetailsType -> Maybe Text
destination} -> Maybe Text
destination) (\s :: CodeDeliveryDetailsType
s@CodeDeliveryDetailsType' {} Maybe Text
a -> CodeDeliveryDetailsType
s {$sel:destination:CodeDeliveryDetailsType' :: Maybe Text
destination = Maybe Text
a} :: CodeDeliveryDetailsType)
codeDeliveryDetailsType_deliveryMedium :: Lens.Lens' CodeDeliveryDetailsType (Prelude.Maybe DeliveryMediumType)
codeDeliveryDetailsType_deliveryMedium :: (Maybe DeliveryMediumType -> f (Maybe DeliveryMediumType))
-> CodeDeliveryDetailsType -> f CodeDeliveryDetailsType
codeDeliveryDetailsType_deliveryMedium = (CodeDeliveryDetailsType -> Maybe DeliveryMediumType)
-> (CodeDeliveryDetailsType
-> Maybe DeliveryMediumType -> CodeDeliveryDetailsType)
-> Lens
CodeDeliveryDetailsType
CodeDeliveryDetailsType
(Maybe DeliveryMediumType)
(Maybe DeliveryMediumType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeDeliveryDetailsType' {Maybe DeliveryMediumType
deliveryMedium :: Maybe DeliveryMediumType
$sel:deliveryMedium:CodeDeliveryDetailsType' :: CodeDeliveryDetailsType -> Maybe DeliveryMediumType
deliveryMedium} -> Maybe DeliveryMediumType
deliveryMedium) (\s :: CodeDeliveryDetailsType
s@CodeDeliveryDetailsType' {} Maybe DeliveryMediumType
a -> CodeDeliveryDetailsType
s {$sel:deliveryMedium:CodeDeliveryDetailsType' :: Maybe DeliveryMediumType
deliveryMedium = Maybe DeliveryMediumType
a} :: CodeDeliveryDetailsType)
codeDeliveryDetailsType_attributeName :: Lens.Lens' CodeDeliveryDetailsType (Prelude.Maybe Prelude.Text)
codeDeliveryDetailsType_attributeName :: (Maybe Text -> f (Maybe Text))
-> CodeDeliveryDetailsType -> f CodeDeliveryDetailsType
codeDeliveryDetailsType_attributeName = (CodeDeliveryDetailsType -> Maybe Text)
-> (CodeDeliveryDetailsType
-> Maybe Text -> CodeDeliveryDetailsType)
-> Lens
CodeDeliveryDetailsType
CodeDeliveryDetailsType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeDeliveryDetailsType' {Maybe Text
attributeName :: Maybe Text
$sel:attributeName:CodeDeliveryDetailsType' :: CodeDeliveryDetailsType -> Maybe Text
attributeName} -> Maybe Text
attributeName) (\s :: CodeDeliveryDetailsType
s@CodeDeliveryDetailsType' {} Maybe Text
a -> CodeDeliveryDetailsType
s {$sel:attributeName:CodeDeliveryDetailsType' :: Maybe Text
attributeName = Maybe Text
a} :: CodeDeliveryDetailsType)
instance Core.FromJSON CodeDeliveryDetailsType where
parseJSON :: Value -> Parser CodeDeliveryDetailsType
parseJSON =
String
-> (Object -> Parser CodeDeliveryDetailsType)
-> Value
-> Parser CodeDeliveryDetailsType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CodeDeliveryDetailsType"
( \Object
x ->
Maybe Text
-> Maybe DeliveryMediumType
-> Maybe Text
-> CodeDeliveryDetailsType
CodeDeliveryDetailsType'
(Maybe Text
-> Maybe DeliveryMediumType
-> Maybe Text
-> CodeDeliveryDetailsType)
-> Parser (Maybe Text)
-> Parser
(Maybe DeliveryMediumType -> Maybe Text -> CodeDeliveryDetailsType)
forall (f :: * -> *) a b. Functor 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
"Destination")
Parser
(Maybe DeliveryMediumType -> Maybe Text -> CodeDeliveryDetailsType)
-> Parser (Maybe DeliveryMediumType)
-> Parser (Maybe Text -> CodeDeliveryDetailsType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeliveryMediumType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeliveryMedium")
Parser (Maybe Text -> CodeDeliveryDetailsType)
-> Parser (Maybe Text) -> Parser CodeDeliveryDetailsType
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
"AttributeName")
)
instance Prelude.Hashable CodeDeliveryDetailsType
instance Prelude.NFData CodeDeliveryDetailsType