{-# 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.APIGateway.GetUsagePlanKeys
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets all the usage plan keys representing the API keys added to a
-- specified usage plan.
--
-- This operation returns paginated results.
module Amazonka.APIGateway.GetUsagePlanKeys
  ( -- * Creating a Request
    GetUsagePlanKeys (..),
    newGetUsagePlanKeys,

    -- * Request Lenses
    getUsagePlanKeys_limit,
    getUsagePlanKeys_nameQuery,
    getUsagePlanKeys_position,
    getUsagePlanKeys_usagePlanId,

    -- * Destructuring the Response
    GetUsagePlanKeysResponse (..),
    newGetUsagePlanKeysResponse,

    -- * Response Lenses
    getUsagePlanKeysResponse_items,
    getUsagePlanKeysResponse_position,
    getUsagePlanKeysResponse_httpStatus,
  )
where

import Amazonka.APIGateway.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The GET request to get all the usage plan keys representing the API keys
-- added to a specified usage plan.
--
-- /See:/ 'newGetUsagePlanKeys' smart constructor.
data GetUsagePlanKeys = GetUsagePlanKeys'
  { -- | The maximum number of returned results per page. The default value is 25
    -- and the maximum value is 500.
    GetUsagePlanKeys -> Maybe Int
limit :: Prelude.Maybe Prelude.Int,
    -- | A query parameter specifying the name of the to-be-returned usage plan
    -- keys.
    GetUsagePlanKeys -> Maybe Text
nameQuery :: Prelude.Maybe Prelude.Text,
    -- | The current pagination position in the paged result set.
    GetUsagePlanKeys -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
    -- | The Id of the UsagePlan resource representing the usage plan containing
    -- the to-be-retrieved UsagePlanKey resource representing a plan customer.
    GetUsagePlanKeys -> Text
usagePlanId :: Prelude.Text
  }
  deriving (GetUsagePlanKeys -> GetUsagePlanKeys -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsagePlanKeys -> GetUsagePlanKeys -> Bool
$c/= :: GetUsagePlanKeys -> GetUsagePlanKeys -> Bool
== :: GetUsagePlanKeys -> GetUsagePlanKeys -> Bool
$c== :: GetUsagePlanKeys -> GetUsagePlanKeys -> Bool
Prelude.Eq, ReadPrec [GetUsagePlanKeys]
ReadPrec GetUsagePlanKeys
Int -> ReadS GetUsagePlanKeys
ReadS [GetUsagePlanKeys]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsagePlanKeys]
$creadListPrec :: ReadPrec [GetUsagePlanKeys]
readPrec :: ReadPrec GetUsagePlanKeys
$creadPrec :: ReadPrec GetUsagePlanKeys
readList :: ReadS [GetUsagePlanKeys]
$creadList :: ReadS [GetUsagePlanKeys]
readsPrec :: Int -> ReadS GetUsagePlanKeys
$creadsPrec :: Int -> ReadS GetUsagePlanKeys
Prelude.Read, Int -> GetUsagePlanKeys -> ShowS
[GetUsagePlanKeys] -> ShowS
GetUsagePlanKeys -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsagePlanKeys] -> ShowS
$cshowList :: [GetUsagePlanKeys] -> ShowS
show :: GetUsagePlanKeys -> String
$cshow :: GetUsagePlanKeys -> String
showsPrec :: Int -> GetUsagePlanKeys -> ShowS
$cshowsPrec :: Int -> GetUsagePlanKeys -> ShowS
Prelude.Show, forall x. Rep GetUsagePlanKeys x -> GetUsagePlanKeys
forall x. GetUsagePlanKeys -> Rep GetUsagePlanKeys x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetUsagePlanKeys x -> GetUsagePlanKeys
$cfrom :: forall x. GetUsagePlanKeys -> Rep GetUsagePlanKeys x
Prelude.Generic)

-- |
-- Create a value of 'GetUsagePlanKeys' 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:
--
-- 'limit', 'getUsagePlanKeys_limit' - The maximum number of returned results per page. The default value is 25
-- and the maximum value is 500.
--
-- 'nameQuery', 'getUsagePlanKeys_nameQuery' - A query parameter specifying the name of the to-be-returned usage plan
-- keys.
--
-- 'position', 'getUsagePlanKeys_position' - The current pagination position in the paged result set.
--
-- 'usagePlanId', 'getUsagePlanKeys_usagePlanId' - The Id of the UsagePlan resource representing the usage plan containing
-- the to-be-retrieved UsagePlanKey resource representing a plan customer.
newGetUsagePlanKeys ::
  -- | 'usagePlanId'
  Prelude.Text ->
  GetUsagePlanKeys
newGetUsagePlanKeys :: Text -> GetUsagePlanKeys
newGetUsagePlanKeys Text
pUsagePlanId_ =
  GetUsagePlanKeys'
    { $sel:limit:GetUsagePlanKeys' :: Maybe Int
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nameQuery:GetUsagePlanKeys' :: Maybe Text
nameQuery = forall a. Maybe a
Prelude.Nothing,
      $sel:position:GetUsagePlanKeys' :: Maybe Text
position = forall a. Maybe a
Prelude.Nothing,
      $sel:usagePlanId:GetUsagePlanKeys' :: Text
usagePlanId = Text
pUsagePlanId_
    }

-- | The maximum number of returned results per page. The default value is 25
-- and the maximum value is 500.
getUsagePlanKeys_limit :: Lens.Lens' GetUsagePlanKeys (Prelude.Maybe Prelude.Int)
getUsagePlanKeys_limit :: Lens' GetUsagePlanKeys (Maybe Int)
getUsagePlanKeys_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeys' {Maybe Int
limit :: Maybe Int
$sel:limit:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Int
limit} -> Maybe Int
limit) (\s :: GetUsagePlanKeys
s@GetUsagePlanKeys' {} Maybe Int
a -> GetUsagePlanKeys
s {$sel:limit:GetUsagePlanKeys' :: Maybe Int
limit = Maybe Int
a} :: GetUsagePlanKeys)

-- | A query parameter specifying the name of the to-be-returned usage plan
-- keys.
getUsagePlanKeys_nameQuery :: Lens.Lens' GetUsagePlanKeys (Prelude.Maybe Prelude.Text)
getUsagePlanKeys_nameQuery :: Lens' GetUsagePlanKeys (Maybe Text)
getUsagePlanKeys_nameQuery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeys' {Maybe Text
nameQuery :: Maybe Text
$sel:nameQuery:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
nameQuery} -> Maybe Text
nameQuery) (\s :: GetUsagePlanKeys
s@GetUsagePlanKeys' {} Maybe Text
a -> GetUsagePlanKeys
s {$sel:nameQuery:GetUsagePlanKeys' :: Maybe Text
nameQuery = Maybe Text
a} :: GetUsagePlanKeys)

-- | The current pagination position in the paged result set.
getUsagePlanKeys_position :: Lens.Lens' GetUsagePlanKeys (Prelude.Maybe Prelude.Text)
getUsagePlanKeys_position :: Lens' GetUsagePlanKeys (Maybe Text)
getUsagePlanKeys_position = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeys' {Maybe Text
position :: Maybe Text
$sel:position:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
position} -> Maybe Text
position) (\s :: GetUsagePlanKeys
s@GetUsagePlanKeys' {} Maybe Text
a -> GetUsagePlanKeys
s {$sel:position:GetUsagePlanKeys' :: Maybe Text
position = Maybe Text
a} :: GetUsagePlanKeys)

-- | The Id of the UsagePlan resource representing the usage plan containing
-- the to-be-retrieved UsagePlanKey resource representing a plan customer.
getUsagePlanKeys_usagePlanId :: Lens.Lens' GetUsagePlanKeys Prelude.Text
getUsagePlanKeys_usagePlanId :: Lens' GetUsagePlanKeys Text
getUsagePlanKeys_usagePlanId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeys' {Text
usagePlanId :: Text
$sel:usagePlanId:GetUsagePlanKeys' :: GetUsagePlanKeys -> Text
usagePlanId} -> Text
usagePlanId) (\s :: GetUsagePlanKeys
s@GetUsagePlanKeys' {} Text
a -> GetUsagePlanKeys
s {$sel:usagePlanId:GetUsagePlanKeys' :: Text
usagePlanId = Text
a} :: GetUsagePlanKeys)

instance Core.AWSPager GetUsagePlanKeys where
  page :: GetUsagePlanKeys
-> AWSResponse GetUsagePlanKeys -> Maybe GetUsagePlanKeys
page GetUsagePlanKeys
rq AWSResponse GetUsagePlanKeys
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetUsagePlanKeys
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetUsagePlanKeysResponse (Maybe Text)
getUsagePlanKeysResponse_position
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetUsagePlanKeys
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetUsagePlanKeysResponse (Maybe [UsagePlanKey])
getUsagePlanKeysResponse_items
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetUsagePlanKeys
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetUsagePlanKeys (Maybe Text)
getUsagePlanKeys_position
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetUsagePlanKeys
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetUsagePlanKeysResponse (Maybe Text)
getUsagePlanKeysResponse_position
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest GetUsagePlanKeys where
  type
    AWSResponse GetUsagePlanKeys =
      GetUsagePlanKeysResponse
  request :: (Service -> Service)
-> GetUsagePlanKeys -> Request GetUsagePlanKeys
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetUsagePlanKeys
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetUsagePlanKeys)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [UsagePlanKey]
-> Maybe Text -> Int -> GetUsagePlanKeysResponse
GetUsagePlanKeysResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"item" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"position")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetUsagePlanKeys where
  hashWithSalt :: Int -> GetUsagePlanKeys -> Int
hashWithSalt Int
_salt GetUsagePlanKeys' {Maybe Int
Maybe Text
Text
usagePlanId :: Text
position :: Maybe Text
nameQuery :: Maybe Text
limit :: Maybe Int
$sel:usagePlanId:GetUsagePlanKeys' :: GetUsagePlanKeys -> Text
$sel:position:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:nameQuery:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:limit:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nameQuery
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
position
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
usagePlanId

instance Prelude.NFData GetUsagePlanKeys where
  rnf :: GetUsagePlanKeys -> ()
rnf GetUsagePlanKeys' {Maybe Int
Maybe Text
Text
usagePlanId :: Text
position :: Maybe Text
nameQuery :: Maybe Text
limit :: Maybe Int
$sel:usagePlanId:GetUsagePlanKeys' :: GetUsagePlanKeys -> Text
$sel:position:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:nameQuery:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:limit:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nameQuery
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
position
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
usagePlanId

instance Data.ToHeaders GetUsagePlanKeys where
  toHeaders :: GetUsagePlanKeys -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Accept"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/json" :: Prelude.ByteString)
          ]
      )

instance Data.ToPath GetUsagePlanKeys where
  toPath :: GetUsagePlanKeys -> ByteString
toPath GetUsagePlanKeys' {Maybe Int
Maybe Text
Text
usagePlanId :: Text
position :: Maybe Text
nameQuery :: Maybe Text
limit :: Maybe Int
$sel:usagePlanId:GetUsagePlanKeys' :: GetUsagePlanKeys -> Text
$sel:position:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:nameQuery:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:limit:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Int
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/usageplans/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
usagePlanId, ByteString
"/keys"]

instance Data.ToQuery GetUsagePlanKeys where
  toQuery :: GetUsagePlanKeys -> QueryString
toQuery GetUsagePlanKeys' {Maybe Int
Maybe Text
Text
usagePlanId :: Text
position :: Maybe Text
nameQuery :: Maybe Text
limit :: Maybe Int
$sel:usagePlanId:GetUsagePlanKeys' :: GetUsagePlanKeys -> Text
$sel:position:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:nameQuery:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Text
$sel:limit:GetUsagePlanKeys' :: GetUsagePlanKeys -> Maybe Int
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"limit" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
limit,
        ByteString
"name" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nameQuery,
        ByteString
"position" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
position
      ]

-- | Represents the collection of usage plan keys added to usage plans for
-- the associated API keys and, possibly, other types of keys.
--
-- /See:/ 'newGetUsagePlanKeysResponse' smart constructor.
data GetUsagePlanKeysResponse = GetUsagePlanKeysResponse'
  { -- | The current page of elements from this collection.
    GetUsagePlanKeysResponse -> Maybe [UsagePlanKey]
items :: Prelude.Maybe [UsagePlanKey],
    GetUsagePlanKeysResponse -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetUsagePlanKeysResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetUsagePlanKeysResponse -> GetUsagePlanKeysResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsagePlanKeysResponse -> GetUsagePlanKeysResponse -> Bool
$c/= :: GetUsagePlanKeysResponse -> GetUsagePlanKeysResponse -> Bool
== :: GetUsagePlanKeysResponse -> GetUsagePlanKeysResponse -> Bool
$c== :: GetUsagePlanKeysResponse -> GetUsagePlanKeysResponse -> Bool
Prelude.Eq, ReadPrec [GetUsagePlanKeysResponse]
ReadPrec GetUsagePlanKeysResponse
Int -> ReadS GetUsagePlanKeysResponse
ReadS [GetUsagePlanKeysResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsagePlanKeysResponse]
$creadListPrec :: ReadPrec [GetUsagePlanKeysResponse]
readPrec :: ReadPrec GetUsagePlanKeysResponse
$creadPrec :: ReadPrec GetUsagePlanKeysResponse
readList :: ReadS [GetUsagePlanKeysResponse]
$creadList :: ReadS [GetUsagePlanKeysResponse]
readsPrec :: Int -> ReadS GetUsagePlanKeysResponse
$creadsPrec :: Int -> ReadS GetUsagePlanKeysResponse
Prelude.Read, Int -> GetUsagePlanKeysResponse -> ShowS
[GetUsagePlanKeysResponse] -> ShowS
GetUsagePlanKeysResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsagePlanKeysResponse] -> ShowS
$cshowList :: [GetUsagePlanKeysResponse] -> ShowS
show :: GetUsagePlanKeysResponse -> String
$cshow :: GetUsagePlanKeysResponse -> String
showsPrec :: Int -> GetUsagePlanKeysResponse -> ShowS
$cshowsPrec :: Int -> GetUsagePlanKeysResponse -> ShowS
Prelude.Show, forall x.
Rep GetUsagePlanKeysResponse x -> GetUsagePlanKeysResponse
forall x.
GetUsagePlanKeysResponse -> Rep GetUsagePlanKeysResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUsagePlanKeysResponse x -> GetUsagePlanKeysResponse
$cfrom :: forall x.
GetUsagePlanKeysResponse -> Rep GetUsagePlanKeysResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetUsagePlanKeysResponse' 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:
--
-- 'items', 'getUsagePlanKeysResponse_items' - The current page of elements from this collection.
--
-- 'position', 'getUsagePlanKeysResponse_position' - Undocumented member.
--
-- 'httpStatus', 'getUsagePlanKeysResponse_httpStatus' - The response's http status code.
newGetUsagePlanKeysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetUsagePlanKeysResponse
newGetUsagePlanKeysResponse :: Int -> GetUsagePlanKeysResponse
newGetUsagePlanKeysResponse Int
pHttpStatus_ =
  GetUsagePlanKeysResponse'
    { $sel:items:GetUsagePlanKeysResponse' :: Maybe [UsagePlanKey]
items = forall a. Maybe a
Prelude.Nothing,
      $sel:position:GetUsagePlanKeysResponse' :: Maybe Text
position = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetUsagePlanKeysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current page of elements from this collection.
getUsagePlanKeysResponse_items :: Lens.Lens' GetUsagePlanKeysResponse (Prelude.Maybe [UsagePlanKey])
getUsagePlanKeysResponse_items :: Lens' GetUsagePlanKeysResponse (Maybe [UsagePlanKey])
getUsagePlanKeysResponse_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeysResponse' {Maybe [UsagePlanKey]
items :: Maybe [UsagePlanKey]
$sel:items:GetUsagePlanKeysResponse' :: GetUsagePlanKeysResponse -> Maybe [UsagePlanKey]
items} -> Maybe [UsagePlanKey]
items) (\s :: GetUsagePlanKeysResponse
s@GetUsagePlanKeysResponse' {} Maybe [UsagePlanKey]
a -> GetUsagePlanKeysResponse
s {$sel:items:GetUsagePlanKeysResponse' :: Maybe [UsagePlanKey]
items = Maybe [UsagePlanKey]
a} :: GetUsagePlanKeysResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
getUsagePlanKeysResponse_position :: Lens.Lens' GetUsagePlanKeysResponse (Prelude.Maybe Prelude.Text)
getUsagePlanKeysResponse_position :: Lens' GetUsagePlanKeysResponse (Maybe Text)
getUsagePlanKeysResponse_position = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsagePlanKeysResponse' {Maybe Text
position :: Maybe Text
$sel:position:GetUsagePlanKeysResponse' :: GetUsagePlanKeysResponse -> Maybe Text
position} -> Maybe Text
position) (\s :: GetUsagePlanKeysResponse
s@GetUsagePlanKeysResponse' {} Maybe Text
a -> GetUsagePlanKeysResponse
s {$sel:position:GetUsagePlanKeysResponse' :: Maybe Text
position = Maybe Text
a} :: GetUsagePlanKeysResponse)

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

instance Prelude.NFData GetUsagePlanKeysResponse where
  rnf :: GetUsagePlanKeysResponse -> ()
rnf GetUsagePlanKeysResponse' {Int
Maybe [UsagePlanKey]
Maybe Text
httpStatus :: Int
position :: Maybe Text
items :: Maybe [UsagePlanKey]
$sel:httpStatus:GetUsagePlanKeysResponse' :: GetUsagePlanKeysResponse -> Int
$sel:position:GetUsagePlanKeysResponse' :: GetUsagePlanKeysResponse -> Maybe Text
$sel:items:GetUsagePlanKeysResponse' :: GetUsagePlanKeysResponse -> Maybe [UsagePlanKey]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [UsagePlanKey]
items
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
position
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus