{-# 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.SecurityHub.Types.AwsCloudFrontDistributionOriginGroupFailoverStatusCodes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsCloudFrontDistributionOriginGroupFailoverStatusCodes = AwsCloudFrontDistributionOriginGroupFailoverStatusCodes'
{
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe Int
quantity :: Prelude.Maybe Prelude.Int,
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe [Int]
items :: Prelude.Maybe [Prelude.Int]
}
deriving (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool
(AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool)
-> (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool)
-> Eq AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool
$c/= :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool
== :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool
$c== :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Bool
Prelude.Eq, ReadPrec [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
ReadPrec AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
Int
-> ReadS AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
ReadS [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
(Int
-> ReadS AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> ReadS [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
-> ReadPrec AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> ReadPrec
[AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
-> Read AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
$creadListPrec :: ReadPrec [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
readPrec :: ReadPrec AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
$creadPrec :: ReadPrec AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
readList :: ReadS [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
$creadList :: ReadS [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
readsPrec :: Int
-> ReadS AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
$creadsPrec :: Int
-> ReadS AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
Prelude.Read, Int
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> ShowS
[AwsCloudFrontDistributionOriginGroupFailoverStatusCodes] -> ShowS
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> String
(Int
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> ShowS)
-> (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> String)
-> ([AwsCloudFrontDistributionOriginGroupFailoverStatusCodes]
-> ShowS)
-> Show AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes] -> ShowS
$cshowList :: [AwsCloudFrontDistributionOriginGroupFailoverStatusCodes] -> ShowS
show :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> String
$cshow :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> String
showsPrec :: Int
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> ShowS
$cshowsPrec :: Int
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> ShowS
Prelude.Show, (forall x.
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x)
-> (forall x.
Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Generic AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall x.
Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall x.
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
$cfrom :: forall x.
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Rep AwsCloudFrontDistributionOriginGroupFailoverStatusCodes x
Prelude.Generic)
newAwsCloudFrontDistributionOriginGroupFailoverStatusCodes ::
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
newAwsCloudFrontDistributionOriginGroupFailoverStatusCodes :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
newAwsCloudFrontDistributionOriginGroupFailoverStatusCodes =
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: Maybe Int
-> Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes'
{ $sel:quantity:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: Maybe Int
quantity =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:items:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: Maybe [Int]
items =
Maybe [Int]
forall a. Maybe a
Prelude.Nothing
}
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_quantity :: Lens.Lens' AwsCloudFrontDistributionOriginGroupFailoverStatusCodes (Prelude.Maybe Prelude.Int)
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_quantity :: (Maybe Int -> f (Maybe Int))
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> f AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_quantity = (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe Int)
-> (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe Int
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Lens
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' {Maybe Int
quantity :: Maybe Int
$sel:quantity:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe Int
quantity} -> Maybe Int
quantity) (\s :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
s@AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' {} Maybe Int
a -> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
s {$sel:quantity:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: Maybe Int
quantity = Maybe Int
a} :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_items :: Lens.Lens' AwsCloudFrontDistributionOriginGroupFailoverStatusCodes (Prelude.Maybe [Prelude.Int])
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_items :: (Maybe [Int] -> f (Maybe [Int]))
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> f AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
awsCloudFrontDistributionOriginGroupFailoverStatusCodes_items = (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe [Int])
-> (AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Lens
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
(Maybe [Int])
(Maybe [Int])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' {Maybe [Int]
items :: Maybe [Int]
$sel:items:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe [Int]
items} -> Maybe [Int]
items) (\s :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
s@AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' {} Maybe [Int]
a -> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
s {$sel:items:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: Maybe [Int]
items = Maybe [Int]
a} :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes) ((Maybe [Int] -> f (Maybe [Int]))
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> f AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> ((Maybe [Int] -> f (Maybe [Int]))
-> Maybe [Int] -> f (Maybe [Int]))
-> (Maybe [Int] -> f (Maybe [Int]))
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> f AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Int] [Int] [Int] [Int]
-> Iso (Maybe [Int]) (Maybe [Int]) (Maybe [Int]) (Maybe [Int])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Int] [Int] [Int] [Int]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
where
parseJSON :: Value
-> Parser AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
parseJSON =
String
-> (Object
-> Parser AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Value
-> Parser AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsCloudFrontDistributionOriginGroupFailoverStatusCodes"
( \Object
x ->
Maybe Int
-> Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes'
(Maybe Int
-> Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Parser (Maybe Int)
-> Parser
(Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Quantity")
Parser
(Maybe [Int]
-> AwsCloudFrontDistributionOriginGroupFailoverStatusCodes)
-> Parser (Maybe [Int])
-> Parser AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Int]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Items" Parser (Maybe (Maybe [Int])) -> Maybe [Int] -> Parser (Maybe [Int])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Int]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
instance
Prelude.NFData
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
instance
Core.ToJSON
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
where
toJSON :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes -> Value
toJSON
AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' {Maybe Int
Maybe [Int]
items :: Maybe [Int]
quantity :: Maybe Int
$sel:items:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe [Int]
$sel:quantity:AwsCloudFrontDistributionOriginGroupFailoverStatusCodes' :: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes
-> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Quantity" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
quantity,
(Text
"Items" Text -> [Int] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Int] -> Pair) -> Maybe [Int] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Int]
items
]
)