{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudFront.ListFieldLevelEncryptionConfigs
(
ListFieldLevelEncryptionConfigs (..),
newListFieldLevelEncryptionConfigs,
listFieldLevelEncryptionConfigs_marker,
listFieldLevelEncryptionConfigs_maxItems,
ListFieldLevelEncryptionConfigsResponse (..),
newListFieldLevelEncryptionConfigsResponse,
listFieldLevelEncryptionConfigsResponse_fieldLevelEncryptionList,
listFieldLevelEncryptionConfigsResponse_httpStatus,
)
where
import Amazonka.CloudFront.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListFieldLevelEncryptionConfigs = ListFieldLevelEncryptionConfigs'
{
ListFieldLevelEncryptionConfigs -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListFieldLevelEncryptionConfigs -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text
}
deriving (ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool
(ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool)
-> (ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool)
-> Eq ListFieldLevelEncryptionConfigs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool
$c/= :: ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool
== :: ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool
$c== :: ListFieldLevelEncryptionConfigs
-> ListFieldLevelEncryptionConfigs -> Bool
Prelude.Eq, ReadPrec [ListFieldLevelEncryptionConfigs]
ReadPrec ListFieldLevelEncryptionConfigs
Int -> ReadS ListFieldLevelEncryptionConfigs
ReadS [ListFieldLevelEncryptionConfigs]
(Int -> ReadS ListFieldLevelEncryptionConfigs)
-> ReadS [ListFieldLevelEncryptionConfigs]
-> ReadPrec ListFieldLevelEncryptionConfigs
-> ReadPrec [ListFieldLevelEncryptionConfigs]
-> Read ListFieldLevelEncryptionConfigs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFieldLevelEncryptionConfigs]
$creadListPrec :: ReadPrec [ListFieldLevelEncryptionConfigs]
readPrec :: ReadPrec ListFieldLevelEncryptionConfigs
$creadPrec :: ReadPrec ListFieldLevelEncryptionConfigs
readList :: ReadS [ListFieldLevelEncryptionConfigs]
$creadList :: ReadS [ListFieldLevelEncryptionConfigs]
readsPrec :: Int -> ReadS ListFieldLevelEncryptionConfigs
$creadsPrec :: Int -> ReadS ListFieldLevelEncryptionConfigs
Prelude.Read, Int -> ListFieldLevelEncryptionConfigs -> ShowS
[ListFieldLevelEncryptionConfigs] -> ShowS
ListFieldLevelEncryptionConfigs -> String
(Int -> ListFieldLevelEncryptionConfigs -> ShowS)
-> (ListFieldLevelEncryptionConfigs -> String)
-> ([ListFieldLevelEncryptionConfigs] -> ShowS)
-> Show ListFieldLevelEncryptionConfigs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFieldLevelEncryptionConfigs] -> ShowS
$cshowList :: [ListFieldLevelEncryptionConfigs] -> ShowS
show :: ListFieldLevelEncryptionConfigs -> String
$cshow :: ListFieldLevelEncryptionConfigs -> String
showsPrec :: Int -> ListFieldLevelEncryptionConfigs -> ShowS
$cshowsPrec :: Int -> ListFieldLevelEncryptionConfigs -> ShowS
Prelude.Show, (forall x.
ListFieldLevelEncryptionConfigs
-> Rep ListFieldLevelEncryptionConfigs x)
-> (forall x.
Rep ListFieldLevelEncryptionConfigs x
-> ListFieldLevelEncryptionConfigs)
-> Generic ListFieldLevelEncryptionConfigs
forall x.
Rep ListFieldLevelEncryptionConfigs x
-> ListFieldLevelEncryptionConfigs
forall x.
ListFieldLevelEncryptionConfigs
-> Rep ListFieldLevelEncryptionConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFieldLevelEncryptionConfigs x
-> ListFieldLevelEncryptionConfigs
$cfrom :: forall x.
ListFieldLevelEncryptionConfigs
-> Rep ListFieldLevelEncryptionConfigs x
Prelude.Generic)
newListFieldLevelEncryptionConfigs ::
ListFieldLevelEncryptionConfigs
newListFieldLevelEncryptionConfigs :: ListFieldLevelEncryptionConfigs
newListFieldLevelEncryptionConfigs =
ListFieldLevelEncryptionConfigs' :: Maybe Text -> Maybe Text -> ListFieldLevelEncryptionConfigs
ListFieldLevelEncryptionConfigs'
{ $sel:marker:ListFieldLevelEncryptionConfigs' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListFieldLevelEncryptionConfigs' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
listFieldLevelEncryptionConfigs_marker :: Lens.Lens' ListFieldLevelEncryptionConfigs (Prelude.Maybe Prelude.Text)
listFieldLevelEncryptionConfigs_marker :: (Maybe Text -> f (Maybe Text))
-> ListFieldLevelEncryptionConfigs
-> f ListFieldLevelEncryptionConfigs
listFieldLevelEncryptionConfigs_marker = (ListFieldLevelEncryptionConfigs -> Maybe Text)
-> (ListFieldLevelEncryptionConfigs
-> Maybe Text -> ListFieldLevelEncryptionConfigs)
-> Lens
ListFieldLevelEncryptionConfigs
ListFieldLevelEncryptionConfigs
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionConfigs' {Maybe Text
marker :: Maybe Text
$sel:marker:ListFieldLevelEncryptionConfigs' :: ListFieldLevelEncryptionConfigs -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListFieldLevelEncryptionConfigs
s@ListFieldLevelEncryptionConfigs' {} Maybe Text
a -> ListFieldLevelEncryptionConfigs
s {$sel:marker:ListFieldLevelEncryptionConfigs' :: Maybe Text
marker = Maybe Text
a} :: ListFieldLevelEncryptionConfigs)
listFieldLevelEncryptionConfigs_maxItems :: Lens.Lens' ListFieldLevelEncryptionConfigs (Prelude.Maybe Prelude.Text)
listFieldLevelEncryptionConfigs_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListFieldLevelEncryptionConfigs
-> f ListFieldLevelEncryptionConfigs
listFieldLevelEncryptionConfigs_maxItems = (ListFieldLevelEncryptionConfigs -> Maybe Text)
-> (ListFieldLevelEncryptionConfigs
-> Maybe Text -> ListFieldLevelEncryptionConfigs)
-> Lens
ListFieldLevelEncryptionConfigs
ListFieldLevelEncryptionConfigs
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionConfigs' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListFieldLevelEncryptionConfigs' :: ListFieldLevelEncryptionConfigs -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListFieldLevelEncryptionConfigs
s@ListFieldLevelEncryptionConfigs' {} Maybe Text
a -> ListFieldLevelEncryptionConfigs
s {$sel:maxItems:ListFieldLevelEncryptionConfigs' :: Maybe Text
maxItems = Maybe Text
a} :: ListFieldLevelEncryptionConfigs)
instance
Core.AWSRequest
ListFieldLevelEncryptionConfigs
where
type
AWSResponse ListFieldLevelEncryptionConfigs =
ListFieldLevelEncryptionConfigsResponse
request :: ListFieldLevelEncryptionConfigs
-> Request ListFieldLevelEncryptionConfigs
request = Service
-> ListFieldLevelEncryptionConfigs
-> Request ListFieldLevelEncryptionConfigs
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListFieldLevelEncryptionConfigs
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListFieldLevelEncryptionConfigs)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListFieldLevelEncryptionConfigs))
-> Logger
-> Service
-> Proxy ListFieldLevelEncryptionConfigs
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListFieldLevelEncryptionConfigs)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe FieldLevelEncryptionList
-> Int -> ListFieldLevelEncryptionConfigsResponse
ListFieldLevelEncryptionConfigsResponse'
(Maybe FieldLevelEncryptionList
-> Int -> ListFieldLevelEncryptionConfigsResponse)
-> Either String (Maybe FieldLevelEncryptionList)
-> Either String (Int -> ListFieldLevelEncryptionConfigsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe FieldLevelEncryptionList)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
Either String (Int -> ListFieldLevelEncryptionConfigsResponse)
-> Either String Int
-> Either String ListFieldLevelEncryptionConfigsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
ListFieldLevelEncryptionConfigs
instance
Prelude.NFData
ListFieldLevelEncryptionConfigs
instance
Core.ToHeaders
ListFieldLevelEncryptionConfigs
where
toHeaders :: ListFieldLevelEncryptionConfigs -> ResponseHeaders
toHeaders = ResponseHeaders
-> ListFieldLevelEncryptionConfigs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListFieldLevelEncryptionConfigs where
toPath :: ListFieldLevelEncryptionConfigs -> ByteString
toPath =
ByteString -> ListFieldLevelEncryptionConfigs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/field-level-encryption"
instance Core.ToQuery ListFieldLevelEncryptionConfigs where
toQuery :: ListFieldLevelEncryptionConfigs -> QueryString
toQuery ListFieldLevelEncryptionConfigs' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListFieldLevelEncryptionConfigs' :: ListFieldLevelEncryptionConfigs -> Maybe Text
$sel:marker:ListFieldLevelEncryptionConfigs' :: ListFieldLevelEncryptionConfigs -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxItems" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxItems
]
data ListFieldLevelEncryptionConfigsResponse = ListFieldLevelEncryptionConfigsResponse'
{
ListFieldLevelEncryptionConfigsResponse
-> Maybe FieldLevelEncryptionList
fieldLevelEncryptionList :: Prelude.Maybe FieldLevelEncryptionList,
ListFieldLevelEncryptionConfigsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool
(ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool)
-> (ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool)
-> Eq ListFieldLevelEncryptionConfigsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool
$c/= :: ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool
== :: ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool
$c== :: ListFieldLevelEncryptionConfigsResponse
-> ListFieldLevelEncryptionConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListFieldLevelEncryptionConfigsResponse]
ReadPrec ListFieldLevelEncryptionConfigsResponse
Int -> ReadS ListFieldLevelEncryptionConfigsResponse
ReadS [ListFieldLevelEncryptionConfigsResponse]
(Int -> ReadS ListFieldLevelEncryptionConfigsResponse)
-> ReadS [ListFieldLevelEncryptionConfigsResponse]
-> ReadPrec ListFieldLevelEncryptionConfigsResponse
-> ReadPrec [ListFieldLevelEncryptionConfigsResponse]
-> Read ListFieldLevelEncryptionConfigsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFieldLevelEncryptionConfigsResponse]
$creadListPrec :: ReadPrec [ListFieldLevelEncryptionConfigsResponse]
readPrec :: ReadPrec ListFieldLevelEncryptionConfigsResponse
$creadPrec :: ReadPrec ListFieldLevelEncryptionConfigsResponse
readList :: ReadS [ListFieldLevelEncryptionConfigsResponse]
$creadList :: ReadS [ListFieldLevelEncryptionConfigsResponse]
readsPrec :: Int -> ReadS ListFieldLevelEncryptionConfigsResponse
$creadsPrec :: Int -> ReadS ListFieldLevelEncryptionConfigsResponse
Prelude.Read, Int -> ListFieldLevelEncryptionConfigsResponse -> ShowS
[ListFieldLevelEncryptionConfigsResponse] -> ShowS
ListFieldLevelEncryptionConfigsResponse -> String
(Int -> ListFieldLevelEncryptionConfigsResponse -> ShowS)
-> (ListFieldLevelEncryptionConfigsResponse -> String)
-> ([ListFieldLevelEncryptionConfigsResponse] -> ShowS)
-> Show ListFieldLevelEncryptionConfigsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFieldLevelEncryptionConfigsResponse] -> ShowS
$cshowList :: [ListFieldLevelEncryptionConfigsResponse] -> ShowS
show :: ListFieldLevelEncryptionConfigsResponse -> String
$cshow :: ListFieldLevelEncryptionConfigsResponse -> String
showsPrec :: Int -> ListFieldLevelEncryptionConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListFieldLevelEncryptionConfigsResponse -> ShowS
Prelude.Show, (forall x.
ListFieldLevelEncryptionConfigsResponse
-> Rep ListFieldLevelEncryptionConfigsResponse x)
-> (forall x.
Rep ListFieldLevelEncryptionConfigsResponse x
-> ListFieldLevelEncryptionConfigsResponse)
-> Generic ListFieldLevelEncryptionConfigsResponse
forall x.
Rep ListFieldLevelEncryptionConfigsResponse x
-> ListFieldLevelEncryptionConfigsResponse
forall x.
ListFieldLevelEncryptionConfigsResponse
-> Rep ListFieldLevelEncryptionConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFieldLevelEncryptionConfigsResponse x
-> ListFieldLevelEncryptionConfigsResponse
$cfrom :: forall x.
ListFieldLevelEncryptionConfigsResponse
-> Rep ListFieldLevelEncryptionConfigsResponse x
Prelude.Generic)
newListFieldLevelEncryptionConfigsResponse ::
Prelude.Int ->
ListFieldLevelEncryptionConfigsResponse
newListFieldLevelEncryptionConfigsResponse :: Int -> ListFieldLevelEncryptionConfigsResponse
newListFieldLevelEncryptionConfigsResponse
Int
pHttpStatus_ =
ListFieldLevelEncryptionConfigsResponse' :: Maybe FieldLevelEncryptionList
-> Int -> ListFieldLevelEncryptionConfigsResponse
ListFieldLevelEncryptionConfigsResponse'
{ $sel:fieldLevelEncryptionList:ListFieldLevelEncryptionConfigsResponse' :: Maybe FieldLevelEncryptionList
fieldLevelEncryptionList =
Maybe FieldLevelEncryptionList
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListFieldLevelEncryptionConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listFieldLevelEncryptionConfigsResponse_fieldLevelEncryptionList :: Lens.Lens' ListFieldLevelEncryptionConfigsResponse (Prelude.Maybe FieldLevelEncryptionList)
listFieldLevelEncryptionConfigsResponse_fieldLevelEncryptionList :: (Maybe FieldLevelEncryptionList
-> f (Maybe FieldLevelEncryptionList))
-> ListFieldLevelEncryptionConfigsResponse
-> f ListFieldLevelEncryptionConfigsResponse
listFieldLevelEncryptionConfigsResponse_fieldLevelEncryptionList = (ListFieldLevelEncryptionConfigsResponse
-> Maybe FieldLevelEncryptionList)
-> (ListFieldLevelEncryptionConfigsResponse
-> Maybe FieldLevelEncryptionList
-> ListFieldLevelEncryptionConfigsResponse)
-> Lens
ListFieldLevelEncryptionConfigsResponse
ListFieldLevelEncryptionConfigsResponse
(Maybe FieldLevelEncryptionList)
(Maybe FieldLevelEncryptionList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionConfigsResponse' {Maybe FieldLevelEncryptionList
fieldLevelEncryptionList :: Maybe FieldLevelEncryptionList
$sel:fieldLevelEncryptionList:ListFieldLevelEncryptionConfigsResponse' :: ListFieldLevelEncryptionConfigsResponse
-> Maybe FieldLevelEncryptionList
fieldLevelEncryptionList} -> Maybe FieldLevelEncryptionList
fieldLevelEncryptionList) (\s :: ListFieldLevelEncryptionConfigsResponse
s@ListFieldLevelEncryptionConfigsResponse' {} Maybe FieldLevelEncryptionList
a -> ListFieldLevelEncryptionConfigsResponse
s {$sel:fieldLevelEncryptionList:ListFieldLevelEncryptionConfigsResponse' :: Maybe FieldLevelEncryptionList
fieldLevelEncryptionList = Maybe FieldLevelEncryptionList
a} :: ListFieldLevelEncryptionConfigsResponse)
listFieldLevelEncryptionConfigsResponse_httpStatus :: Lens.Lens' ListFieldLevelEncryptionConfigsResponse Prelude.Int
listFieldLevelEncryptionConfigsResponse_httpStatus :: (Int -> f Int)
-> ListFieldLevelEncryptionConfigsResponse
-> f ListFieldLevelEncryptionConfigsResponse
listFieldLevelEncryptionConfigsResponse_httpStatus = (ListFieldLevelEncryptionConfigsResponse -> Int)
-> (ListFieldLevelEncryptionConfigsResponse
-> Int -> ListFieldLevelEncryptionConfigsResponse)
-> Lens
ListFieldLevelEncryptionConfigsResponse
ListFieldLevelEncryptionConfigsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionConfigsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListFieldLevelEncryptionConfigsResponse' :: ListFieldLevelEncryptionConfigsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListFieldLevelEncryptionConfigsResponse
s@ListFieldLevelEncryptionConfigsResponse' {} Int
a -> ListFieldLevelEncryptionConfigsResponse
s {$sel:httpStatus:ListFieldLevelEncryptionConfigsResponse' :: Int
httpStatus = Int
a} :: ListFieldLevelEncryptionConfigsResponse)
instance
Prelude.NFData
ListFieldLevelEncryptionConfigsResponse