{-# 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.CloudFront.Types.AliasICPRecordal where
import Amazonka.CloudFront.Types.ICPRecordalStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AliasICPRecordal = AliasICPRecordal'
{
AliasICPRecordal -> Maybe Text
cname :: Prelude.Maybe Prelude.Text,
AliasICPRecordal -> Maybe ICPRecordalStatus
iCPRecordalStatus :: Prelude.Maybe ICPRecordalStatus
}
deriving (AliasICPRecordal -> AliasICPRecordal -> Bool
(AliasICPRecordal -> AliasICPRecordal -> Bool)
-> (AliasICPRecordal -> AliasICPRecordal -> Bool)
-> Eq AliasICPRecordal
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AliasICPRecordal -> AliasICPRecordal -> Bool
$c/= :: AliasICPRecordal -> AliasICPRecordal -> Bool
== :: AliasICPRecordal -> AliasICPRecordal -> Bool
$c== :: AliasICPRecordal -> AliasICPRecordal -> Bool
Prelude.Eq, ReadPrec [AliasICPRecordal]
ReadPrec AliasICPRecordal
Int -> ReadS AliasICPRecordal
ReadS [AliasICPRecordal]
(Int -> ReadS AliasICPRecordal)
-> ReadS [AliasICPRecordal]
-> ReadPrec AliasICPRecordal
-> ReadPrec [AliasICPRecordal]
-> Read AliasICPRecordal
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AliasICPRecordal]
$creadListPrec :: ReadPrec [AliasICPRecordal]
readPrec :: ReadPrec AliasICPRecordal
$creadPrec :: ReadPrec AliasICPRecordal
readList :: ReadS [AliasICPRecordal]
$creadList :: ReadS [AliasICPRecordal]
readsPrec :: Int -> ReadS AliasICPRecordal
$creadsPrec :: Int -> ReadS AliasICPRecordal
Prelude.Read, Int -> AliasICPRecordal -> ShowS
[AliasICPRecordal] -> ShowS
AliasICPRecordal -> String
(Int -> AliasICPRecordal -> ShowS)
-> (AliasICPRecordal -> String)
-> ([AliasICPRecordal] -> ShowS)
-> Show AliasICPRecordal
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AliasICPRecordal] -> ShowS
$cshowList :: [AliasICPRecordal] -> ShowS
show :: AliasICPRecordal -> String
$cshow :: AliasICPRecordal -> String
showsPrec :: Int -> AliasICPRecordal -> ShowS
$cshowsPrec :: Int -> AliasICPRecordal -> ShowS
Prelude.Show, (forall x. AliasICPRecordal -> Rep AliasICPRecordal x)
-> (forall x. Rep AliasICPRecordal x -> AliasICPRecordal)
-> Generic AliasICPRecordal
forall x. Rep AliasICPRecordal x -> AliasICPRecordal
forall x. AliasICPRecordal -> Rep AliasICPRecordal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AliasICPRecordal x -> AliasICPRecordal
$cfrom :: forall x. AliasICPRecordal -> Rep AliasICPRecordal x
Prelude.Generic)
newAliasICPRecordal ::
AliasICPRecordal
newAliasICPRecordal :: AliasICPRecordal
newAliasICPRecordal =
AliasICPRecordal' :: Maybe Text -> Maybe ICPRecordalStatus -> AliasICPRecordal
AliasICPRecordal'
{ $sel:cname:AliasICPRecordal' :: Maybe Text
cname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iCPRecordalStatus:AliasICPRecordal' :: Maybe ICPRecordalStatus
iCPRecordalStatus = Maybe ICPRecordalStatus
forall a. Maybe a
Prelude.Nothing
}
aliasICPRecordal_cname :: Lens.Lens' AliasICPRecordal (Prelude.Maybe Prelude.Text)
aliasICPRecordal_cname :: (Maybe Text -> f (Maybe Text))
-> AliasICPRecordal -> f AliasICPRecordal
aliasICPRecordal_cname = (AliasICPRecordal -> Maybe Text)
-> (AliasICPRecordal -> Maybe Text -> AliasICPRecordal)
-> Lens AliasICPRecordal AliasICPRecordal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AliasICPRecordal' {Maybe Text
cname :: Maybe Text
$sel:cname:AliasICPRecordal' :: AliasICPRecordal -> Maybe Text
cname} -> Maybe Text
cname) (\s :: AliasICPRecordal
s@AliasICPRecordal' {} Maybe Text
a -> AliasICPRecordal
s {$sel:cname:AliasICPRecordal' :: Maybe Text
cname = Maybe Text
a} :: AliasICPRecordal)
aliasICPRecordal_iCPRecordalStatus :: Lens.Lens' AliasICPRecordal (Prelude.Maybe ICPRecordalStatus)
aliasICPRecordal_iCPRecordalStatus :: (Maybe ICPRecordalStatus -> f (Maybe ICPRecordalStatus))
-> AliasICPRecordal -> f AliasICPRecordal
aliasICPRecordal_iCPRecordalStatus = (AliasICPRecordal -> Maybe ICPRecordalStatus)
-> (AliasICPRecordal
-> Maybe ICPRecordalStatus -> AliasICPRecordal)
-> Lens
AliasICPRecordal
AliasICPRecordal
(Maybe ICPRecordalStatus)
(Maybe ICPRecordalStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AliasICPRecordal' {Maybe ICPRecordalStatus
iCPRecordalStatus :: Maybe ICPRecordalStatus
$sel:iCPRecordalStatus:AliasICPRecordal' :: AliasICPRecordal -> Maybe ICPRecordalStatus
iCPRecordalStatus} -> Maybe ICPRecordalStatus
iCPRecordalStatus) (\s :: AliasICPRecordal
s@AliasICPRecordal' {} Maybe ICPRecordalStatus
a -> AliasICPRecordal
s {$sel:iCPRecordalStatus:AliasICPRecordal' :: Maybe ICPRecordalStatus
iCPRecordalStatus = Maybe ICPRecordalStatus
a} :: AliasICPRecordal)
instance Core.FromXML AliasICPRecordal where
parseXML :: [Node] -> Either String AliasICPRecordal
parseXML [Node]
x =
Maybe Text -> Maybe ICPRecordalStatus -> AliasICPRecordal
AliasICPRecordal'
(Maybe Text -> Maybe ICPRecordalStatus -> AliasICPRecordal)
-> Either String (Maybe Text)
-> Either String (Maybe ICPRecordalStatus -> AliasICPRecordal)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CNAME")
Either String (Maybe ICPRecordalStatus -> AliasICPRecordal)
-> Either String (Maybe ICPRecordalStatus)
-> Either String AliasICPRecordal
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ICPRecordalStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ICPRecordalStatus")
instance Prelude.Hashable AliasICPRecordal
instance Prelude.NFData AliasICPRecordal