{-# 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.OriginGroupFailoverCriteria where
import Amazonka.CloudFront.Types.StatusCodes
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OriginGroupFailoverCriteria = OriginGroupFailoverCriteria'
{
OriginGroupFailoverCriteria -> StatusCodes
statusCodes :: StatusCodes
}
deriving (OriginGroupFailoverCriteria -> OriginGroupFailoverCriteria -> Bool
(OriginGroupFailoverCriteria
-> OriginGroupFailoverCriteria -> Bool)
-> (OriginGroupFailoverCriteria
-> OriginGroupFailoverCriteria -> Bool)
-> Eq OriginGroupFailoverCriteria
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OriginGroupFailoverCriteria -> OriginGroupFailoverCriteria -> Bool
$c/= :: OriginGroupFailoverCriteria -> OriginGroupFailoverCriteria -> Bool
== :: OriginGroupFailoverCriteria -> OriginGroupFailoverCriteria -> Bool
$c== :: OriginGroupFailoverCriteria -> OriginGroupFailoverCriteria -> Bool
Prelude.Eq, ReadPrec [OriginGroupFailoverCriteria]
ReadPrec OriginGroupFailoverCriteria
Int -> ReadS OriginGroupFailoverCriteria
ReadS [OriginGroupFailoverCriteria]
(Int -> ReadS OriginGroupFailoverCriteria)
-> ReadS [OriginGroupFailoverCriteria]
-> ReadPrec OriginGroupFailoverCriteria
-> ReadPrec [OriginGroupFailoverCriteria]
-> Read OriginGroupFailoverCriteria
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OriginGroupFailoverCriteria]
$creadListPrec :: ReadPrec [OriginGroupFailoverCriteria]
readPrec :: ReadPrec OriginGroupFailoverCriteria
$creadPrec :: ReadPrec OriginGroupFailoverCriteria
readList :: ReadS [OriginGroupFailoverCriteria]
$creadList :: ReadS [OriginGroupFailoverCriteria]
readsPrec :: Int -> ReadS OriginGroupFailoverCriteria
$creadsPrec :: Int -> ReadS OriginGroupFailoverCriteria
Prelude.Read, Int -> OriginGroupFailoverCriteria -> ShowS
[OriginGroupFailoverCriteria] -> ShowS
OriginGroupFailoverCriteria -> String
(Int -> OriginGroupFailoverCriteria -> ShowS)
-> (OriginGroupFailoverCriteria -> String)
-> ([OriginGroupFailoverCriteria] -> ShowS)
-> Show OriginGroupFailoverCriteria
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OriginGroupFailoverCriteria] -> ShowS
$cshowList :: [OriginGroupFailoverCriteria] -> ShowS
show :: OriginGroupFailoverCriteria -> String
$cshow :: OriginGroupFailoverCriteria -> String
showsPrec :: Int -> OriginGroupFailoverCriteria -> ShowS
$cshowsPrec :: Int -> OriginGroupFailoverCriteria -> ShowS
Prelude.Show, (forall x.
OriginGroupFailoverCriteria -> Rep OriginGroupFailoverCriteria x)
-> (forall x.
Rep OriginGroupFailoverCriteria x -> OriginGroupFailoverCriteria)
-> Generic OriginGroupFailoverCriteria
forall x.
Rep OriginGroupFailoverCriteria x -> OriginGroupFailoverCriteria
forall x.
OriginGroupFailoverCriteria -> Rep OriginGroupFailoverCriteria x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OriginGroupFailoverCriteria x -> OriginGroupFailoverCriteria
$cfrom :: forall x.
OriginGroupFailoverCriteria -> Rep OriginGroupFailoverCriteria x
Prelude.Generic)
newOriginGroupFailoverCriteria ::
StatusCodes ->
OriginGroupFailoverCriteria
newOriginGroupFailoverCriteria :: StatusCodes -> OriginGroupFailoverCriteria
newOriginGroupFailoverCriteria StatusCodes
pStatusCodes_ =
OriginGroupFailoverCriteria' :: StatusCodes -> OriginGroupFailoverCriteria
OriginGroupFailoverCriteria'
{ $sel:statusCodes:OriginGroupFailoverCriteria' :: StatusCodes
statusCodes =
StatusCodes
pStatusCodes_
}
originGroupFailoverCriteria_statusCodes :: Lens.Lens' OriginGroupFailoverCriteria StatusCodes
originGroupFailoverCriteria_statusCodes :: (StatusCodes -> f StatusCodes)
-> OriginGroupFailoverCriteria -> f OriginGroupFailoverCriteria
originGroupFailoverCriteria_statusCodes = (OriginGroupFailoverCriteria -> StatusCodes)
-> (OriginGroupFailoverCriteria
-> StatusCodes -> OriginGroupFailoverCriteria)
-> Lens
OriginGroupFailoverCriteria
OriginGroupFailoverCriteria
StatusCodes
StatusCodes
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginGroupFailoverCriteria' {StatusCodes
statusCodes :: StatusCodes
$sel:statusCodes:OriginGroupFailoverCriteria' :: OriginGroupFailoverCriteria -> StatusCodes
statusCodes} -> StatusCodes
statusCodes) (\s :: OriginGroupFailoverCriteria
s@OriginGroupFailoverCriteria' {} StatusCodes
a -> OriginGroupFailoverCriteria
s {$sel:statusCodes:OriginGroupFailoverCriteria' :: StatusCodes
statusCodes = StatusCodes
a} :: OriginGroupFailoverCriteria)
instance Core.FromXML OriginGroupFailoverCriteria where
parseXML :: [Node] -> Either String OriginGroupFailoverCriteria
parseXML [Node]
x =
StatusCodes -> OriginGroupFailoverCriteria
OriginGroupFailoverCriteria'
(StatusCodes -> OriginGroupFailoverCriteria)
-> Either String StatusCodes
-> Either String OriginGroupFailoverCriteria
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String StatusCodes
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StatusCodes")
instance Prelude.Hashable OriginGroupFailoverCriteria
instance Prelude.NFData OriginGroupFailoverCriteria
instance Core.ToXML OriginGroupFailoverCriteria where
toXML :: OriginGroupFailoverCriteria -> XML
toXML OriginGroupFailoverCriteria' {StatusCodes
statusCodes :: StatusCodes
$sel:statusCodes:OriginGroupFailoverCriteria' :: OriginGroupFailoverCriteria -> StatusCodes
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"StatusCodes" Name -> StatusCodes -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= StatusCodes
statusCodes]