{-# 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.ImageBuilder.ListInfrastructureConfigurations
-- 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 infrastructure configurations.
module Amazonka.ImageBuilder.ListInfrastructureConfigurations
  ( -- * Creating a Request
    ListInfrastructureConfigurations (..),
    newListInfrastructureConfigurations,

    -- * Request Lenses
    listInfrastructureConfigurations_filters,
    listInfrastructureConfigurations_nextToken,
    listInfrastructureConfigurations_maxResults,

    -- * Destructuring the Response
    ListInfrastructureConfigurationsResponse (..),
    newListInfrastructureConfigurationsResponse,

    -- * Response Lenses
    listInfrastructureConfigurationsResponse_requestId,
    listInfrastructureConfigurationsResponse_infrastructureConfigurationSummaryList,
    listInfrastructureConfigurationsResponse_nextToken,
    listInfrastructureConfigurationsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types
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:/ 'newListInfrastructureConfigurations' smart constructor.
data ListInfrastructureConfigurations = ListInfrastructureConfigurations'
  { -- | You can filter on @name@ to streamline results.
    ListInfrastructureConfigurations -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | A token to specify where to start paginating. This is the NextToken from
    -- a previously truncated response.
    ListInfrastructureConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum items to return in a request.
    ListInfrastructureConfigurations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListInfrastructureConfigurations
-> ListInfrastructureConfigurations -> Bool
(ListInfrastructureConfigurations
 -> ListInfrastructureConfigurations -> Bool)
-> (ListInfrastructureConfigurations
    -> ListInfrastructureConfigurations -> Bool)
-> Eq ListInfrastructureConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInfrastructureConfigurations
-> ListInfrastructureConfigurations -> Bool
$c/= :: ListInfrastructureConfigurations
-> ListInfrastructureConfigurations -> Bool
== :: ListInfrastructureConfigurations
-> ListInfrastructureConfigurations -> Bool
$c== :: ListInfrastructureConfigurations
-> ListInfrastructureConfigurations -> Bool
Prelude.Eq, ReadPrec [ListInfrastructureConfigurations]
ReadPrec ListInfrastructureConfigurations
Int -> ReadS ListInfrastructureConfigurations
ReadS [ListInfrastructureConfigurations]
(Int -> ReadS ListInfrastructureConfigurations)
-> ReadS [ListInfrastructureConfigurations]
-> ReadPrec ListInfrastructureConfigurations
-> ReadPrec [ListInfrastructureConfigurations]
-> Read ListInfrastructureConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInfrastructureConfigurations]
$creadListPrec :: ReadPrec [ListInfrastructureConfigurations]
readPrec :: ReadPrec ListInfrastructureConfigurations
$creadPrec :: ReadPrec ListInfrastructureConfigurations
readList :: ReadS [ListInfrastructureConfigurations]
$creadList :: ReadS [ListInfrastructureConfigurations]
readsPrec :: Int -> ReadS ListInfrastructureConfigurations
$creadsPrec :: Int -> ReadS ListInfrastructureConfigurations
Prelude.Read, Int -> ListInfrastructureConfigurations -> ShowS
[ListInfrastructureConfigurations] -> ShowS
ListInfrastructureConfigurations -> String
(Int -> ListInfrastructureConfigurations -> ShowS)
-> (ListInfrastructureConfigurations -> String)
-> ([ListInfrastructureConfigurations] -> ShowS)
-> Show ListInfrastructureConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInfrastructureConfigurations] -> ShowS
$cshowList :: [ListInfrastructureConfigurations] -> ShowS
show :: ListInfrastructureConfigurations -> String
$cshow :: ListInfrastructureConfigurations -> String
showsPrec :: Int -> ListInfrastructureConfigurations -> ShowS
$cshowsPrec :: Int -> ListInfrastructureConfigurations -> ShowS
Prelude.Show, (forall x.
 ListInfrastructureConfigurations
 -> Rep ListInfrastructureConfigurations x)
-> (forall x.
    Rep ListInfrastructureConfigurations x
    -> ListInfrastructureConfigurations)
-> Generic ListInfrastructureConfigurations
forall x.
Rep ListInfrastructureConfigurations x
-> ListInfrastructureConfigurations
forall x.
ListInfrastructureConfigurations
-> Rep ListInfrastructureConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInfrastructureConfigurations x
-> ListInfrastructureConfigurations
$cfrom :: forall x.
ListInfrastructureConfigurations
-> Rep ListInfrastructureConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListInfrastructureConfigurations' 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:
--
-- 'filters', 'listInfrastructureConfigurations_filters' - You can filter on @name@ to streamline results.
--
-- 'nextToken', 'listInfrastructureConfigurations_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'maxResults', 'listInfrastructureConfigurations_maxResults' - The maximum items to return in a request.
newListInfrastructureConfigurations ::
  ListInfrastructureConfigurations
newListInfrastructureConfigurations :: ListInfrastructureConfigurations
newListInfrastructureConfigurations =
  ListInfrastructureConfigurations' :: Maybe (NonEmpty Filter)
-> Maybe Text -> Maybe Natural -> ListInfrastructureConfigurations
ListInfrastructureConfigurations'
    { $sel:filters:ListInfrastructureConfigurations' :: Maybe (NonEmpty Filter)
filters =
        Maybe (NonEmpty Filter)
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListInfrastructureConfigurations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListInfrastructureConfigurations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | You can filter on @name@ to streamline results.
listInfrastructureConfigurations_filters :: Lens.Lens' ListInfrastructureConfigurations (Prelude.Maybe (Prelude.NonEmpty Filter))
listInfrastructureConfigurations_filters :: (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListInfrastructureConfigurations
-> f ListInfrastructureConfigurations
listInfrastructureConfigurations_filters = (ListInfrastructureConfigurations -> Maybe (NonEmpty Filter))
-> (ListInfrastructureConfigurations
    -> Maybe (NonEmpty Filter) -> ListInfrastructureConfigurations)
-> Lens
     ListInfrastructureConfigurations
     ListInfrastructureConfigurations
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurations' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListInfrastructureConfigurations
s@ListInfrastructureConfigurations' {} Maybe (NonEmpty Filter)
a -> ListInfrastructureConfigurations
s {$sel:filters:ListInfrastructureConfigurations' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListInfrastructureConfigurations) ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
 -> ListInfrastructureConfigurations
 -> f ListInfrastructureConfigurations)
-> ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
    -> Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListInfrastructureConfigurations
-> f ListInfrastructureConfigurations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
-> Iso
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
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 AnIso
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
listInfrastructureConfigurations_nextToken :: Lens.Lens' ListInfrastructureConfigurations (Prelude.Maybe Prelude.Text)
listInfrastructureConfigurations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListInfrastructureConfigurations
-> f ListInfrastructureConfigurations
listInfrastructureConfigurations_nextToken = (ListInfrastructureConfigurations -> Maybe Text)
-> (ListInfrastructureConfigurations
    -> Maybe Text -> ListInfrastructureConfigurations)
-> Lens
     ListInfrastructureConfigurations
     ListInfrastructureConfigurations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInfrastructureConfigurations
s@ListInfrastructureConfigurations' {} Maybe Text
a -> ListInfrastructureConfigurations
s {$sel:nextToken:ListInfrastructureConfigurations' :: Maybe Text
nextToken = Maybe Text
a} :: ListInfrastructureConfigurations)

-- | The maximum items to return in a request.
listInfrastructureConfigurations_maxResults :: Lens.Lens' ListInfrastructureConfigurations (Prelude.Maybe Prelude.Natural)
listInfrastructureConfigurations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListInfrastructureConfigurations
-> f ListInfrastructureConfigurations
listInfrastructureConfigurations_maxResults = (ListInfrastructureConfigurations -> Maybe Natural)
-> (ListInfrastructureConfigurations
    -> Maybe Natural -> ListInfrastructureConfigurations)
-> Lens
     ListInfrastructureConfigurations
     ListInfrastructureConfigurations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListInfrastructureConfigurations
s@ListInfrastructureConfigurations' {} Maybe Natural
a -> ListInfrastructureConfigurations
s {$sel:maxResults:ListInfrastructureConfigurations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListInfrastructureConfigurations)

instance
  Core.AWSRequest
    ListInfrastructureConfigurations
  where
  type
    AWSResponse ListInfrastructureConfigurations =
      ListInfrastructureConfigurationsResponse
  request :: ListInfrastructureConfigurations
-> Request ListInfrastructureConfigurations
request = Service
-> ListInfrastructureConfigurations
-> Request ListInfrastructureConfigurations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListInfrastructureConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListInfrastructureConfigurations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListInfrastructureConfigurations))
-> Logger
-> Service
-> Proxy ListInfrastructureConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListInfrastructureConfigurations)))
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
-> Maybe [InfrastructureConfigurationSummary]
-> Maybe Text
-> Int
-> ListInfrastructureConfigurationsResponse
ListInfrastructureConfigurationsResponse'
            (Maybe Text
 -> Maybe [InfrastructureConfigurationSummary]
 -> Maybe Text
 -> Int
 -> ListInfrastructureConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [InfrastructureConfigurationSummary]
      -> Maybe Text -> Int -> ListInfrastructureConfigurationsResponse)
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
"requestId")
            Either
  String
  (Maybe [InfrastructureConfigurationSummary]
   -> Maybe Text -> Int -> ListInfrastructureConfigurationsResponse)
-> Either String (Maybe [InfrastructureConfigurationSummary])
-> Either
     String
     (Maybe Text -> Int -> ListInfrastructureConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [InfrastructureConfigurationSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"infrastructureConfigurationSummaryList"
                            Either String (Maybe (Maybe [InfrastructureConfigurationSummary]))
-> Maybe [InfrastructureConfigurationSummary]
-> Either String (Maybe [InfrastructureConfigurationSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InfrastructureConfigurationSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text -> Int -> ListInfrastructureConfigurationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListInfrastructureConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListInfrastructureConfigurationsResponse)
-> Either String Int
-> Either String ListInfrastructureConfigurationsResponse
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))
      )

instance
  Prelude.Hashable
    ListInfrastructureConfigurations

instance
  Prelude.NFData
    ListInfrastructureConfigurations

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

instance Core.ToJSON ListInfrastructureConfigurations where
  toJSON :: ListInfrastructureConfigurations -> Value
toJSON ListInfrastructureConfigurations' {Maybe Natural
Maybe (NonEmpty Filter)
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe (NonEmpty Filter)
$sel:maxResults:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe Natural
$sel:nextToken:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe Text
$sel:filters:ListInfrastructureConfigurations' :: ListInfrastructureConfigurations -> Maybe (NonEmpty Filter)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filters" Text -> NonEmpty Filter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Filter -> Pair) -> Maybe (NonEmpty Filter) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Filter)
filters,
            (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
"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 ListInfrastructureConfigurations where
  toPath :: ListInfrastructureConfigurations -> ByteString
toPath =
    ByteString -> ListInfrastructureConfigurations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/ListInfrastructureConfigurations"

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

-- | /See:/ 'newListInfrastructureConfigurationsResponse' smart constructor.
data ListInfrastructureConfigurationsResponse = ListInfrastructureConfigurationsResponse'
  { -- | The request ID that uniquely identifies this request.
    ListInfrastructureConfigurationsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The list of infrastructure configurations.
    ListInfrastructureConfigurationsResponse
-> Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList :: Prelude.Maybe [InfrastructureConfigurationSummary],
    -- | The next token used for paginated responses. When this is not empty,
    -- there are additional elements that the service has not included in this
    -- request. Use this token with the next request to retrieve additional
    -- objects.
    ListInfrastructureConfigurationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListInfrastructureConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListInfrastructureConfigurationsResponse
-> ListInfrastructureConfigurationsResponse -> Bool
(ListInfrastructureConfigurationsResponse
 -> ListInfrastructureConfigurationsResponse -> Bool)
-> (ListInfrastructureConfigurationsResponse
    -> ListInfrastructureConfigurationsResponse -> Bool)
-> Eq ListInfrastructureConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInfrastructureConfigurationsResponse
-> ListInfrastructureConfigurationsResponse -> Bool
$c/= :: ListInfrastructureConfigurationsResponse
-> ListInfrastructureConfigurationsResponse -> Bool
== :: ListInfrastructureConfigurationsResponse
-> ListInfrastructureConfigurationsResponse -> Bool
$c== :: ListInfrastructureConfigurationsResponse
-> ListInfrastructureConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListInfrastructureConfigurationsResponse]
ReadPrec ListInfrastructureConfigurationsResponse
Int -> ReadS ListInfrastructureConfigurationsResponse
ReadS [ListInfrastructureConfigurationsResponse]
(Int -> ReadS ListInfrastructureConfigurationsResponse)
-> ReadS [ListInfrastructureConfigurationsResponse]
-> ReadPrec ListInfrastructureConfigurationsResponse
-> ReadPrec [ListInfrastructureConfigurationsResponse]
-> Read ListInfrastructureConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInfrastructureConfigurationsResponse]
$creadListPrec :: ReadPrec [ListInfrastructureConfigurationsResponse]
readPrec :: ReadPrec ListInfrastructureConfigurationsResponse
$creadPrec :: ReadPrec ListInfrastructureConfigurationsResponse
readList :: ReadS [ListInfrastructureConfigurationsResponse]
$creadList :: ReadS [ListInfrastructureConfigurationsResponse]
readsPrec :: Int -> ReadS ListInfrastructureConfigurationsResponse
$creadsPrec :: Int -> ReadS ListInfrastructureConfigurationsResponse
Prelude.Read, Int -> ListInfrastructureConfigurationsResponse -> ShowS
[ListInfrastructureConfigurationsResponse] -> ShowS
ListInfrastructureConfigurationsResponse -> String
(Int -> ListInfrastructureConfigurationsResponse -> ShowS)
-> (ListInfrastructureConfigurationsResponse -> String)
-> ([ListInfrastructureConfigurationsResponse] -> ShowS)
-> Show ListInfrastructureConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInfrastructureConfigurationsResponse] -> ShowS
$cshowList :: [ListInfrastructureConfigurationsResponse] -> ShowS
show :: ListInfrastructureConfigurationsResponse -> String
$cshow :: ListInfrastructureConfigurationsResponse -> String
showsPrec :: Int -> ListInfrastructureConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListInfrastructureConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
 ListInfrastructureConfigurationsResponse
 -> Rep ListInfrastructureConfigurationsResponse x)
-> (forall x.
    Rep ListInfrastructureConfigurationsResponse x
    -> ListInfrastructureConfigurationsResponse)
-> Generic ListInfrastructureConfigurationsResponse
forall x.
Rep ListInfrastructureConfigurationsResponse x
-> ListInfrastructureConfigurationsResponse
forall x.
ListInfrastructureConfigurationsResponse
-> Rep ListInfrastructureConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInfrastructureConfigurationsResponse x
-> ListInfrastructureConfigurationsResponse
$cfrom :: forall x.
ListInfrastructureConfigurationsResponse
-> Rep ListInfrastructureConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInfrastructureConfigurationsResponse' 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:
--
-- 'requestId', 'listInfrastructureConfigurationsResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'infrastructureConfigurationSummaryList', 'listInfrastructureConfigurationsResponse_infrastructureConfigurationSummaryList' - The list of infrastructure configurations.
--
-- 'nextToken', 'listInfrastructureConfigurationsResponse_nextToken' - The next token used for paginated responses. When this is not empty,
-- there are additional elements that the service has not included in this
-- request. Use this token with the next request to retrieve additional
-- objects.
--
-- 'httpStatus', 'listInfrastructureConfigurationsResponse_httpStatus' - The response's http status code.
newListInfrastructureConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInfrastructureConfigurationsResponse
newListInfrastructureConfigurationsResponse :: Int -> ListInfrastructureConfigurationsResponse
newListInfrastructureConfigurationsResponse
  Int
pHttpStatus_ =
    ListInfrastructureConfigurationsResponse' :: Maybe Text
-> Maybe [InfrastructureConfigurationSummary]
-> Maybe Text
-> Int
-> ListInfrastructureConfigurationsResponse
ListInfrastructureConfigurationsResponse'
      { $sel:requestId:ListInfrastructureConfigurationsResponse' :: Maybe Text
requestId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:infrastructureConfigurationSummaryList:ListInfrastructureConfigurationsResponse' :: Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList =
          Maybe [InfrastructureConfigurationSummary]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListInfrastructureConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListInfrastructureConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The request ID that uniquely identifies this request.
listInfrastructureConfigurationsResponse_requestId :: Lens.Lens' ListInfrastructureConfigurationsResponse (Prelude.Maybe Prelude.Text)
listInfrastructureConfigurationsResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListInfrastructureConfigurationsResponse
-> f ListInfrastructureConfigurationsResponse
listInfrastructureConfigurationsResponse_requestId = (ListInfrastructureConfigurationsResponse -> Maybe Text)
-> (ListInfrastructureConfigurationsResponse
    -> Maybe Text -> ListInfrastructureConfigurationsResponse)
-> Lens
     ListInfrastructureConfigurationsResponse
     ListInfrastructureConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurationsResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListInfrastructureConfigurationsResponse' :: ListInfrastructureConfigurationsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListInfrastructureConfigurationsResponse
s@ListInfrastructureConfigurationsResponse' {} Maybe Text
a -> ListInfrastructureConfigurationsResponse
s {$sel:requestId:ListInfrastructureConfigurationsResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListInfrastructureConfigurationsResponse)

-- | The list of infrastructure configurations.
listInfrastructureConfigurationsResponse_infrastructureConfigurationSummaryList :: Lens.Lens' ListInfrastructureConfigurationsResponse (Prelude.Maybe [InfrastructureConfigurationSummary])
listInfrastructureConfigurationsResponse_infrastructureConfigurationSummaryList :: (Maybe [InfrastructureConfigurationSummary]
 -> f (Maybe [InfrastructureConfigurationSummary]))
-> ListInfrastructureConfigurationsResponse
-> f ListInfrastructureConfigurationsResponse
listInfrastructureConfigurationsResponse_infrastructureConfigurationSummaryList = (ListInfrastructureConfigurationsResponse
 -> Maybe [InfrastructureConfigurationSummary])
-> (ListInfrastructureConfigurationsResponse
    -> Maybe [InfrastructureConfigurationSummary]
    -> ListInfrastructureConfigurationsResponse)
-> Lens
     ListInfrastructureConfigurationsResponse
     ListInfrastructureConfigurationsResponse
     (Maybe [InfrastructureConfigurationSummary])
     (Maybe [InfrastructureConfigurationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurationsResponse' {Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList :: Maybe [InfrastructureConfigurationSummary]
$sel:infrastructureConfigurationSummaryList:ListInfrastructureConfigurationsResponse' :: ListInfrastructureConfigurationsResponse
-> Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList} -> Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList) (\s :: ListInfrastructureConfigurationsResponse
s@ListInfrastructureConfigurationsResponse' {} Maybe [InfrastructureConfigurationSummary]
a -> ListInfrastructureConfigurationsResponse
s {$sel:infrastructureConfigurationSummaryList:ListInfrastructureConfigurationsResponse' :: Maybe [InfrastructureConfigurationSummary]
infrastructureConfigurationSummaryList = Maybe [InfrastructureConfigurationSummary]
a} :: ListInfrastructureConfigurationsResponse) ((Maybe [InfrastructureConfigurationSummary]
  -> f (Maybe [InfrastructureConfigurationSummary]))
 -> ListInfrastructureConfigurationsResponse
 -> f ListInfrastructureConfigurationsResponse)
-> ((Maybe [InfrastructureConfigurationSummary]
     -> f (Maybe [InfrastructureConfigurationSummary]))
    -> Maybe [InfrastructureConfigurationSummary]
    -> f (Maybe [InfrastructureConfigurationSummary]))
-> (Maybe [InfrastructureConfigurationSummary]
    -> f (Maybe [InfrastructureConfigurationSummary]))
-> ListInfrastructureConfigurationsResponse
-> f ListInfrastructureConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
-> Iso
     (Maybe [InfrastructureConfigurationSummary])
     (Maybe [InfrastructureConfigurationSummary])
     (Maybe [InfrastructureConfigurationSummary])
     (Maybe [InfrastructureConfigurationSummary])
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 AnIso
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
  [InfrastructureConfigurationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The next token used for paginated responses. When this is not empty,
-- there are additional elements that the service has not included in this
-- request. Use this token with the next request to retrieve additional
-- objects.
listInfrastructureConfigurationsResponse_nextToken :: Lens.Lens' ListInfrastructureConfigurationsResponse (Prelude.Maybe Prelude.Text)
listInfrastructureConfigurationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListInfrastructureConfigurationsResponse
-> f ListInfrastructureConfigurationsResponse
listInfrastructureConfigurationsResponse_nextToken = (ListInfrastructureConfigurationsResponse -> Maybe Text)
-> (ListInfrastructureConfigurationsResponse
    -> Maybe Text -> ListInfrastructureConfigurationsResponse)
-> Lens
     ListInfrastructureConfigurationsResponse
     ListInfrastructureConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInfrastructureConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInfrastructureConfigurationsResponse' :: ListInfrastructureConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInfrastructureConfigurationsResponse
s@ListInfrastructureConfigurationsResponse' {} Maybe Text
a -> ListInfrastructureConfigurationsResponse
s {$sel:nextToken:ListInfrastructureConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListInfrastructureConfigurationsResponse)

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

instance
  Prelude.NFData
    ListInfrastructureConfigurationsResponse