{-# 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-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)
--
-- Returns a list of 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 configurations in your
-- account. You can optionally query only the latest revision of each
-- requested name.
module Amazonka.AppRunner.ListAutoScalingConfigurations
  ( -- * Creating a Request
    ListAutoScalingConfigurations (..),
    newListAutoScalingConfigurations,

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

    -- * 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.Lens as Lens
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 configurations.
    ListAutoScalingConfigurations -> Maybe Text
autoScalingConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | Set to @true@ to list only the latest revision for each requested
    -- configuration name.
    --
    -- Keep as @false@ to list all revisions for each requested configuration
    -- name.
    --
    -- Default: @false@
    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
  }
  deriving (ListAutoScalingConfigurations
-> ListAutoScalingConfigurations -> Bool
(ListAutoScalingConfigurations
 -> ListAutoScalingConfigurations -> Bool)
-> (ListAutoScalingConfigurations
    -> ListAutoScalingConfigurations -> Bool)
-> Eq ListAutoScalingConfigurations
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]
(Int -> ReadS ListAutoScalingConfigurations)
-> ReadS [ListAutoScalingConfigurations]
-> ReadPrec ListAutoScalingConfigurations
-> ReadPrec [ListAutoScalingConfigurations]
-> Read 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
(Int -> ListAutoScalingConfigurations -> ShowS)
-> (ListAutoScalingConfigurations -> String)
-> ([ListAutoScalingConfigurations] -> ShowS)
-> Show ListAutoScalingConfigurations
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.
 ListAutoScalingConfigurations
 -> Rep ListAutoScalingConfigurations x)
-> (forall x.
    Rep ListAutoScalingConfigurations x
    -> ListAutoScalingConfigurations)
-> Generic ListAutoScalingConfigurations
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 configurations.
--
-- '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.
--
-- 'latestOnly', 'listAutoScalingConfigurations_latestOnly' - Set to @true@ to list only the latest revision for each requested
-- configuration name.
--
-- Keep as @false@ to list all revisions for each requested configuration
-- name.
--
-- Default: @false@
--
-- '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.
newListAutoScalingConfigurations ::
  ListAutoScalingConfigurations
newListAutoScalingConfigurations :: ListAutoScalingConfigurations
newListAutoScalingConfigurations =
  ListAutoScalingConfigurations' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Natural
-> ListAutoScalingConfigurations
ListAutoScalingConfigurations'
    { $sel:autoScalingConfigurationName:ListAutoScalingConfigurations' :: Maybe Text
autoScalingConfigurationName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAutoScalingConfigurations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestOnly:ListAutoScalingConfigurations' :: Maybe Bool
latestOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListAutoScalingConfigurations' :: Maybe Natural
maxResults = Maybe Natural
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 configurations.
listAutoScalingConfigurations_autoScalingConfigurationName :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Text)
listAutoScalingConfigurations_autoScalingConfigurationName :: (Maybe Text -> f (Maybe Text))
-> ListAutoScalingConfigurations -> f ListAutoScalingConfigurations
listAutoScalingConfigurations_autoScalingConfigurationName = (ListAutoScalingConfigurations -> Maybe Text)
-> (ListAutoScalingConfigurations
    -> Maybe Text -> ListAutoScalingConfigurations)
-> Lens
     ListAutoScalingConfigurations
     ListAutoScalingConfigurations
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListAutoScalingConfigurations -> f ListAutoScalingConfigurations
listAutoScalingConfigurations_nextToken = (ListAutoScalingConfigurations -> Maybe Text)
-> (ListAutoScalingConfigurations
    -> Maybe Text -> ListAutoScalingConfigurations)
-> Lens
     ListAutoScalingConfigurations
     ListAutoScalingConfigurations
     (Maybe Text)
     (Maybe Text)
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)

-- | Set to @true@ to list only the latest revision for each requested
-- configuration name.
--
-- Keep as @false@ to list all revisions for each requested configuration
-- name.
--
-- Default: @false@
listAutoScalingConfigurations_latestOnly :: Lens.Lens' ListAutoScalingConfigurations (Prelude.Maybe Prelude.Bool)
listAutoScalingConfigurations_latestOnly :: (Maybe Bool -> f (Maybe Bool))
-> ListAutoScalingConfigurations -> f ListAutoScalingConfigurations
listAutoScalingConfigurations_latestOnly = (ListAutoScalingConfigurations -> Maybe Bool)
-> (ListAutoScalingConfigurations
    -> Maybe Bool -> ListAutoScalingConfigurations)
-> Lens
     ListAutoScalingConfigurations
     ListAutoScalingConfigurations
     (Maybe Bool)
     (Maybe Bool)
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 :: (Maybe Natural -> f (Maybe Natural))
-> ListAutoScalingConfigurations -> f ListAutoScalingConfigurations
listAutoScalingConfigurations_maxResults = (ListAutoScalingConfigurations -> Maybe Natural)
-> (ListAutoScalingConfigurations
    -> Maybe Natural -> ListAutoScalingConfigurations)
-> Lens
     ListAutoScalingConfigurations
     ListAutoScalingConfigurations
     (Maybe Natural)
     (Maybe Natural)
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)

instance
  Core.AWSRequest
    ListAutoScalingConfigurations
  where
  type
    AWSResponse ListAutoScalingConfigurations =
      ListAutoScalingConfigurationsResponse
  request :: ListAutoScalingConfigurations
-> Request ListAutoScalingConfigurations
request = Service
-> ListAutoScalingConfigurations
-> Request ListAutoScalingConfigurations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListAutoScalingConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAutoScalingConfigurations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListAutoScalingConfigurations))
-> Logger
-> Service
-> Proxy ListAutoScalingConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAutoScalingConfigurations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> 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'
            (Maybe Text
 -> Int
 -> [AutoScalingConfigurationSummary]
 -> ListAutoScalingConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [AutoScalingConfigurationSummary]
      -> ListAutoScalingConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Int
   -> [AutoScalingConfigurationSummary]
   -> ListAutoScalingConfigurationsResponse)
-> Either String Int
-> Either
     String
     ([AutoScalingConfigurationSummary]
      -> ListAutoScalingConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([AutoScalingConfigurationSummary]
   -> ListAutoScalingConfigurationsResponse)
-> Either String [AutoScalingConfigurationSummary]
-> Either String ListAutoScalingConfigurationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe [AutoScalingConfigurationSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AutoScalingConfigurationSummaryList"
                            Either String (Maybe [AutoScalingConfigurationSummary])
-> [AutoScalingConfigurationSummary]
-> Either String [AutoScalingConfigurationSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [AutoScalingConfigurationSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    ListAutoScalingConfigurations

instance Prelude.NFData ListAutoScalingConfigurations

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

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

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

instance Core.ToQuery ListAutoScalingConfigurations where
  toQuery :: ListAutoScalingConfigurations -> QueryString
toQuery = QueryString -> ListAutoScalingConfigurations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(ListAutoScalingConfigurationsResponse
 -> ListAutoScalingConfigurationsResponse -> Bool)
-> (ListAutoScalingConfigurationsResponse
    -> ListAutoScalingConfigurationsResponse -> Bool)
-> Eq ListAutoScalingConfigurationsResponse
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]
(Int -> ReadS ListAutoScalingConfigurationsResponse)
-> ReadS [ListAutoScalingConfigurationsResponse]
-> ReadPrec ListAutoScalingConfigurationsResponse
-> ReadPrec [ListAutoScalingConfigurationsResponse]
-> Read 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
(Int -> ListAutoScalingConfigurationsResponse -> ShowS)
-> (ListAutoScalingConfigurationsResponse -> String)
-> ([ListAutoScalingConfigurationsResponse] -> ShowS)
-> Show ListAutoScalingConfigurationsResponse
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.
 ListAutoScalingConfigurationsResponse
 -> Rep ListAutoScalingConfigurationsResponse x)
-> (forall x.
    Rep ListAutoScalingConfigurationsResponse x
    -> ListAutoScalingConfigurationsResponse)
-> Generic ListAutoScalingConfigurationsResponse
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' :: Maybe Text
-> Int
-> [AutoScalingConfigurationSummary]
-> ListAutoScalingConfigurationsResponse
ListAutoScalingConfigurationsResponse'
    { $sel:nextToken:ListAutoScalingConfigurationsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAutoScalingConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:autoScalingConfigurationSummaryList:ListAutoScalingConfigurationsResponse' :: [AutoScalingConfigurationSummary]
autoScalingConfigurationSummaryList =
        [AutoScalingConfigurationSummary]
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 :: (Maybe Text -> f (Maybe Text))
-> ListAutoScalingConfigurationsResponse
-> f ListAutoScalingConfigurationsResponse
listAutoScalingConfigurationsResponse_nextToken = (ListAutoScalingConfigurationsResponse -> Maybe Text)
-> (ListAutoScalingConfigurationsResponse
    -> Maybe Text -> ListAutoScalingConfigurationsResponse)
-> Lens
     ListAutoScalingConfigurationsResponse
     ListAutoScalingConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Int -> f Int)
-> ListAutoScalingConfigurationsResponse
-> f ListAutoScalingConfigurationsResponse
listAutoScalingConfigurationsResponse_httpStatus = (ListAutoScalingConfigurationsResponse -> Int)
-> (ListAutoScalingConfigurationsResponse
    -> Int -> ListAutoScalingConfigurationsResponse)
-> Lens
     ListAutoScalingConfigurationsResponse
     ListAutoScalingConfigurationsResponse
     Int
     Int
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 :: ([AutoScalingConfigurationSummary]
 -> f [AutoScalingConfigurationSummary])
-> ListAutoScalingConfigurationsResponse
-> f ListAutoScalingConfigurationsResponse
listAutoScalingConfigurationsResponse_autoScalingConfigurationSummaryList = (ListAutoScalingConfigurationsResponse
 -> [AutoScalingConfigurationSummary])
-> (ListAutoScalingConfigurationsResponse
    -> [AutoScalingConfigurationSummary]
    -> ListAutoScalingConfigurationsResponse)
-> Lens
     ListAutoScalingConfigurationsResponse
     ListAutoScalingConfigurationsResponse
     [AutoScalingConfigurationSummary]
     [AutoScalingConfigurationSummary]
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) (([AutoScalingConfigurationSummary]
  -> f [AutoScalingConfigurationSummary])
 -> ListAutoScalingConfigurationsResponse
 -> f ListAutoScalingConfigurationsResponse)
-> (([AutoScalingConfigurationSummary]
     -> f [AutoScalingConfigurationSummary])
    -> [AutoScalingConfigurationSummary]
    -> f [AutoScalingConfigurationSummary])
-> ([AutoScalingConfigurationSummary]
    -> f [AutoScalingConfigurationSummary])
-> ListAutoScalingConfigurationsResponse
-> f ListAutoScalingConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AutoScalingConfigurationSummary]
 -> f [AutoScalingConfigurationSummary])
-> [AutoScalingConfigurationSummary]
-> f [AutoScalingConfigurationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListAutoScalingConfigurationsResponse