{-# 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.ConflictingAlias where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConflictingAlias = ConflictingAlias'
{
ConflictingAlias -> Maybe Text
alias :: Prelude.Maybe Prelude.Text,
ConflictingAlias -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
ConflictingAlias -> Maybe Text
distributionId :: Prelude.Maybe Prelude.Text
}
deriving (ConflictingAlias -> ConflictingAlias -> Bool
(ConflictingAlias -> ConflictingAlias -> Bool)
-> (ConflictingAlias -> ConflictingAlias -> Bool)
-> Eq ConflictingAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConflictingAlias -> ConflictingAlias -> Bool
$c/= :: ConflictingAlias -> ConflictingAlias -> Bool
== :: ConflictingAlias -> ConflictingAlias -> Bool
$c== :: ConflictingAlias -> ConflictingAlias -> Bool
Prelude.Eq, ReadPrec [ConflictingAlias]
ReadPrec ConflictingAlias
Int -> ReadS ConflictingAlias
ReadS [ConflictingAlias]
(Int -> ReadS ConflictingAlias)
-> ReadS [ConflictingAlias]
-> ReadPrec ConflictingAlias
-> ReadPrec [ConflictingAlias]
-> Read ConflictingAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConflictingAlias]
$creadListPrec :: ReadPrec [ConflictingAlias]
readPrec :: ReadPrec ConflictingAlias
$creadPrec :: ReadPrec ConflictingAlias
readList :: ReadS [ConflictingAlias]
$creadList :: ReadS [ConflictingAlias]
readsPrec :: Int -> ReadS ConflictingAlias
$creadsPrec :: Int -> ReadS ConflictingAlias
Prelude.Read, Int -> ConflictingAlias -> ShowS
[ConflictingAlias] -> ShowS
ConflictingAlias -> String
(Int -> ConflictingAlias -> ShowS)
-> (ConflictingAlias -> String)
-> ([ConflictingAlias] -> ShowS)
-> Show ConflictingAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConflictingAlias] -> ShowS
$cshowList :: [ConflictingAlias] -> ShowS
show :: ConflictingAlias -> String
$cshow :: ConflictingAlias -> String
showsPrec :: Int -> ConflictingAlias -> ShowS
$cshowsPrec :: Int -> ConflictingAlias -> ShowS
Prelude.Show, (forall x. ConflictingAlias -> Rep ConflictingAlias x)
-> (forall x. Rep ConflictingAlias x -> ConflictingAlias)
-> Generic ConflictingAlias
forall x. Rep ConflictingAlias x -> ConflictingAlias
forall x. ConflictingAlias -> Rep ConflictingAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConflictingAlias x -> ConflictingAlias
$cfrom :: forall x. ConflictingAlias -> Rep ConflictingAlias x
Prelude.Generic)
newConflictingAlias ::
ConflictingAlias
newConflictingAlias :: ConflictingAlias
newConflictingAlias =
ConflictingAlias' :: Maybe Text -> Maybe Text -> Maybe Text -> ConflictingAlias
ConflictingAlias'
{ $sel:alias:ConflictingAlias' :: Maybe Text
alias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:ConflictingAlias' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:distributionId:ConflictingAlias' :: Maybe Text
distributionId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
conflictingAlias_alias :: Lens.Lens' ConflictingAlias (Prelude.Maybe Prelude.Text)
conflictingAlias_alias :: (Maybe Text -> f (Maybe Text))
-> ConflictingAlias -> f ConflictingAlias
conflictingAlias_alias = (ConflictingAlias -> Maybe Text)
-> (ConflictingAlias -> Maybe Text -> ConflictingAlias)
-> Lens ConflictingAlias ConflictingAlias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConflictingAlias' {Maybe Text
alias :: Maybe Text
$sel:alias:ConflictingAlias' :: ConflictingAlias -> Maybe Text
alias} -> Maybe Text
alias) (\s :: ConflictingAlias
s@ConflictingAlias' {} Maybe Text
a -> ConflictingAlias
s {$sel:alias:ConflictingAlias' :: Maybe Text
alias = Maybe Text
a} :: ConflictingAlias)
conflictingAlias_accountId :: Lens.Lens' ConflictingAlias (Prelude.Maybe Prelude.Text)
conflictingAlias_accountId :: (Maybe Text -> f (Maybe Text))
-> ConflictingAlias -> f ConflictingAlias
conflictingAlias_accountId = (ConflictingAlias -> Maybe Text)
-> (ConflictingAlias -> Maybe Text -> ConflictingAlias)
-> Lens ConflictingAlias ConflictingAlias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConflictingAlias' {Maybe Text
accountId :: Maybe Text
$sel:accountId:ConflictingAlias' :: ConflictingAlias -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: ConflictingAlias
s@ConflictingAlias' {} Maybe Text
a -> ConflictingAlias
s {$sel:accountId:ConflictingAlias' :: Maybe Text
accountId = Maybe Text
a} :: ConflictingAlias)
conflictingAlias_distributionId :: Lens.Lens' ConflictingAlias (Prelude.Maybe Prelude.Text)
conflictingAlias_distributionId :: (Maybe Text -> f (Maybe Text))
-> ConflictingAlias -> f ConflictingAlias
conflictingAlias_distributionId = (ConflictingAlias -> Maybe Text)
-> (ConflictingAlias -> Maybe Text -> ConflictingAlias)
-> Lens ConflictingAlias ConflictingAlias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConflictingAlias' {Maybe Text
distributionId :: Maybe Text
$sel:distributionId:ConflictingAlias' :: ConflictingAlias -> Maybe Text
distributionId} -> Maybe Text
distributionId) (\s :: ConflictingAlias
s@ConflictingAlias' {} Maybe Text
a -> ConflictingAlias
s {$sel:distributionId:ConflictingAlias' :: Maybe Text
distributionId = Maybe Text
a} :: ConflictingAlias)
instance Core.FromXML ConflictingAlias where
parseXML :: [Node] -> Either String ConflictingAlias
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> ConflictingAlias
ConflictingAlias'
(Maybe Text -> Maybe Text -> Maybe Text -> ConflictingAlias)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> ConflictingAlias)
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
"Alias")
Either String (Maybe Text -> Maybe Text -> ConflictingAlias)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ConflictingAlias)
forall (f :: * -> *) a b. Applicative f => 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
"AccountId")
Either String (Maybe Text -> ConflictingAlias)
-> Either String (Maybe Text) -> Either String ConflictingAlias
forall (f :: * -> *) a b. Applicative f => 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
"DistributionId")
instance Prelude.Hashable ConflictingAlias
instance Prelude.NFData ConflictingAlias