{-# 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.AppRunner.ListAutoScalingConfigurations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of active App Runner automatic scaling configurations in
-- your Amazon Web Services account. You can query the revisions for a
-- specific configuration name or the revisions for all active
-- configurations in your account. You can optionally query only the latest
-- revision of each requested name.
--
-- To retrieve a full description of a particular configuration revision,
-- call and provide one of the ARNs returned by
-- @ListAutoScalingConfigurations@.
module Amazonka.AppRunner.ListAutoScalingConfigurations
  ( -- * Creating a Request
    ListAutoScalingConfigurations (..),
    newListAutoScalingConfigurations,

    -- * Request Lenses
    listAutoScalingConfigurations_autoScalingConfigurationName,
    listAutoScalingConfigurations_latestOnly,
    listAutoScalingConfigurations_maxResults,
    listAutoScalingConfigurations_nextToken,

    -- * Destructuring the Response
    ListAutoScalingConfigurationsResponse (..),
    newListAutoScalingConfigurationsResponse,

    -- * Response Lenses
    listAutoScalingConfigurationsResponse_nextToken,
    listAutoScalingConfigurationsResponse_httpStatus,
    listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList,
  )
where

import Amazonka.AppRunner.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:/ 'newListAutoScalingConfigurations' smart constructor.
data ListAutoScalingConfigurations = ListAutoScalingConfigurations'
  { -- | The name of the App Runner auto scaling configuration that you want to
    -- list. If specified, App Runner lists revisions that share this name. If
    -- not specified, App Runner returns revisions of all active
    -- configurations.
    ListAutoScalingConfigurations -> Maybe Text
autoScalingConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ to list only the latest revision for each requested
    -- configuration name.
    --
    -- Set to @false@ to list all revisions for each requested configuration
    -- name.
    --
    -- Default: @true@
    ListAutoScalingConfigurations -> Maybe Bool
latestOnly :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results to include in each response (result page).
    -- It\'s used for a paginated request.
    --
    -- If you don\'t specify @MaxResults@, the request retrieves all available
    -- results in a single response.
    ListAutoScalingConfigurations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token from a previous result page. It\'s used for a paginated request.
    -- The request retrieves the next result page. All other parameter values
    -- must be identical to the ones that are specified in the initial request.
    --
    -- If you don\'t specify @NextToken@, the request retrieves the first
    -- result page.
    ListAutoScalingConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
$c/= :: ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
== :: ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
$c== :: ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
Prelude.Eq, ReadPrec [ListAutoScalingConfigurations]
ReadPrec ListAutoScalingConfigurations
Int -> ReadS ListAutoScalingConfigurations
ReadS [ListAutoScalingConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAutoScalingConfigurations]
$creadListPrec :: ReadPrec [ListAutoScalingConfigurations]
readPrec :: ReadPrec ListAutoScalingConfigurations
$creadPrec :: ReadPrec ListAutoScalingConfigurations
readList :: ReadS [ListAutoScalingConfigurations]
$creadList :: ReadS [ListAutoScalingConfigurations]
readsPrec :: Int -> ReadS ListAutoScalingConfigurations
$creadsPrec :: Int -> ReadS ListAutoScalingConfigurations
Prelude.Read, Int -> ListAutoScalingConfigurations -> ShowS
[ListAutoScalingConfigurations] -> ShowS
ListAutoScalingConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAutoScalingConfigurations] -> ShowS
$cshowList :: [ListAutoScalingConfigurations] -> ShowS
show :: ListAutoScalingConfigurations -> String
$cshow :: ListAutoScalingConfigurations -> String
showsPrec :: Int -> ListAutoScalingConfigurations -> ShowS
$cshowsPrec :: Int -> ListAutoScalingConfigurations -> ShowS
Prelude.Show, forall x.
Rep ListAutoScalingConfigurations x
-> ListAutoScalingConfigurations
forall x.
ListAutoScalingConfigurations
-> Rep ListAutoScalingConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAutoScalingConfigurations x
-> ListAutoScalingConfigurations
$cfrom :: forall x.
ListAutoScalingConfigurations
-> Rep ListAutoScalingConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListAutoScalingConfigurations' 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:
--
-- 'autoScalingConfigurationName', 'listAutoScalingConfigurations_autoScalingConfigurationName' - The name of the App Runner auto scaling configuration that you want to
-- list. If specified, App Runner lists revisions that share this name. If
-- not specified, App Runner returns revisions of all active
-- configurations.
--
-- 'latestOnly', 'listAutoScalingConfigurations_latestOnly' - Set to @true@ to list only the latest revision for each requested
-- configuration name.
--
-- Set to @false@ to list all revisions for each requested configuration
-- name.
--
-- Default: @true@
--
-- 'maxResults', 'listAutoScalingConfigurations_maxResults' - The maximum number of results to include in each response (result page).
-- It\'s used for a paginated request.
--
-- If you don\'t specify @MaxResults@, the request retrieves all available
-- results in a single response.
--
-- 'nextToken', 'listAutoScalingConfigurations_nextToken' - A token from a previous result page. It\'s used for a paginated request.
-- The request retrieves the next result page. All other parameter values
-- must be identical to the ones that are specified in the initial request.
--
-- If you don\'t specify @NextToken@, the request retrieves the first
-- result page.
newListAutoScalingConfigurations ::
  ListAutoScalingConfigurations
newListAutoScalingConfigurations :: ListAutoScalingConfigurations
newListAutoScalingConfigurations =
  ListAutoScalingConfigurations'
    { $sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: Maybe Text
autoScalingConfigurationName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:latestOnly:ListAutoScalingConfigurations' :: Maybe Bool
latestOnly = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListAutoScalingConfigurations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAutoScalingConfigurations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the App Runner auto scaling configuration that you want to
-- list. If specified, App Runner lists revisions that share this name. If
-- not specified, App Runner returns revisions of all active
-- configurations.
listAutoScalingConfigurations_autoScalingConfigurationName :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Text)
listAutoScalingConfigurations_autoScalingConfigurationName :: Lens' ListAutoScalingConfigurations (Maybe Text)
listAutoScalingConfigurations_autoScalingConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurations' {Maybe Text
autoScalingConfigurationName :: Maybe Text
$sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
autoScalingConfigurationName} -> Maybe Text
autoScalingConfigurationName) (\s :: ListAutoScalingConfigurations
s@ListAutoScalingConfigurations' {} Maybe Text
a -> ListAutoScalingConfigurations
s {$sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: Maybe Text
autoScalingConfigurationName = Maybe Text
a} :: ListAutoScalingConfigurations)

-- | Set to @true@ to list only the latest revision for each requested
-- configuration name.
--
-- Set to @false@ to list all revisions for each requested configuration
-- name.
--
-- Default: @true@
listAutoScalingConfigurations_latestOnly :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Bool)
listAutoScalingConfigurations_latestOnly :: Lens' ListAutoScalingConfigurations (Maybe Bool)
listAutoScalingConfigurations_latestOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurations' {Maybe Bool
latestOnly :: Maybe Bool
$sel:latestOnly:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Bool
latestOnly} -> Maybe Bool
latestOnly) (\s :: ListAutoScalingConfigurations
s@ListAutoScalingConfigurations' {} Maybe Bool
a -> ListAutoScalingConfigurations
s {$sel:latestOnly:ListAutoScalingConfigurations' :: Maybe Bool
latestOnly = Maybe Bool
a} :: ListAutoScalingConfigurations)

-- | The maximum number of results to include in each response (result page).
-- It\'s used for a paginated request.
--
-- If you don\'t specify @MaxResults@, the request retrieves all available
-- results in a single response.
listAutoScalingConfigurations_maxResults :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Natural)
listAutoScalingConfigurations_maxResults :: Lens' ListAutoScalingConfigurations (Maybe Natural)
listAutoScalingConfigurations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAutoScalingConfigurations
s@ListAutoScalingConfigurations' {} Maybe Natural
a -> ListAutoScalingConfigurations
s {$sel:maxResults:ListAutoScalingConfigurations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAutoScalingConfigurations)

-- | A token from a previous result page. It\'s used for a paginated request.
-- The request retrieves the next result page. All other parameter values
-- must be identical to the ones that are specified in the initial request.
--
-- If you don\'t specify @NextToken@, the request retrieves the first
-- result page.
listAutoScalingConfigurations_nextToken :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Text)
listAutoScalingConfigurations_nextToken :: Lens' ListAutoScalingConfigurations (Maybe Text)
listAutoScalingConfigurations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAutoScalingConfigurations
s@ListAutoScalingConfigurations' {} Maybe Text
a -> ListAutoScalingConfigurations
s {$sel:nextToken:ListAutoScalingConfigurations' :: Maybe Text
nextToken = Maybe Text
a} :: ListAutoScalingConfigurations)

instance
  Core.AWSRequest
    ListAutoScalingConfigurations
  where
  type
    AWSResponse ListAutoScalingConfigurations =
      ListAutoScalingConfigurationsResponse
  request :: (Service -> Service)
-> ListAutoScalingConfigurations
-> Request ListAutoScalingConfigurations
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAutoScalingConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAutoScalingConfigurations)))
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 Text
-> Int
-> [AutoScalingConfigurationSummary]
-> ListAutoScalingConfigurationsResponse
ListAutoScalingConfigurationsResponse'
            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
"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))
            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
"AutoScalingConfigurationSummaryList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    ListAutoScalingConfigurations
  where
  hashWithSalt :: Int -> ListAutoScalingConfigurations -> Int
hashWithSalt Int
_salt ListAutoScalingConfigurations' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
latestOnly :: Maybe Bool
autoScalingConfigurationName :: Maybe Text
$sel:nextToken:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
$sel:maxResults:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Natural
$sel:latestOnly:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Bool
$sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
autoScalingConfigurationName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
latestOnly
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListAutoScalingConfigurations where
  rnf :: ListAutoScalingConfigurations -> ()
rnf ListAutoScalingConfigurations' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
latestOnly :: Maybe Bool
autoScalingConfigurationName :: Maybe Text
$sel:nextToken:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
$sel:maxResults:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Natural
$sel:latestOnly:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Bool
$sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
autoScalingConfigurationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
latestOnly
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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

instance Data.ToHeaders ListAutoScalingConfigurations where
  toHeaders :: ListAutoScalingConfigurations -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AppRunner.ListAutoScalingConfigurations" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListAutoScalingConfigurations where
  toJSON :: ListAutoScalingConfigurations -> Value
toJSON ListAutoScalingConfigurations' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
latestOnly :: Maybe Bool
autoScalingConfigurationName :: Maybe Text
$sel:nextToken:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
$sel:maxResults:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Natural
$sel:latestOnly:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Bool
$sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: ListAutoScalingConfigurations -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AutoScalingConfigurationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
autoScalingConfigurationName,
            (Key
"LatestOnly" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
latestOnly,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

instance Data.ToPath ListAutoScalingConfigurations where
  toPath :: ListAutoScalingConfigurations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery ListAutoScalingConfigurations where
  toQuery :: ListAutoScalingConfigurations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListAutoScalingConfigurationsResponse' smart constructor.
data ListAutoScalingConfigurationsResponse = ListAutoScalingConfigurationsResponse'
  { -- | The token that you can pass in a subsequent request to get the next
    -- result page. It\'s returned in a paginated request.
    ListAutoScalingConfigurationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAutoScalingConfigurationsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of summary information records for auto scaling configurations.
    -- In a paginated request, the request returns up to @MaxResults@ records
    -- for each call.
    ListAutoScalingConfigurationsResponse
-> [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList :: [AutoScalingConfigurationSummary]
  }
  deriving (ListAutoScalingConfigurationsResponse
-> ListAutoScalingConfigurationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAutoScalingConfigurationsResponse
-> ListAutoScalingConfigurationsResponse -> Bool
$c/= :: ListAutoScalingConfigurationsResponse
-> ListAutoScalingConfigurationsResponse -> Bool
== :: ListAutoScalingConfigurationsResponse
-> ListAutoScalingConfigurationsResponse -> Bool
$c== :: ListAutoScalingConfigurationsResponse
-> ListAutoScalingConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListAutoScalingConfigurationsResponse]
ReadPrec ListAutoScalingConfigurationsResponse
Int -> ReadS ListAutoScalingConfigurationsResponse
ReadS [ListAutoScalingConfigurationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAutoScalingConfigurationsResponse]
$creadListPrec :: ReadPrec [ListAutoScalingConfigurationsResponse]
readPrec :: ReadPrec ListAutoScalingConfigurationsResponse
$creadPrec :: ReadPrec ListAutoScalingConfigurationsResponse
readList :: ReadS [ListAutoScalingConfigurationsResponse]
$creadList :: ReadS [ListAutoScalingConfigurationsResponse]
readsPrec :: Int -> ReadS ListAutoScalingConfigurationsResponse
$creadsPrec :: Int -> ReadS ListAutoScalingConfigurationsResponse
Prelude.Read, Int -> ListAutoScalingConfigurationsResponse -> ShowS
[ListAutoScalingConfigurationsResponse] -> ShowS
ListAutoScalingConfigurationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAutoScalingConfigurationsResponse] -> ShowS
$cshowList :: [ListAutoScalingConfigurationsResponse] -> ShowS
show :: ListAutoScalingConfigurationsResponse -> String
$cshow :: ListAutoScalingConfigurationsResponse -> String
showsPrec :: Int -> ListAutoScalingConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListAutoScalingConfigurationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAutoScalingConfigurationsResponse x
-> ListAutoScalingConfigurationsResponse
forall x.
ListAutoScalingConfigurationsResponse
-> Rep ListAutoScalingConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAutoScalingConfigurationsResponse x
-> ListAutoScalingConfigurationsResponse
$cfrom :: forall x.
ListAutoScalingConfigurationsResponse
-> Rep ListAutoScalingConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAutoScalingConfigurationsResponse' 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:
--
-- 'nextToken', 'listAutoScalingConfigurationsResponse_nextToken' - The token that you can pass in a subsequent request to get the next
-- result page. It\'s returned in a paginated request.
--
-- 'httpStatus', 'listAutoScalingConfigurationsResponse_httpStatus' - The response's http status code.
--
-- 'autoScalingConfigurationSummaryList', 'listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList' - A list of summary information records for auto scaling configurations.
-- In a paginated request, the request returns up to @MaxResults@ records
-- for each call.
newListAutoScalingConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAutoScalingConfigurationsResponse
newListAutoScalingConfigurationsResponse :: Int -> ListAutoScalingConfigurationsResponse
newListAutoScalingConfigurationsResponse Int
pHttpStatus_ =
  ListAutoScalingConfigurationsResponse'
    { $sel:nextToken:ListAutoScalingConfigurationsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAutoScalingConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:autoScalingConfigurationSummaryList:ListAutoScalingConfigurationsResponse' :: [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList =
        forall a. Monoid a => a
Prelude.mempty
    }

-- | The token that you can pass in a subsequent request to get the next
-- result page. It\'s returned in a paginated request.
listAutoScalingConfigurationsResponse_nextToken :: Lens.Lens' ListAutoScalingConfigurationsResponse (Prelude.Maybe Prelude.Text)
listAutoScalingConfigurationsResponse_nextToken :: Lens' ListAutoScalingConfigurationsResponse (Maybe Text)
listAutoScalingConfigurationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAutoScalingConfigurationsResponse' :: ListAutoScalingConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAutoScalingConfigurationsResponse
s@ListAutoScalingConfigurationsResponse' {} Maybe Text
a -> ListAutoScalingConfigurationsResponse
s {$sel:nextToken:ListAutoScalingConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAutoScalingConfigurationsResponse)

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

-- | A list of summary information records for auto scaling configurations.
-- In a paginated request, the request returns up to @MaxResults@ records
-- for each call.
listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList :: Lens.Lens' ListAutoScalingConfigurationsResponse [AutoScalingConfigurationSummary]
listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList :: Lens'
  ListAutoScalingConfigurationsResponse
  [AutoScalingConfigurationSummary]
listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAutoScalingConfigurationsResponse' {[AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList :: [AutoScalingConfigurationSummary]
$sel:autoScalingConfigurationSummaryList:ListAutoScalingConfigurationsResponse' :: ListAutoScalingConfigurationsResponse
-> [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList} -> [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList) (\s :: ListAutoScalingConfigurationsResponse
s@ListAutoScalingConfigurationsResponse' {} [AutoScalingConfigurationSummary]
a -> ListAutoScalingConfigurationsResponse
s {$sel:autoScalingConfigurationSummaryList:ListAutoScalingConfigurationsResponse' :: [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList = [AutoScalingConfigurationSummary]
a} :: ListAutoScalingConfigurationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListAutoScalingConfigurationsResponse
  where
  rnf :: ListAutoScalingConfigurationsResponse -> ()
rnf ListAutoScalingConfigurationsResponse' {Int
[AutoScalingConfigurationSummary]
Maybe Text
autoScalingConfigurationSummaryList :: [AutoScalingConfigurationSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:autoScalingConfigurationSummaryList:ListAutoScalingConfigurationsResponse' :: ListAutoScalingConfigurationsResponse
-> [AutoScalingConfigurationSummary]
$sel:httpStatus:ListAutoScalingConfigurationsResponse' :: ListAutoScalingConfigurationsResponse -> Int
$sel:nextToken:ListAutoScalingConfigurationsResponse' :: ListAutoScalingConfigurationsResponse -> Maybe Text
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList