{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFront.ListCloudFrontOriginAccessIdentities
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists origin access identities.
--
-- This operation returns paginated results.
module Amazonka.CloudFront.ListCloudFrontOriginAccessIdentities
  ( -- * Creating a Request
    ListCloudFrontOriginAccessIdentities (..),
    newListCloudFrontOriginAccessIdentities,

    -- * Request Lenses
    listCloudFrontOriginAccessIdentities_marker,
    listCloudFrontOriginAccessIdentities_maxItems,

    -- * Destructuring the Response
    ListCloudFrontOriginAccessIdentitiesResponse (..),
    newListCloudFrontOriginAccessIdentitiesResponse,

    -- * Response Lenses
    listCloudFrontOriginAccessIdentitiesResponse_httpStatus,
    listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList,
  )
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

-- | The request to list origin access identities.
--
-- /See:/ 'newListCloudFrontOriginAccessIdentities' smart constructor.
data ListCloudFrontOriginAccessIdentities = ListCloudFrontOriginAccessIdentities'
  { -- | Use this when paginating results to indicate where to begin in your list
    -- of origin access identities. The results include identities in the list
    -- that occur after the marker. To get the next page of results, set the
    -- @Marker@ to the value of the @NextMarker@ from the current page\'s
    -- response (which is also the ID of the last identity on that page).
    ListCloudFrontOriginAccessIdentities -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of origin access identities you want in the response
    -- body.
    ListCloudFrontOriginAccessIdentities -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text
  }
  deriving (ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities -> Bool
(ListCloudFrontOriginAccessIdentities
 -> ListCloudFrontOriginAccessIdentities -> Bool)
-> (ListCloudFrontOriginAccessIdentities
    -> ListCloudFrontOriginAccessIdentities -> Bool)
-> Eq ListCloudFrontOriginAccessIdentities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities -> Bool
$c/= :: ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities -> Bool
== :: ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities -> Bool
$c== :: ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities -> Bool
Prelude.Eq, ReadPrec [ListCloudFrontOriginAccessIdentities]
ReadPrec ListCloudFrontOriginAccessIdentities
Int -> ReadS ListCloudFrontOriginAccessIdentities
ReadS [ListCloudFrontOriginAccessIdentities]
(Int -> ReadS ListCloudFrontOriginAccessIdentities)
-> ReadS [ListCloudFrontOriginAccessIdentities]
-> ReadPrec ListCloudFrontOriginAccessIdentities
-> ReadPrec [ListCloudFrontOriginAccessIdentities]
-> Read ListCloudFrontOriginAccessIdentities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCloudFrontOriginAccessIdentities]
$creadListPrec :: ReadPrec [ListCloudFrontOriginAccessIdentities]
readPrec :: ReadPrec ListCloudFrontOriginAccessIdentities
$creadPrec :: ReadPrec ListCloudFrontOriginAccessIdentities
readList :: ReadS [ListCloudFrontOriginAccessIdentities]
$creadList :: ReadS [ListCloudFrontOriginAccessIdentities]
readsPrec :: Int -> ReadS ListCloudFrontOriginAccessIdentities
$creadsPrec :: Int -> ReadS ListCloudFrontOriginAccessIdentities
Prelude.Read, Int -> ListCloudFrontOriginAccessIdentities -> ShowS
[ListCloudFrontOriginAccessIdentities] -> ShowS
ListCloudFrontOriginAccessIdentities -> String
(Int -> ListCloudFrontOriginAccessIdentities -> ShowS)
-> (ListCloudFrontOriginAccessIdentities -> String)
-> ([ListCloudFrontOriginAccessIdentities] -> ShowS)
-> Show ListCloudFrontOriginAccessIdentities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCloudFrontOriginAccessIdentities] -> ShowS
$cshowList :: [ListCloudFrontOriginAccessIdentities] -> ShowS
show :: ListCloudFrontOriginAccessIdentities -> String
$cshow :: ListCloudFrontOriginAccessIdentities -> String
showsPrec :: Int -> ListCloudFrontOriginAccessIdentities -> ShowS
$cshowsPrec :: Int -> ListCloudFrontOriginAccessIdentities -> ShowS
Prelude.Show, (forall x.
 ListCloudFrontOriginAccessIdentities
 -> Rep ListCloudFrontOriginAccessIdentities x)
-> (forall x.
    Rep ListCloudFrontOriginAccessIdentities x
    -> ListCloudFrontOriginAccessIdentities)
-> Generic ListCloudFrontOriginAccessIdentities
forall x.
Rep ListCloudFrontOriginAccessIdentities x
-> ListCloudFrontOriginAccessIdentities
forall x.
ListCloudFrontOriginAccessIdentities
-> Rep ListCloudFrontOriginAccessIdentities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCloudFrontOriginAccessIdentities x
-> ListCloudFrontOriginAccessIdentities
$cfrom :: forall x.
ListCloudFrontOriginAccessIdentities
-> Rep ListCloudFrontOriginAccessIdentities x
Prelude.Generic)

-- |
-- Create a value of 'ListCloudFrontOriginAccessIdentities' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'marker', 'listCloudFrontOriginAccessIdentities_marker' - Use this when paginating results to indicate where to begin in your list
-- of origin access identities. The results include identities in the list
-- that occur after the marker. To get the next page of results, set the
-- @Marker@ to the value of the @NextMarker@ from the current page\'s
-- response (which is also the ID of the last identity on that page).
--
-- 'maxItems', 'listCloudFrontOriginAccessIdentities_maxItems' - The maximum number of origin access identities you want in the response
-- body.
newListCloudFrontOriginAccessIdentities ::
  ListCloudFrontOriginAccessIdentities
newListCloudFrontOriginAccessIdentities :: ListCloudFrontOriginAccessIdentities
newListCloudFrontOriginAccessIdentities =
  ListCloudFrontOriginAccessIdentities' :: Maybe Text -> Maybe Text -> ListCloudFrontOriginAccessIdentities
ListCloudFrontOriginAccessIdentities'
    { $sel:marker:ListCloudFrontOriginAccessIdentities' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListCloudFrontOriginAccessIdentities' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Use this when paginating results to indicate where to begin in your list
-- of origin access identities. The results include identities in the list
-- that occur after the marker. To get the next page of results, set the
-- @Marker@ to the value of the @NextMarker@ from the current page\'s
-- response (which is also the ID of the last identity on that page).
listCloudFrontOriginAccessIdentities_marker :: Lens.Lens' ListCloudFrontOriginAccessIdentities (Prelude.Maybe Prelude.Text)
listCloudFrontOriginAccessIdentities_marker :: (Maybe Text -> f (Maybe Text))
-> ListCloudFrontOriginAccessIdentities
-> f ListCloudFrontOriginAccessIdentities
listCloudFrontOriginAccessIdentities_marker = (ListCloudFrontOriginAccessIdentities -> Maybe Text)
-> (ListCloudFrontOriginAccessIdentities
    -> Maybe Text -> ListCloudFrontOriginAccessIdentities)
-> Lens
     ListCloudFrontOriginAccessIdentities
     ListCloudFrontOriginAccessIdentities
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCloudFrontOriginAccessIdentities' {Maybe Text
marker :: Maybe Text
$sel:marker:ListCloudFrontOriginAccessIdentities' :: ListCloudFrontOriginAccessIdentities -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListCloudFrontOriginAccessIdentities
s@ListCloudFrontOriginAccessIdentities' {} Maybe Text
a -> ListCloudFrontOriginAccessIdentities
s {$sel:marker:ListCloudFrontOriginAccessIdentities' :: Maybe Text
marker = Maybe Text
a} :: ListCloudFrontOriginAccessIdentities)

-- | The maximum number of origin access identities you want in the response
-- body.
listCloudFrontOriginAccessIdentities_maxItems :: Lens.Lens' ListCloudFrontOriginAccessIdentities (Prelude.Maybe Prelude.Text)
listCloudFrontOriginAccessIdentities_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListCloudFrontOriginAccessIdentities
-> f ListCloudFrontOriginAccessIdentities
listCloudFrontOriginAccessIdentities_maxItems = (ListCloudFrontOriginAccessIdentities -> Maybe Text)
-> (ListCloudFrontOriginAccessIdentities
    -> Maybe Text -> ListCloudFrontOriginAccessIdentities)
-> Lens
     ListCloudFrontOriginAccessIdentities
     ListCloudFrontOriginAccessIdentities
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCloudFrontOriginAccessIdentities' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListCloudFrontOriginAccessIdentities' :: ListCloudFrontOriginAccessIdentities -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListCloudFrontOriginAccessIdentities
s@ListCloudFrontOriginAccessIdentities' {} Maybe Text
a -> ListCloudFrontOriginAccessIdentities
s {$sel:maxItems:ListCloudFrontOriginAccessIdentities' :: Maybe Text
maxItems = Maybe Text
a} :: ListCloudFrontOriginAccessIdentities)

instance
  Core.AWSPager
    ListCloudFrontOriginAccessIdentities
  where
  page :: ListCloudFrontOriginAccessIdentities
-> AWSResponse ListCloudFrontOriginAccessIdentities
-> Maybe ListCloudFrontOriginAccessIdentities
page ListCloudFrontOriginAccessIdentities
rq AWSResponse ListCloudFrontOriginAccessIdentities
rs
    | Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCloudFrontOriginAccessIdentities
ListCloudFrontOriginAccessIdentitiesResponse
rs
            ListCloudFrontOriginAccessIdentitiesResponse
-> Getting Bool ListCloudFrontOriginAccessIdentitiesResponse Bool
-> Bool
forall s a. s -> Getting a s a -> a
Lens.^. (CloudFrontOriginAccessIdentityList
 -> Const Bool CloudFrontOriginAccessIdentityList)
-> ListCloudFrontOriginAccessIdentitiesResponse
-> Const Bool ListCloudFrontOriginAccessIdentitiesResponse
Lens'
  ListCloudFrontOriginAccessIdentitiesResponse
  CloudFrontOriginAccessIdentityList
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList
              ((CloudFrontOriginAccessIdentityList
  -> Const Bool CloudFrontOriginAccessIdentityList)
 -> ListCloudFrontOriginAccessIdentitiesResponse
 -> Const Bool ListCloudFrontOriginAccessIdentitiesResponse)
-> ((Bool -> Const Bool Bool)
    -> CloudFrontOriginAccessIdentityList
    -> Const Bool CloudFrontOriginAccessIdentityList)
-> Getting Bool ListCloudFrontOriginAccessIdentitiesResponse Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Bool -> Const Bool Bool)
-> CloudFrontOriginAccessIdentityList
-> Const Bool CloudFrontOriginAccessIdentityList
Lens' CloudFrontOriginAccessIdentityList Bool
cloudFrontOriginAccessIdentityList_isTruncated
        ) =
      Maybe ListCloudFrontOriginAccessIdentities
forall a. Maybe a
Prelude.Nothing
    | Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListCloudFrontOriginAccessIdentities
ListCloudFrontOriginAccessIdentitiesResponse
rs
            ListCloudFrontOriginAccessIdentitiesResponse
-> Getting
     (First Text) ListCloudFrontOriginAccessIdentitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (CloudFrontOriginAccessIdentityList
 -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> ListCloudFrontOriginAccessIdentitiesResponse
-> Const (First Text) ListCloudFrontOriginAccessIdentitiesResponse
Lens'
  ListCloudFrontOriginAccessIdentitiesResponse
  CloudFrontOriginAccessIdentityList
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList
              ((CloudFrontOriginAccessIdentityList
  -> Const (First Text) CloudFrontOriginAccessIdentityList)
 -> ListCloudFrontOriginAccessIdentitiesResponse
 -> Const (First Text) ListCloudFrontOriginAccessIdentitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> CloudFrontOriginAccessIdentityList
    -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> Getting
     (First Text) ListCloudFrontOriginAccessIdentitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> CloudFrontOriginAccessIdentityList
-> Const (First Text) CloudFrontOriginAccessIdentityList
Lens' CloudFrontOriginAccessIdentityList (Maybe Text)
cloudFrontOriginAccessIdentityList_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> CloudFrontOriginAccessIdentityList
 -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> CloudFrontOriginAccessIdentityList
-> Const (First Text) CloudFrontOriginAccessIdentityList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListCloudFrontOriginAccessIdentities
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListCloudFrontOriginAccessIdentities
-> Maybe ListCloudFrontOriginAccessIdentities
forall a. a -> Maybe a
Prelude.Just (ListCloudFrontOriginAccessIdentities
 -> Maybe ListCloudFrontOriginAccessIdentities)
-> ListCloudFrontOriginAccessIdentities
-> Maybe ListCloudFrontOriginAccessIdentities
forall a b. (a -> b) -> a -> b
Prelude.$
        ListCloudFrontOriginAccessIdentities
rq
          ListCloudFrontOriginAccessIdentities
-> (ListCloudFrontOriginAccessIdentities
    -> ListCloudFrontOriginAccessIdentities)
-> ListCloudFrontOriginAccessIdentities
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListCloudFrontOriginAccessIdentities
-> Identity ListCloudFrontOriginAccessIdentities
Lens
  ListCloudFrontOriginAccessIdentities
  ListCloudFrontOriginAccessIdentities
  (Maybe Text)
  (Maybe Text)
listCloudFrontOriginAccessIdentities_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListCloudFrontOriginAccessIdentities
 -> Identity ListCloudFrontOriginAccessIdentities)
-> Maybe Text
-> ListCloudFrontOriginAccessIdentities
-> ListCloudFrontOriginAccessIdentities
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCloudFrontOriginAccessIdentities
ListCloudFrontOriginAccessIdentitiesResponse
rs
          ListCloudFrontOriginAccessIdentitiesResponse
-> Getting
     (First Text) ListCloudFrontOriginAccessIdentitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (CloudFrontOriginAccessIdentityList
 -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> ListCloudFrontOriginAccessIdentitiesResponse
-> Const (First Text) ListCloudFrontOriginAccessIdentitiesResponse
Lens'
  ListCloudFrontOriginAccessIdentitiesResponse
  CloudFrontOriginAccessIdentityList
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList
            ((CloudFrontOriginAccessIdentityList
  -> Const (First Text) CloudFrontOriginAccessIdentityList)
 -> ListCloudFrontOriginAccessIdentitiesResponse
 -> Const (First Text) ListCloudFrontOriginAccessIdentitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> CloudFrontOriginAccessIdentityList
    -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> Getting
     (First Text) ListCloudFrontOriginAccessIdentitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> CloudFrontOriginAccessIdentityList
-> Const (First Text) CloudFrontOriginAccessIdentityList
Lens' CloudFrontOriginAccessIdentityList (Maybe Text)
cloudFrontOriginAccessIdentityList_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> CloudFrontOriginAccessIdentityList
 -> Const (First Text) CloudFrontOriginAccessIdentityList)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> CloudFrontOriginAccessIdentityList
-> Const (First Text) CloudFrontOriginAccessIdentityList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    ListCloudFrontOriginAccessIdentities
  where
  type
    AWSResponse ListCloudFrontOriginAccessIdentities =
      ListCloudFrontOriginAccessIdentitiesResponse
  request :: ListCloudFrontOriginAccessIdentities
-> Request ListCloudFrontOriginAccessIdentities
request = Service
-> ListCloudFrontOriginAccessIdentities
-> Request ListCloudFrontOriginAccessIdentities
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListCloudFrontOriginAccessIdentities
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListCloudFrontOriginAccessIdentities)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either
      String (AWSResponse ListCloudFrontOriginAccessIdentities))
-> Logger
-> Service
-> Proxy ListCloudFrontOriginAccessIdentities
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListCloudFrontOriginAccessIdentities)))
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 ->
          Int
-> CloudFrontOriginAccessIdentityList
-> ListCloudFrontOriginAccessIdentitiesResponse
ListCloudFrontOriginAccessIdentitiesResponse'
            (Int
 -> CloudFrontOriginAccessIdentityList
 -> ListCloudFrontOriginAccessIdentitiesResponse)
-> Either String Int
-> Either
     String
     (CloudFrontOriginAccessIdentityList
      -> ListCloudFrontOriginAccessIdentitiesResponse)
forall (f :: * -> *) a b. Functor 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))
              Either
  String
  (CloudFrontOriginAccessIdentityList
   -> ListCloudFrontOriginAccessIdentitiesResponse)
-> Either String CloudFrontOriginAccessIdentityList
-> Either String ListCloudFrontOriginAccessIdentitiesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node] -> Either String CloudFrontOriginAccessIdentityList
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
      )

instance
  Prelude.Hashable
    ListCloudFrontOriginAccessIdentities

instance
  Prelude.NFData
    ListCloudFrontOriginAccessIdentities

instance
  Core.ToHeaders
    ListCloudFrontOriginAccessIdentities
  where
  toHeaders :: ListCloudFrontOriginAccessIdentities -> ResponseHeaders
toHeaders = ResponseHeaders
-> ListCloudFrontOriginAccessIdentities -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance
  Core.ToPath
    ListCloudFrontOriginAccessIdentities
  where
  toPath :: ListCloudFrontOriginAccessIdentities -> ByteString
toPath =
    ByteString -> ListCloudFrontOriginAccessIdentities -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/2020-05-31/origin-access-identity/cloudfront"

instance
  Core.ToQuery
    ListCloudFrontOriginAccessIdentities
  where
  toQuery :: ListCloudFrontOriginAccessIdentities -> QueryString
toQuery ListCloudFrontOriginAccessIdentities' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListCloudFrontOriginAccessIdentities' :: ListCloudFrontOriginAccessIdentities -> Maybe Text
$sel:marker:ListCloudFrontOriginAccessIdentities' :: ListCloudFrontOriginAccessIdentities -> 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
      ]

-- | The returned result of the corresponding request.
--
-- /See:/ 'newListCloudFrontOriginAccessIdentitiesResponse' smart constructor.
data ListCloudFrontOriginAccessIdentitiesResponse = ListCloudFrontOriginAccessIdentitiesResponse'
  { -- | The response's http status code.
    ListCloudFrontOriginAccessIdentitiesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The @CloudFrontOriginAccessIdentityList@ type.
    ListCloudFrontOriginAccessIdentitiesResponse
-> CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList :: CloudFrontOriginAccessIdentityList
  }
  deriving (ListCloudFrontOriginAccessIdentitiesResponse
-> ListCloudFrontOriginAccessIdentitiesResponse -> Bool
(ListCloudFrontOriginAccessIdentitiesResponse
 -> ListCloudFrontOriginAccessIdentitiesResponse -> Bool)
-> (ListCloudFrontOriginAccessIdentitiesResponse
    -> ListCloudFrontOriginAccessIdentitiesResponse -> Bool)
-> Eq ListCloudFrontOriginAccessIdentitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCloudFrontOriginAccessIdentitiesResponse
-> ListCloudFrontOriginAccessIdentitiesResponse -> Bool
$c/= :: ListCloudFrontOriginAccessIdentitiesResponse
-> ListCloudFrontOriginAccessIdentitiesResponse -> Bool
== :: ListCloudFrontOriginAccessIdentitiesResponse
-> ListCloudFrontOriginAccessIdentitiesResponse -> Bool
$c== :: ListCloudFrontOriginAccessIdentitiesResponse
-> ListCloudFrontOriginAccessIdentitiesResponse -> Bool
Prelude.Eq, ReadPrec [ListCloudFrontOriginAccessIdentitiesResponse]
ReadPrec ListCloudFrontOriginAccessIdentitiesResponse
Int -> ReadS ListCloudFrontOriginAccessIdentitiesResponse
ReadS [ListCloudFrontOriginAccessIdentitiesResponse]
(Int -> ReadS ListCloudFrontOriginAccessIdentitiesResponse)
-> ReadS [ListCloudFrontOriginAccessIdentitiesResponse]
-> ReadPrec ListCloudFrontOriginAccessIdentitiesResponse
-> ReadPrec [ListCloudFrontOriginAccessIdentitiesResponse]
-> Read ListCloudFrontOriginAccessIdentitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCloudFrontOriginAccessIdentitiesResponse]
$creadListPrec :: ReadPrec [ListCloudFrontOriginAccessIdentitiesResponse]
readPrec :: ReadPrec ListCloudFrontOriginAccessIdentitiesResponse
$creadPrec :: ReadPrec ListCloudFrontOriginAccessIdentitiesResponse
readList :: ReadS [ListCloudFrontOriginAccessIdentitiesResponse]
$creadList :: ReadS [ListCloudFrontOriginAccessIdentitiesResponse]
readsPrec :: Int -> ReadS ListCloudFrontOriginAccessIdentitiesResponse
$creadsPrec :: Int -> ReadS ListCloudFrontOriginAccessIdentitiesResponse
Prelude.Read, Int -> ListCloudFrontOriginAccessIdentitiesResponse -> ShowS
[ListCloudFrontOriginAccessIdentitiesResponse] -> ShowS
ListCloudFrontOriginAccessIdentitiesResponse -> String
(Int -> ListCloudFrontOriginAccessIdentitiesResponse -> ShowS)
-> (ListCloudFrontOriginAccessIdentitiesResponse -> String)
-> ([ListCloudFrontOriginAccessIdentitiesResponse] -> ShowS)
-> Show ListCloudFrontOriginAccessIdentitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCloudFrontOriginAccessIdentitiesResponse] -> ShowS
$cshowList :: [ListCloudFrontOriginAccessIdentitiesResponse] -> ShowS
show :: ListCloudFrontOriginAccessIdentitiesResponse -> String
$cshow :: ListCloudFrontOriginAccessIdentitiesResponse -> String
showsPrec :: Int -> ListCloudFrontOriginAccessIdentitiesResponse -> ShowS
$cshowsPrec :: Int -> ListCloudFrontOriginAccessIdentitiesResponse -> ShowS
Prelude.Show, (forall x.
 ListCloudFrontOriginAccessIdentitiesResponse
 -> Rep ListCloudFrontOriginAccessIdentitiesResponse x)
-> (forall x.
    Rep ListCloudFrontOriginAccessIdentitiesResponse x
    -> ListCloudFrontOriginAccessIdentitiesResponse)
-> Generic ListCloudFrontOriginAccessIdentitiesResponse
forall x.
Rep ListCloudFrontOriginAccessIdentitiesResponse x
-> ListCloudFrontOriginAccessIdentitiesResponse
forall x.
ListCloudFrontOriginAccessIdentitiesResponse
-> Rep ListCloudFrontOriginAccessIdentitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCloudFrontOriginAccessIdentitiesResponse x
-> ListCloudFrontOriginAccessIdentitiesResponse
$cfrom :: forall x.
ListCloudFrontOriginAccessIdentitiesResponse
-> Rep ListCloudFrontOriginAccessIdentitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCloudFrontOriginAccessIdentitiesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'listCloudFrontOriginAccessIdentitiesResponse_httpStatus' - The response's http status code.
--
-- 'cloudFrontOriginAccessIdentityList', 'listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList' - The @CloudFrontOriginAccessIdentityList@ type.
newListCloudFrontOriginAccessIdentitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'cloudFrontOriginAccessIdentityList'
  CloudFrontOriginAccessIdentityList ->
  ListCloudFrontOriginAccessIdentitiesResponse
newListCloudFrontOriginAccessIdentitiesResponse :: Int
-> CloudFrontOriginAccessIdentityList
-> ListCloudFrontOriginAccessIdentitiesResponse
newListCloudFrontOriginAccessIdentitiesResponse
  Int
pHttpStatus_
  CloudFrontOriginAccessIdentityList
pCloudFrontOriginAccessIdentityList_ =
    ListCloudFrontOriginAccessIdentitiesResponse' :: Int
-> CloudFrontOriginAccessIdentityList
-> ListCloudFrontOriginAccessIdentitiesResponse
ListCloudFrontOriginAccessIdentitiesResponse'
      { $sel:httpStatus:ListCloudFrontOriginAccessIdentitiesResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:cloudFrontOriginAccessIdentityList:ListCloudFrontOriginAccessIdentitiesResponse' :: CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList =
          CloudFrontOriginAccessIdentityList
pCloudFrontOriginAccessIdentityList_
      }

-- | The response's http status code.
listCloudFrontOriginAccessIdentitiesResponse_httpStatus :: Lens.Lens' ListCloudFrontOriginAccessIdentitiesResponse Prelude.Int
listCloudFrontOriginAccessIdentitiesResponse_httpStatus :: (Int -> f Int)
-> ListCloudFrontOriginAccessIdentitiesResponse
-> f ListCloudFrontOriginAccessIdentitiesResponse
listCloudFrontOriginAccessIdentitiesResponse_httpStatus = (ListCloudFrontOriginAccessIdentitiesResponse -> Int)
-> (ListCloudFrontOriginAccessIdentitiesResponse
    -> Int -> ListCloudFrontOriginAccessIdentitiesResponse)
-> Lens
     ListCloudFrontOriginAccessIdentitiesResponse
     ListCloudFrontOriginAccessIdentitiesResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCloudFrontOriginAccessIdentitiesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCloudFrontOriginAccessIdentitiesResponse' :: ListCloudFrontOriginAccessIdentitiesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCloudFrontOriginAccessIdentitiesResponse
s@ListCloudFrontOriginAccessIdentitiesResponse' {} Int
a -> ListCloudFrontOriginAccessIdentitiesResponse
s {$sel:httpStatus:ListCloudFrontOriginAccessIdentitiesResponse' :: Int
httpStatus = Int
a} :: ListCloudFrontOriginAccessIdentitiesResponse)

-- | The @CloudFrontOriginAccessIdentityList@ type.
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList :: Lens.Lens' ListCloudFrontOriginAccessIdentitiesResponse CloudFrontOriginAccessIdentityList
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList :: (CloudFrontOriginAccessIdentityList
 -> f CloudFrontOriginAccessIdentityList)
-> ListCloudFrontOriginAccessIdentitiesResponse
-> f ListCloudFrontOriginAccessIdentitiesResponse
listCloudFrontOriginAccessIdentitiesResponse_cloudFrontOriginAccessIdentityList = (ListCloudFrontOriginAccessIdentitiesResponse
 -> CloudFrontOriginAccessIdentityList)
-> (ListCloudFrontOriginAccessIdentitiesResponse
    -> CloudFrontOriginAccessIdentityList
    -> ListCloudFrontOriginAccessIdentitiesResponse)
-> Lens'
     ListCloudFrontOriginAccessIdentitiesResponse
     CloudFrontOriginAccessIdentityList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCloudFrontOriginAccessIdentitiesResponse' {CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList :: CloudFrontOriginAccessIdentityList
$sel:cloudFrontOriginAccessIdentityList:ListCloudFrontOriginAccessIdentitiesResponse' :: ListCloudFrontOriginAccessIdentitiesResponse
-> CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList} -> CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList) (\s :: ListCloudFrontOriginAccessIdentitiesResponse
s@ListCloudFrontOriginAccessIdentitiesResponse' {} CloudFrontOriginAccessIdentityList
a -> ListCloudFrontOriginAccessIdentitiesResponse
s {$sel:cloudFrontOriginAccessIdentityList:ListCloudFrontOriginAccessIdentitiesResponse' :: CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList = CloudFrontOriginAccessIdentityList
a} :: ListCloudFrontOriginAccessIdentitiesResponse)

instance
  Prelude.NFData
    ListCloudFrontOriginAccessIdentitiesResponse