{-# 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.FieldLevelEncryptionProfileList where
import Amazonka.CloudFront.Types.FieldLevelEncryptionProfileSummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FieldLevelEncryptionProfileList = FieldLevelEncryptionProfileList'
{
FieldLevelEncryptionProfileList
-> Maybe [FieldLevelEncryptionProfileSummary]
items :: Prelude.Maybe [FieldLevelEncryptionProfileSummary],
FieldLevelEncryptionProfileList -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
FieldLevelEncryptionProfileList -> Int
maxItems :: Prelude.Int,
FieldLevelEncryptionProfileList -> Int
quantity :: Prelude.Int
}
deriving (FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool
(FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool)
-> (FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool)
-> Eq FieldLevelEncryptionProfileList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool
$c/= :: FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool
== :: FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool
$c== :: FieldLevelEncryptionProfileList
-> FieldLevelEncryptionProfileList -> Bool
Prelude.Eq, ReadPrec [FieldLevelEncryptionProfileList]
ReadPrec FieldLevelEncryptionProfileList
Int -> ReadS FieldLevelEncryptionProfileList
ReadS [FieldLevelEncryptionProfileList]
(Int -> ReadS FieldLevelEncryptionProfileList)
-> ReadS [FieldLevelEncryptionProfileList]
-> ReadPrec FieldLevelEncryptionProfileList
-> ReadPrec [FieldLevelEncryptionProfileList]
-> Read FieldLevelEncryptionProfileList
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FieldLevelEncryptionProfileList]
$creadListPrec :: ReadPrec [FieldLevelEncryptionProfileList]
readPrec :: ReadPrec FieldLevelEncryptionProfileList
$creadPrec :: ReadPrec FieldLevelEncryptionProfileList
readList :: ReadS [FieldLevelEncryptionProfileList]
$creadList :: ReadS [FieldLevelEncryptionProfileList]
readsPrec :: Int -> ReadS FieldLevelEncryptionProfileList
$creadsPrec :: Int -> ReadS FieldLevelEncryptionProfileList
Prelude.Read, Int -> FieldLevelEncryptionProfileList -> ShowS
[FieldLevelEncryptionProfileList] -> ShowS
FieldLevelEncryptionProfileList -> String
(Int -> FieldLevelEncryptionProfileList -> ShowS)
-> (FieldLevelEncryptionProfileList -> String)
-> ([FieldLevelEncryptionProfileList] -> ShowS)
-> Show FieldLevelEncryptionProfileList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldLevelEncryptionProfileList] -> ShowS
$cshowList :: [FieldLevelEncryptionProfileList] -> ShowS
show :: FieldLevelEncryptionProfileList -> String
$cshow :: FieldLevelEncryptionProfileList -> String
showsPrec :: Int -> FieldLevelEncryptionProfileList -> ShowS
$cshowsPrec :: Int -> FieldLevelEncryptionProfileList -> ShowS
Prelude.Show, (forall x.
FieldLevelEncryptionProfileList
-> Rep FieldLevelEncryptionProfileList x)
-> (forall x.
Rep FieldLevelEncryptionProfileList x
-> FieldLevelEncryptionProfileList)
-> Generic FieldLevelEncryptionProfileList
forall x.
Rep FieldLevelEncryptionProfileList x
-> FieldLevelEncryptionProfileList
forall x.
FieldLevelEncryptionProfileList
-> Rep FieldLevelEncryptionProfileList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FieldLevelEncryptionProfileList x
-> FieldLevelEncryptionProfileList
$cfrom :: forall x.
FieldLevelEncryptionProfileList
-> Rep FieldLevelEncryptionProfileList x
Prelude.Generic)
newFieldLevelEncryptionProfileList ::
Prelude.Int ->
Prelude.Int ->
FieldLevelEncryptionProfileList
newFieldLevelEncryptionProfileList :: Int -> Int -> FieldLevelEncryptionProfileList
newFieldLevelEncryptionProfileList
Int
pMaxItems_
Int
pQuantity_ =
FieldLevelEncryptionProfileList' :: Maybe [FieldLevelEncryptionProfileSummary]
-> Maybe Text -> Int -> Int -> FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList'
{ $sel:items:FieldLevelEncryptionProfileList' :: Maybe [FieldLevelEncryptionProfileSummary]
items =
Maybe [FieldLevelEncryptionProfileSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:FieldLevelEncryptionProfileList' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:FieldLevelEncryptionProfileList' :: Int
maxItems = Int
pMaxItems_,
$sel:quantity:FieldLevelEncryptionProfileList' :: Int
quantity = Int
pQuantity_
}
fieldLevelEncryptionProfileList_items :: Lens.Lens' FieldLevelEncryptionProfileList (Prelude.Maybe [FieldLevelEncryptionProfileSummary])
fieldLevelEncryptionProfileList_items :: (Maybe [FieldLevelEncryptionProfileSummary]
-> f (Maybe [FieldLevelEncryptionProfileSummary]))
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList_items = (FieldLevelEncryptionProfileList
-> Maybe [FieldLevelEncryptionProfileSummary])
-> (FieldLevelEncryptionProfileList
-> Maybe [FieldLevelEncryptionProfileSummary]
-> FieldLevelEncryptionProfileList)
-> Lens
FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList
(Maybe [FieldLevelEncryptionProfileSummary])
(Maybe [FieldLevelEncryptionProfileSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileList' {Maybe [FieldLevelEncryptionProfileSummary]
items :: Maybe [FieldLevelEncryptionProfileSummary]
$sel:items:FieldLevelEncryptionProfileList' :: FieldLevelEncryptionProfileList
-> Maybe [FieldLevelEncryptionProfileSummary]
items} -> Maybe [FieldLevelEncryptionProfileSummary]
items) (\s :: FieldLevelEncryptionProfileList
s@FieldLevelEncryptionProfileList' {} Maybe [FieldLevelEncryptionProfileSummary]
a -> FieldLevelEncryptionProfileList
s {$sel:items:FieldLevelEncryptionProfileList' :: Maybe [FieldLevelEncryptionProfileSummary]
items = Maybe [FieldLevelEncryptionProfileSummary]
a} :: FieldLevelEncryptionProfileList) ((Maybe [FieldLevelEncryptionProfileSummary]
-> f (Maybe [FieldLevelEncryptionProfileSummary]))
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList)
-> ((Maybe [FieldLevelEncryptionProfileSummary]
-> f (Maybe [FieldLevelEncryptionProfileSummary]))
-> Maybe [FieldLevelEncryptionProfileSummary]
-> f (Maybe [FieldLevelEncryptionProfileSummary]))
-> (Maybe [FieldLevelEncryptionProfileSummary]
-> f (Maybe [FieldLevelEncryptionProfileSummary]))
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
-> Iso
(Maybe [FieldLevelEncryptionProfileSummary])
(Maybe [FieldLevelEncryptionProfileSummary])
(Maybe [FieldLevelEncryptionProfileSummary])
(Maybe [FieldLevelEncryptionProfileSummary])
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
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
[FieldLevelEncryptionProfileSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
fieldLevelEncryptionProfileList_nextMarker :: Lens.Lens' FieldLevelEncryptionProfileList (Prelude.Maybe Prelude.Text)
fieldLevelEncryptionProfileList_nextMarker :: (Maybe Text -> f (Maybe Text))
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList_nextMarker = (FieldLevelEncryptionProfileList -> Maybe Text)
-> (FieldLevelEncryptionProfileList
-> Maybe Text -> FieldLevelEncryptionProfileList)
-> Lens
FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileList' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:FieldLevelEncryptionProfileList' :: FieldLevelEncryptionProfileList -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: FieldLevelEncryptionProfileList
s@FieldLevelEncryptionProfileList' {} Maybe Text
a -> FieldLevelEncryptionProfileList
s {$sel:nextMarker:FieldLevelEncryptionProfileList' :: Maybe Text
nextMarker = Maybe Text
a} :: FieldLevelEncryptionProfileList)
fieldLevelEncryptionProfileList_maxItems :: Lens.Lens' FieldLevelEncryptionProfileList Prelude.Int
fieldLevelEncryptionProfileList_maxItems :: (Int -> f Int)
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList_maxItems = (FieldLevelEncryptionProfileList -> Int)
-> (FieldLevelEncryptionProfileList
-> Int -> FieldLevelEncryptionProfileList)
-> Lens
FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileList' {Int
maxItems :: Int
$sel:maxItems:FieldLevelEncryptionProfileList' :: FieldLevelEncryptionProfileList -> Int
maxItems} -> Int
maxItems) (\s :: FieldLevelEncryptionProfileList
s@FieldLevelEncryptionProfileList' {} Int
a -> FieldLevelEncryptionProfileList
s {$sel:maxItems:FieldLevelEncryptionProfileList' :: Int
maxItems = Int
a} :: FieldLevelEncryptionProfileList)
fieldLevelEncryptionProfileList_quantity :: Lens.Lens' FieldLevelEncryptionProfileList Prelude.Int
fieldLevelEncryptionProfileList_quantity :: (Int -> f Int)
-> FieldLevelEncryptionProfileList
-> f FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList_quantity = (FieldLevelEncryptionProfileList -> Int)
-> (FieldLevelEncryptionProfileList
-> Int -> FieldLevelEncryptionProfileList)
-> Lens
FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileList' {Int
quantity :: Int
$sel:quantity:FieldLevelEncryptionProfileList' :: FieldLevelEncryptionProfileList -> Int
quantity} -> Int
quantity) (\s :: FieldLevelEncryptionProfileList
s@FieldLevelEncryptionProfileList' {} Int
a -> FieldLevelEncryptionProfileList
s {$sel:quantity:FieldLevelEncryptionProfileList' :: Int
quantity = Int
a} :: FieldLevelEncryptionProfileList)
instance Core.FromXML FieldLevelEncryptionProfileList where
parseXML :: [Node] -> Either String FieldLevelEncryptionProfileList
parseXML [Node]
x =
Maybe [FieldLevelEncryptionProfileSummary]
-> Maybe Text -> Int -> Int -> FieldLevelEncryptionProfileList
FieldLevelEncryptionProfileList'
(Maybe [FieldLevelEncryptionProfileSummary]
-> Maybe Text -> Int -> Int -> FieldLevelEncryptionProfileList)
-> Either String (Maybe [FieldLevelEncryptionProfileSummary])
-> Either
String
(Maybe Text -> Int -> Int -> FieldLevelEncryptionProfileList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Items" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node]
-> Either String (Maybe [FieldLevelEncryptionProfileSummary]))
-> Either String (Maybe [FieldLevelEncryptionProfileSummary])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [FieldLevelEncryptionProfileSummary])
-> [Node]
-> Either String (Maybe [FieldLevelEncryptionProfileSummary])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
( Text
-> [Node] -> Either String [FieldLevelEncryptionProfileSummary]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList
Text
"FieldLevelEncryptionProfileSummary"
)
)
Either
String
(Maybe Text -> Int -> Int -> FieldLevelEncryptionProfileList)
-> Either String (Maybe Text)
-> Either String (Int -> Int -> FieldLevelEncryptionProfileList)
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
"NextMarker")
Either String (Int -> Int -> FieldLevelEncryptionProfileList)
-> Either String Int
-> Either String (Int -> FieldLevelEncryptionProfileList)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Int
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MaxItems")
Either String (Int -> FieldLevelEncryptionProfileList)
-> Either String Int
-> Either String FieldLevelEncryptionProfileList
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Int
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Quantity")
instance
Prelude.Hashable
FieldLevelEncryptionProfileList
instance
Prelude.NFData
FieldLevelEncryptionProfileList