{-# 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.ListFieldLevelEncryptionProfiles
(
ListFieldLevelEncryptionProfiles (..),
newListFieldLevelEncryptionProfiles,
listFieldLevelEncryptionProfiles_marker,
listFieldLevelEncryptionProfiles_maxItems,
ListFieldLevelEncryptionProfilesResponse (..),
newListFieldLevelEncryptionProfilesResponse,
listFieldLevelEncryptionProfilesResponse_fieldLevelEncryptionProfileList,
listFieldLevelEncryptionProfilesResponse_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 ListFieldLevelEncryptionProfiles = ListFieldLevelEncryptionProfiles'
{
ListFieldLevelEncryptionProfiles -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListFieldLevelEncryptionProfiles -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text
}
deriving (ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool
(ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool)
-> (ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool)
-> Eq ListFieldLevelEncryptionProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool
$c/= :: ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool
== :: ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool
$c== :: ListFieldLevelEncryptionProfiles
-> ListFieldLevelEncryptionProfiles -> Bool
Prelude.Eq, ReadPrec [ListFieldLevelEncryptionProfiles]
ReadPrec ListFieldLevelEncryptionProfiles
Int -> ReadS ListFieldLevelEncryptionProfiles
ReadS [ListFieldLevelEncryptionProfiles]
(Int -> ReadS ListFieldLevelEncryptionProfiles)
-> ReadS [ListFieldLevelEncryptionProfiles]
-> ReadPrec ListFieldLevelEncryptionProfiles
-> ReadPrec [ListFieldLevelEncryptionProfiles]
-> Read ListFieldLevelEncryptionProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFieldLevelEncryptionProfiles]
$creadListPrec :: ReadPrec [ListFieldLevelEncryptionProfiles]
readPrec :: ReadPrec ListFieldLevelEncryptionProfiles
$creadPrec :: ReadPrec ListFieldLevelEncryptionProfiles
readList :: ReadS [ListFieldLevelEncryptionProfiles]
$creadList :: ReadS [ListFieldLevelEncryptionProfiles]
readsPrec :: Int -> ReadS ListFieldLevelEncryptionProfiles
$creadsPrec :: Int -> ReadS ListFieldLevelEncryptionProfiles
Prelude.Read, Int -> ListFieldLevelEncryptionProfiles -> ShowS
[ListFieldLevelEncryptionProfiles] -> ShowS
ListFieldLevelEncryptionProfiles -> String
(Int -> ListFieldLevelEncryptionProfiles -> ShowS)
-> (ListFieldLevelEncryptionProfiles -> String)
-> ([ListFieldLevelEncryptionProfiles] -> ShowS)
-> Show ListFieldLevelEncryptionProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFieldLevelEncryptionProfiles] -> ShowS
$cshowList :: [ListFieldLevelEncryptionProfiles] -> ShowS
show :: ListFieldLevelEncryptionProfiles -> String
$cshow :: ListFieldLevelEncryptionProfiles -> String
showsPrec :: Int -> ListFieldLevelEncryptionProfiles -> ShowS
$cshowsPrec :: Int -> ListFieldLevelEncryptionProfiles -> ShowS
Prelude.Show, (forall x.
ListFieldLevelEncryptionProfiles
-> Rep ListFieldLevelEncryptionProfiles x)
-> (forall x.
Rep ListFieldLevelEncryptionProfiles x
-> ListFieldLevelEncryptionProfiles)
-> Generic ListFieldLevelEncryptionProfiles
forall x.
Rep ListFieldLevelEncryptionProfiles x
-> ListFieldLevelEncryptionProfiles
forall x.
ListFieldLevelEncryptionProfiles
-> Rep ListFieldLevelEncryptionProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFieldLevelEncryptionProfiles x
-> ListFieldLevelEncryptionProfiles
$cfrom :: forall x.
ListFieldLevelEncryptionProfiles
-> Rep ListFieldLevelEncryptionProfiles x
Prelude.Generic)
newListFieldLevelEncryptionProfiles ::
ListFieldLevelEncryptionProfiles
newListFieldLevelEncryptionProfiles :: ListFieldLevelEncryptionProfiles
newListFieldLevelEncryptionProfiles =
ListFieldLevelEncryptionProfiles' :: Maybe Text -> Maybe Text -> ListFieldLevelEncryptionProfiles
ListFieldLevelEncryptionProfiles'
{ $sel:marker:ListFieldLevelEncryptionProfiles' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListFieldLevelEncryptionProfiles' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
listFieldLevelEncryptionProfiles_marker :: Lens.Lens' ListFieldLevelEncryptionProfiles (Prelude.Maybe Prelude.Text)
listFieldLevelEncryptionProfiles_marker :: (Maybe Text -> f (Maybe Text))
-> ListFieldLevelEncryptionProfiles
-> f ListFieldLevelEncryptionProfiles
listFieldLevelEncryptionProfiles_marker = (ListFieldLevelEncryptionProfiles -> Maybe Text)
-> (ListFieldLevelEncryptionProfiles
-> Maybe Text -> ListFieldLevelEncryptionProfiles)
-> Lens
ListFieldLevelEncryptionProfiles
ListFieldLevelEncryptionProfiles
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionProfiles' {Maybe Text
marker :: Maybe Text
$sel:marker:ListFieldLevelEncryptionProfiles' :: ListFieldLevelEncryptionProfiles -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListFieldLevelEncryptionProfiles
s@ListFieldLevelEncryptionProfiles' {} Maybe Text
a -> ListFieldLevelEncryptionProfiles
s {$sel:marker:ListFieldLevelEncryptionProfiles' :: Maybe Text
marker = Maybe Text
a} :: ListFieldLevelEncryptionProfiles)
listFieldLevelEncryptionProfiles_maxItems :: Lens.Lens' ListFieldLevelEncryptionProfiles (Prelude.Maybe Prelude.Text)
listFieldLevelEncryptionProfiles_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListFieldLevelEncryptionProfiles
-> f ListFieldLevelEncryptionProfiles
listFieldLevelEncryptionProfiles_maxItems = (ListFieldLevelEncryptionProfiles -> Maybe Text)
-> (ListFieldLevelEncryptionProfiles
-> Maybe Text -> ListFieldLevelEncryptionProfiles)
-> Lens
ListFieldLevelEncryptionProfiles
ListFieldLevelEncryptionProfiles
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionProfiles' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListFieldLevelEncryptionProfiles' :: ListFieldLevelEncryptionProfiles -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListFieldLevelEncryptionProfiles
s@ListFieldLevelEncryptionProfiles' {} Maybe Text
a -> ListFieldLevelEncryptionProfiles
s {$sel:maxItems:ListFieldLevelEncryptionProfiles' :: Maybe Text
maxItems = Maybe Text
a} :: ListFieldLevelEncryptionProfiles)
instance
Core.AWSRequest
ListFieldLevelEncryptionProfiles
where
type
AWSResponse ListFieldLevelEncryptionProfiles =
ListFieldLevelEncryptionProfilesResponse
request :: ListFieldLevelEncryptionProfiles
-> Request ListFieldLevelEncryptionProfiles
request = Service
-> ListFieldLevelEncryptionProfiles
-> Request ListFieldLevelEncryptionProfiles
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListFieldLevelEncryptionProfiles
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListFieldLevelEncryptionProfiles)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListFieldLevelEncryptionProfiles))
-> Logger
-> Service
-> Proxy ListFieldLevelEncryptionProfiles
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListFieldLevelEncryptionProfiles)))
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 FieldLevelEncryptionProfileList
-> Int -> ListFieldLevelEncryptionProfilesResponse
ListFieldLevelEncryptionProfilesResponse'
(Maybe FieldLevelEncryptionProfileList
-> Int -> ListFieldLevelEncryptionProfilesResponse)
-> Either String (Maybe FieldLevelEncryptionProfileList)
-> Either String (Int -> ListFieldLevelEncryptionProfilesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe FieldLevelEncryptionProfileList)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
Either String (Int -> ListFieldLevelEncryptionProfilesResponse)
-> Either String Int
-> Either String ListFieldLevelEncryptionProfilesResponse
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
ListFieldLevelEncryptionProfiles
instance
Prelude.NFData
ListFieldLevelEncryptionProfiles
instance
Core.ToHeaders
ListFieldLevelEncryptionProfiles
where
toHeaders :: ListFieldLevelEncryptionProfiles -> ResponseHeaders
toHeaders = ResponseHeaders
-> ListFieldLevelEncryptionProfiles -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListFieldLevelEncryptionProfiles where
toPath :: ListFieldLevelEncryptionProfiles -> ByteString
toPath =
ByteString -> ListFieldLevelEncryptionProfiles -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/2020-05-31/field-level-encryption-profile"
instance
Core.ToQuery
ListFieldLevelEncryptionProfiles
where
toQuery :: ListFieldLevelEncryptionProfiles -> QueryString
toQuery ListFieldLevelEncryptionProfiles' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListFieldLevelEncryptionProfiles' :: ListFieldLevelEncryptionProfiles -> Maybe Text
$sel:marker:ListFieldLevelEncryptionProfiles' :: ListFieldLevelEncryptionProfiles -> 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 ListFieldLevelEncryptionProfilesResponse = ListFieldLevelEncryptionProfilesResponse'
{
ListFieldLevelEncryptionProfilesResponse
-> Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList :: Prelude.Maybe FieldLevelEncryptionProfileList,
ListFieldLevelEncryptionProfilesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool
(ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool)
-> (ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool)
-> Eq ListFieldLevelEncryptionProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool
$c/= :: ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool
== :: ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool
$c== :: ListFieldLevelEncryptionProfilesResponse
-> ListFieldLevelEncryptionProfilesResponse -> Bool
Prelude.Eq, ReadPrec [ListFieldLevelEncryptionProfilesResponse]
ReadPrec ListFieldLevelEncryptionProfilesResponse
Int -> ReadS ListFieldLevelEncryptionProfilesResponse
ReadS [ListFieldLevelEncryptionProfilesResponse]
(Int -> ReadS ListFieldLevelEncryptionProfilesResponse)
-> ReadS [ListFieldLevelEncryptionProfilesResponse]
-> ReadPrec ListFieldLevelEncryptionProfilesResponse
-> ReadPrec [ListFieldLevelEncryptionProfilesResponse]
-> Read ListFieldLevelEncryptionProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFieldLevelEncryptionProfilesResponse]
$creadListPrec :: ReadPrec [ListFieldLevelEncryptionProfilesResponse]
readPrec :: ReadPrec ListFieldLevelEncryptionProfilesResponse
$creadPrec :: ReadPrec ListFieldLevelEncryptionProfilesResponse
readList :: ReadS [ListFieldLevelEncryptionProfilesResponse]
$creadList :: ReadS [ListFieldLevelEncryptionProfilesResponse]
readsPrec :: Int -> ReadS ListFieldLevelEncryptionProfilesResponse
$creadsPrec :: Int -> ReadS ListFieldLevelEncryptionProfilesResponse
Prelude.Read, Int -> ListFieldLevelEncryptionProfilesResponse -> ShowS
[ListFieldLevelEncryptionProfilesResponse] -> ShowS
ListFieldLevelEncryptionProfilesResponse -> String
(Int -> ListFieldLevelEncryptionProfilesResponse -> ShowS)
-> (ListFieldLevelEncryptionProfilesResponse -> String)
-> ([ListFieldLevelEncryptionProfilesResponse] -> ShowS)
-> Show ListFieldLevelEncryptionProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFieldLevelEncryptionProfilesResponse] -> ShowS
$cshowList :: [ListFieldLevelEncryptionProfilesResponse] -> ShowS
show :: ListFieldLevelEncryptionProfilesResponse -> String
$cshow :: ListFieldLevelEncryptionProfilesResponse -> String
showsPrec :: Int -> ListFieldLevelEncryptionProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListFieldLevelEncryptionProfilesResponse -> ShowS
Prelude.Show, (forall x.
ListFieldLevelEncryptionProfilesResponse
-> Rep ListFieldLevelEncryptionProfilesResponse x)
-> (forall x.
Rep ListFieldLevelEncryptionProfilesResponse x
-> ListFieldLevelEncryptionProfilesResponse)
-> Generic ListFieldLevelEncryptionProfilesResponse
forall x.
Rep ListFieldLevelEncryptionProfilesResponse x
-> ListFieldLevelEncryptionProfilesResponse
forall x.
ListFieldLevelEncryptionProfilesResponse
-> Rep ListFieldLevelEncryptionProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFieldLevelEncryptionProfilesResponse x
-> ListFieldLevelEncryptionProfilesResponse
$cfrom :: forall x.
ListFieldLevelEncryptionProfilesResponse
-> Rep ListFieldLevelEncryptionProfilesResponse x
Prelude.Generic)
newListFieldLevelEncryptionProfilesResponse ::
Prelude.Int ->
ListFieldLevelEncryptionProfilesResponse
newListFieldLevelEncryptionProfilesResponse :: Int -> ListFieldLevelEncryptionProfilesResponse
newListFieldLevelEncryptionProfilesResponse
Int
pHttpStatus_ =
ListFieldLevelEncryptionProfilesResponse' :: Maybe FieldLevelEncryptionProfileList
-> Int -> ListFieldLevelEncryptionProfilesResponse
ListFieldLevelEncryptionProfilesResponse'
{ $sel:fieldLevelEncryptionProfileList:ListFieldLevelEncryptionProfilesResponse' :: Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList =
Maybe FieldLevelEncryptionProfileList
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListFieldLevelEncryptionProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listFieldLevelEncryptionProfilesResponse_fieldLevelEncryptionProfileList :: Lens.Lens' ListFieldLevelEncryptionProfilesResponse (Prelude.Maybe FieldLevelEncryptionProfileList)
listFieldLevelEncryptionProfilesResponse_fieldLevelEncryptionProfileList :: (Maybe FieldLevelEncryptionProfileList
-> f (Maybe FieldLevelEncryptionProfileList))
-> ListFieldLevelEncryptionProfilesResponse
-> f ListFieldLevelEncryptionProfilesResponse
listFieldLevelEncryptionProfilesResponse_fieldLevelEncryptionProfileList = (ListFieldLevelEncryptionProfilesResponse
-> Maybe FieldLevelEncryptionProfileList)
-> (ListFieldLevelEncryptionProfilesResponse
-> Maybe FieldLevelEncryptionProfileList
-> ListFieldLevelEncryptionProfilesResponse)
-> Lens
ListFieldLevelEncryptionProfilesResponse
ListFieldLevelEncryptionProfilesResponse
(Maybe FieldLevelEncryptionProfileList)
(Maybe FieldLevelEncryptionProfileList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionProfilesResponse' {Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList :: Maybe FieldLevelEncryptionProfileList
$sel:fieldLevelEncryptionProfileList:ListFieldLevelEncryptionProfilesResponse' :: ListFieldLevelEncryptionProfilesResponse
-> Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList} -> Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList) (\s :: ListFieldLevelEncryptionProfilesResponse
s@ListFieldLevelEncryptionProfilesResponse' {} Maybe FieldLevelEncryptionProfileList
a -> ListFieldLevelEncryptionProfilesResponse
s {$sel:fieldLevelEncryptionProfileList:ListFieldLevelEncryptionProfilesResponse' :: Maybe FieldLevelEncryptionProfileList
fieldLevelEncryptionProfileList = Maybe FieldLevelEncryptionProfileList
a} :: ListFieldLevelEncryptionProfilesResponse)
listFieldLevelEncryptionProfilesResponse_httpStatus :: Lens.Lens' ListFieldLevelEncryptionProfilesResponse Prelude.Int
listFieldLevelEncryptionProfilesResponse_httpStatus :: (Int -> f Int)
-> ListFieldLevelEncryptionProfilesResponse
-> f ListFieldLevelEncryptionProfilesResponse
listFieldLevelEncryptionProfilesResponse_httpStatus = (ListFieldLevelEncryptionProfilesResponse -> Int)
-> (ListFieldLevelEncryptionProfilesResponse
-> Int -> ListFieldLevelEncryptionProfilesResponse)
-> Lens
ListFieldLevelEncryptionProfilesResponse
ListFieldLevelEncryptionProfilesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFieldLevelEncryptionProfilesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListFieldLevelEncryptionProfilesResponse' :: ListFieldLevelEncryptionProfilesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListFieldLevelEncryptionProfilesResponse
s@ListFieldLevelEncryptionProfilesResponse' {} Int
a -> ListFieldLevelEncryptionProfilesResponse
s {$sel:httpStatus:ListFieldLevelEncryptionProfilesResponse' :: Int
httpStatus = Int
a} :: ListFieldLevelEncryptionProfilesResponse)
instance
Prelude.NFData
ListFieldLevelEncryptionProfilesResponse