{-# 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.AppConfig.ListHostedConfigurationVersions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists configurations stored in the AppConfig hosted configuration store
-- by version.
module Amazonka.AppConfig.ListHostedConfigurationVersions
  ( -- * Creating a Request
    ListHostedConfigurationVersions (..),
    newListHostedConfigurationVersions,

    -- * Request Lenses
    listHostedConfigurationVersions_maxResults,
    listHostedConfigurationVersions_nextToken,
    listHostedConfigurationVersions_applicationId,
    listHostedConfigurationVersions_configurationProfileId,

    -- * Destructuring the Response
    ListHostedConfigurationVersionsResponse (..),
    newListHostedConfigurationVersionsResponse,

    -- * Response Lenses
    listHostedConfigurationVersionsResponse_items,
    listHostedConfigurationVersionsResponse_nextToken,
    listHostedConfigurationVersionsResponse_httpStatus,
  )
where

import Amazonka.AppConfig.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

-- | /See:/ 'newListHostedConfigurationVersions' smart constructor.
data ListHostedConfigurationVersions = ListHostedConfigurationVersions'
  { -- | The maximum number of items to return for this call. The call also
    -- returns a token that you can specify in a subsequent call to get the
    -- next set of results.
    ListHostedConfigurationVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token to start the list. Use this token to get the next set of
    -- results.
    ListHostedConfigurationVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The application ID.
    ListHostedConfigurationVersions -> Text
applicationId :: Prelude.Text,
    -- | The configuration profile ID.
    ListHostedConfigurationVersions -> Text
configurationProfileId :: Prelude.Text
  }
  deriving (ListHostedConfigurationVersions
-> ListHostedConfigurationVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHostedConfigurationVersions
-> ListHostedConfigurationVersions -> Bool
$c/= :: ListHostedConfigurationVersions
-> ListHostedConfigurationVersions -> Bool
== :: ListHostedConfigurationVersions
-> ListHostedConfigurationVersions -> Bool
$c== :: ListHostedConfigurationVersions
-> ListHostedConfigurationVersions -> Bool
Prelude.Eq, ReadPrec [ListHostedConfigurationVersions]
ReadPrec ListHostedConfigurationVersions
Int -> ReadS ListHostedConfigurationVersions
ReadS [ListHostedConfigurationVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHostedConfigurationVersions]
$creadListPrec :: ReadPrec [ListHostedConfigurationVersions]
readPrec :: ReadPrec ListHostedConfigurationVersions
$creadPrec :: ReadPrec ListHostedConfigurationVersions
readList :: ReadS [ListHostedConfigurationVersions]
$creadList :: ReadS [ListHostedConfigurationVersions]
readsPrec :: Int -> ReadS ListHostedConfigurationVersions
$creadsPrec :: Int -> ReadS ListHostedConfigurationVersions
Prelude.Read, Int -> ListHostedConfigurationVersions -> ShowS
[ListHostedConfigurationVersions] -> ShowS
ListHostedConfigurationVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHostedConfigurationVersions] -> ShowS
$cshowList :: [ListHostedConfigurationVersions] -> ShowS
show :: ListHostedConfigurationVersions -> String
$cshow :: ListHostedConfigurationVersions -> String
showsPrec :: Int -> ListHostedConfigurationVersions -> ShowS
$cshowsPrec :: Int -> ListHostedConfigurationVersions -> ShowS
Prelude.Show, forall x.
Rep ListHostedConfigurationVersions x
-> ListHostedConfigurationVersions
forall x.
ListHostedConfigurationVersions
-> Rep ListHostedConfigurationVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHostedConfigurationVersions x
-> ListHostedConfigurationVersions
$cfrom :: forall x.
ListHostedConfigurationVersions
-> Rep ListHostedConfigurationVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListHostedConfigurationVersions' 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:
--
-- 'maxResults', 'listHostedConfigurationVersions_maxResults' - The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
--
-- 'nextToken', 'listHostedConfigurationVersions_nextToken' - A token to start the list. Use this token to get the next set of
-- results.
--
-- 'applicationId', 'listHostedConfigurationVersions_applicationId' - The application ID.
--
-- 'configurationProfileId', 'listHostedConfigurationVersions_configurationProfileId' - The configuration profile ID.
newListHostedConfigurationVersions ::
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'configurationProfileId'
  Prelude.Text ->
  ListHostedConfigurationVersions
newListHostedConfigurationVersions :: Text -> Text -> ListHostedConfigurationVersions
newListHostedConfigurationVersions
  Text
pApplicationId_
  Text
pConfigurationProfileId_ =
    ListHostedConfigurationVersions'
      { $sel:maxResults:ListHostedConfigurationVersions' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListHostedConfigurationVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:applicationId:ListHostedConfigurationVersions' :: Text
applicationId = Text
pApplicationId_,
        $sel:configurationProfileId:ListHostedConfigurationVersions' :: Text
configurationProfileId =
          Text
pConfigurationProfileId_
      }

-- | The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
listHostedConfigurationVersions_maxResults :: Lens.Lens' ListHostedConfigurationVersions (Prelude.Maybe Prelude.Natural)
listHostedConfigurationVersions_maxResults :: Lens' ListHostedConfigurationVersions (Maybe Natural)
listHostedConfigurationVersions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHostedConfigurationVersions
s@ListHostedConfigurationVersions' {} Maybe Natural
a -> ListHostedConfigurationVersions
s {$sel:maxResults:ListHostedConfigurationVersions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHostedConfigurationVersions)

-- | A token to start the list. Use this token to get the next set of
-- results.
listHostedConfigurationVersions_nextToken :: Lens.Lens' ListHostedConfigurationVersions (Prelude.Maybe Prelude.Text)
listHostedConfigurationVersions_nextToken :: Lens' ListHostedConfigurationVersions (Maybe Text)
listHostedConfigurationVersions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHostedConfigurationVersions
s@ListHostedConfigurationVersions' {} Maybe Text
a -> ListHostedConfigurationVersions
s {$sel:nextToken:ListHostedConfigurationVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListHostedConfigurationVersions)

-- | The application ID.
listHostedConfigurationVersions_applicationId :: Lens.Lens' ListHostedConfigurationVersions Prelude.Text
listHostedConfigurationVersions_applicationId :: Lens' ListHostedConfigurationVersions Text
listHostedConfigurationVersions_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersions' {Text
applicationId :: Text
$sel:applicationId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
applicationId} -> Text
applicationId) (\s :: ListHostedConfigurationVersions
s@ListHostedConfigurationVersions' {} Text
a -> ListHostedConfigurationVersions
s {$sel:applicationId:ListHostedConfigurationVersions' :: Text
applicationId = Text
a} :: ListHostedConfigurationVersions)

-- | The configuration profile ID.
listHostedConfigurationVersions_configurationProfileId :: Lens.Lens' ListHostedConfigurationVersions Prelude.Text
listHostedConfigurationVersions_configurationProfileId :: Lens' ListHostedConfigurationVersions Text
listHostedConfigurationVersions_configurationProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersions' {Text
configurationProfileId :: Text
$sel:configurationProfileId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
configurationProfileId} -> Text
configurationProfileId) (\s :: ListHostedConfigurationVersions
s@ListHostedConfigurationVersions' {} Text
a -> ListHostedConfigurationVersions
s {$sel:configurationProfileId:ListHostedConfigurationVersions' :: Text
configurationProfileId = Text
a} :: ListHostedConfigurationVersions)

instance
  Core.AWSRequest
    ListHostedConfigurationVersions
  where
  type
    AWSResponse ListHostedConfigurationVersions =
      ListHostedConfigurationVersionsResponse
  request :: (Service -> Service)
-> ListHostedConfigurationVersions
-> Request ListHostedConfigurationVersions
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 ListHostedConfigurationVersions
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListHostedConfigurationVersions)))
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 [HostedConfigurationVersionSummary]
-> Maybe Text -> Int -> ListHostedConfigurationVersionsResponse
ListHostedConfigurationVersionsResponse'
            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
"Items" 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
"NextToken")
            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
    ListHostedConfigurationVersions
  where
  hashWithSalt :: Int -> ListHostedConfigurationVersions -> Int
hashWithSalt
    Int
_salt
    ListHostedConfigurationVersions' {Maybe Natural
Maybe Text
Text
configurationProfileId :: Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:configurationProfileId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:applicationId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:nextToken:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Text
$sel:maxResults:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationProfileId

instance
  Prelude.NFData
    ListHostedConfigurationVersions
  where
  rnf :: ListHostedConfigurationVersions -> ()
rnf ListHostedConfigurationVersions' {Maybe Natural
Maybe Text
Text
configurationProfileId :: Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:configurationProfileId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:applicationId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:nextToken:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Text
$sel:maxResults:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
configurationProfileId

instance
  Data.ToHeaders
    ListHostedConfigurationVersions
  where
  toHeaders :: ListHostedConfigurationVersions -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath ListHostedConfigurationVersions where
  toPath :: ListHostedConfigurationVersions -> ByteString
toPath ListHostedConfigurationVersions' {Maybe Natural
Maybe Text
Text
configurationProfileId :: Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:configurationProfileId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:applicationId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:nextToken:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Text
$sel:maxResults:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/applications/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
applicationId,
        ByteString
"/configurationprofiles/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
configurationProfileId,
        ByteString
"/hostedconfigurationversions"
      ]

instance Data.ToQuery ListHostedConfigurationVersions where
  toQuery :: ListHostedConfigurationVersions -> QueryString
toQuery ListHostedConfigurationVersions' {Maybe Natural
Maybe Text
Text
configurationProfileId :: Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:configurationProfileId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:applicationId:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Text
$sel:nextToken:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Text
$sel:maxResults:ListHostedConfigurationVersions' :: ListHostedConfigurationVersions -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"max_results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"next_token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListHostedConfigurationVersionsResponse' smart constructor.
data ListHostedConfigurationVersionsResponse = ListHostedConfigurationVersionsResponse'
  { -- | The elements from this collection.
    ListHostedConfigurationVersionsResponse
-> Maybe [HostedConfigurationVersionSummary]
items :: Prelude.Maybe [HostedConfigurationVersionSummary],
    -- | The token for the next set of items to return. Use this token to get the
    -- next set of results.
    ListHostedConfigurationVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListHostedConfigurationVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListHostedConfigurationVersionsResponse
-> ListHostedConfigurationVersionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHostedConfigurationVersionsResponse
-> ListHostedConfigurationVersionsResponse -> Bool
$c/= :: ListHostedConfigurationVersionsResponse
-> ListHostedConfigurationVersionsResponse -> Bool
== :: ListHostedConfigurationVersionsResponse
-> ListHostedConfigurationVersionsResponse -> Bool
$c== :: ListHostedConfigurationVersionsResponse
-> ListHostedConfigurationVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListHostedConfigurationVersionsResponse]
ReadPrec ListHostedConfigurationVersionsResponse
Int -> ReadS ListHostedConfigurationVersionsResponse
ReadS [ListHostedConfigurationVersionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHostedConfigurationVersionsResponse]
$creadListPrec :: ReadPrec [ListHostedConfigurationVersionsResponse]
readPrec :: ReadPrec ListHostedConfigurationVersionsResponse
$creadPrec :: ReadPrec ListHostedConfigurationVersionsResponse
readList :: ReadS [ListHostedConfigurationVersionsResponse]
$creadList :: ReadS [ListHostedConfigurationVersionsResponse]
readsPrec :: Int -> ReadS ListHostedConfigurationVersionsResponse
$creadsPrec :: Int -> ReadS ListHostedConfigurationVersionsResponse
Prelude.Read, Int -> ListHostedConfigurationVersionsResponse -> ShowS
[ListHostedConfigurationVersionsResponse] -> ShowS
ListHostedConfigurationVersionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHostedConfigurationVersionsResponse] -> ShowS
$cshowList :: [ListHostedConfigurationVersionsResponse] -> ShowS
show :: ListHostedConfigurationVersionsResponse -> String
$cshow :: ListHostedConfigurationVersionsResponse -> String
showsPrec :: Int -> ListHostedConfigurationVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListHostedConfigurationVersionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListHostedConfigurationVersionsResponse x
-> ListHostedConfigurationVersionsResponse
forall x.
ListHostedConfigurationVersionsResponse
-> Rep ListHostedConfigurationVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHostedConfigurationVersionsResponse x
-> ListHostedConfigurationVersionsResponse
$cfrom :: forall x.
ListHostedConfigurationVersionsResponse
-> Rep ListHostedConfigurationVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHostedConfigurationVersionsResponse' 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', 'listHostedConfigurationVersionsResponse_items' - The elements from this collection.
--
-- 'nextToken', 'listHostedConfigurationVersionsResponse_nextToken' - The token for the next set of items to return. Use this token to get the
-- next set of results.
--
-- 'httpStatus', 'listHostedConfigurationVersionsResponse_httpStatus' - The response's http status code.
newListHostedConfigurationVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListHostedConfigurationVersionsResponse
newListHostedConfigurationVersionsResponse :: Int -> ListHostedConfigurationVersionsResponse
newListHostedConfigurationVersionsResponse
  Int
pHttpStatus_ =
    ListHostedConfigurationVersionsResponse'
      { $sel:items:ListHostedConfigurationVersionsResponse' :: Maybe [HostedConfigurationVersionSummary]
items =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListHostedConfigurationVersionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListHostedConfigurationVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The elements from this collection.
listHostedConfigurationVersionsResponse_items :: Lens.Lens' ListHostedConfigurationVersionsResponse (Prelude.Maybe [HostedConfigurationVersionSummary])
listHostedConfigurationVersionsResponse_items :: Lens'
  ListHostedConfigurationVersionsResponse
  (Maybe [HostedConfigurationVersionSummary])
listHostedConfigurationVersionsResponse_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersionsResponse' {Maybe [HostedConfigurationVersionSummary]
items :: Maybe [HostedConfigurationVersionSummary]
$sel:items:ListHostedConfigurationVersionsResponse' :: ListHostedConfigurationVersionsResponse
-> Maybe [HostedConfigurationVersionSummary]
items} -> Maybe [HostedConfigurationVersionSummary]
items) (\s :: ListHostedConfigurationVersionsResponse
s@ListHostedConfigurationVersionsResponse' {} Maybe [HostedConfigurationVersionSummary]
a -> ListHostedConfigurationVersionsResponse
s {$sel:items:ListHostedConfigurationVersionsResponse' :: Maybe [HostedConfigurationVersionSummary]
items = Maybe [HostedConfigurationVersionSummary]
a} :: ListHostedConfigurationVersionsResponse) 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

-- | The token for the next set of items to return. Use this token to get the
-- next set of results.
listHostedConfigurationVersionsResponse_nextToken :: Lens.Lens' ListHostedConfigurationVersionsResponse (Prelude.Maybe Prelude.Text)
listHostedConfigurationVersionsResponse_nextToken :: Lens' ListHostedConfigurationVersionsResponse (Maybe Text)
listHostedConfigurationVersionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedConfigurationVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHostedConfigurationVersionsResponse' :: ListHostedConfigurationVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHostedConfigurationVersionsResponse
s@ListHostedConfigurationVersionsResponse' {} Maybe Text
a -> ListHostedConfigurationVersionsResponse
s {$sel:nextToken:ListHostedConfigurationVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHostedConfigurationVersionsResponse)

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

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