{-# 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.CodeDeploy.ListDeploymentConfigs
-- 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)
--
-- Lists the deployment configurations with the IAM user or AWS account.
--
-- This operation returns paginated results.
module Amazonka.CodeDeploy.ListDeploymentConfigs
  ( -- * Creating a Request
    ListDeploymentConfigs (..),
    newListDeploymentConfigs,

    -- * Request Lenses
    listDeploymentConfigs_nextToken,

    -- * Destructuring the Response
    ListDeploymentConfigsResponse (..),
    newListDeploymentConfigsResponse,

    -- * Response Lenses
    listDeploymentConfigsResponse_nextToken,
    listDeploymentConfigsResponse_deploymentConfigsList,
    listDeploymentConfigsResponse_httpStatus,
  )
where

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

-- | Represents the input of a @ListDeploymentConfigs@ operation.
--
-- /See:/ 'newListDeploymentConfigs' smart constructor.
data ListDeploymentConfigs = ListDeploymentConfigs'
  { -- | An identifier returned from the previous @ListDeploymentConfigs@ call.
    -- It can be used to return the next set of deployment configurations in
    -- the list.
    ListDeploymentConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDeploymentConfigs -> ListDeploymentConfigs -> Bool
(ListDeploymentConfigs -> ListDeploymentConfigs -> Bool)
-> (ListDeploymentConfigs -> ListDeploymentConfigs -> Bool)
-> Eq ListDeploymentConfigs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeploymentConfigs -> ListDeploymentConfigs -> Bool
$c/= :: ListDeploymentConfigs -> ListDeploymentConfigs -> Bool
== :: ListDeploymentConfigs -> ListDeploymentConfigs -> Bool
$c== :: ListDeploymentConfigs -> ListDeploymentConfigs -> Bool
Prelude.Eq, ReadPrec [ListDeploymentConfigs]
ReadPrec ListDeploymentConfigs
Int -> ReadS ListDeploymentConfigs
ReadS [ListDeploymentConfigs]
(Int -> ReadS ListDeploymentConfigs)
-> ReadS [ListDeploymentConfigs]
-> ReadPrec ListDeploymentConfigs
-> ReadPrec [ListDeploymentConfigs]
-> Read ListDeploymentConfigs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeploymentConfigs]
$creadListPrec :: ReadPrec [ListDeploymentConfigs]
readPrec :: ReadPrec ListDeploymentConfigs
$creadPrec :: ReadPrec ListDeploymentConfigs
readList :: ReadS [ListDeploymentConfigs]
$creadList :: ReadS [ListDeploymentConfigs]
readsPrec :: Int -> ReadS ListDeploymentConfigs
$creadsPrec :: Int -> ReadS ListDeploymentConfigs
Prelude.Read, Int -> ListDeploymentConfigs -> ShowS
[ListDeploymentConfigs] -> ShowS
ListDeploymentConfigs -> String
(Int -> ListDeploymentConfigs -> ShowS)
-> (ListDeploymentConfigs -> String)
-> ([ListDeploymentConfigs] -> ShowS)
-> Show ListDeploymentConfigs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeploymentConfigs] -> ShowS
$cshowList :: [ListDeploymentConfigs] -> ShowS
show :: ListDeploymentConfigs -> String
$cshow :: ListDeploymentConfigs -> String
showsPrec :: Int -> ListDeploymentConfigs -> ShowS
$cshowsPrec :: Int -> ListDeploymentConfigs -> ShowS
Prelude.Show, (forall x. ListDeploymentConfigs -> Rep ListDeploymentConfigs x)
-> (forall x. Rep ListDeploymentConfigs x -> ListDeploymentConfigs)
-> Generic ListDeploymentConfigs
forall x. Rep ListDeploymentConfigs x -> ListDeploymentConfigs
forall x. ListDeploymentConfigs -> Rep ListDeploymentConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDeploymentConfigs x -> ListDeploymentConfigs
$cfrom :: forall x. ListDeploymentConfigs -> Rep ListDeploymentConfigs x
Prelude.Generic)

-- |
-- Create a value of 'ListDeploymentConfigs' 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', 'listDeploymentConfigs_nextToken' - An identifier returned from the previous @ListDeploymentConfigs@ call.
-- It can be used to return the next set of deployment configurations in
-- the list.
newListDeploymentConfigs ::
  ListDeploymentConfigs
newListDeploymentConfigs :: ListDeploymentConfigs
newListDeploymentConfigs =
  ListDeploymentConfigs' :: Maybe Text -> ListDeploymentConfigs
ListDeploymentConfigs' {$sel:nextToken:ListDeploymentConfigs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | An identifier returned from the previous @ListDeploymentConfigs@ call.
-- It can be used to return the next set of deployment configurations in
-- the list.
listDeploymentConfigs_nextToken :: Lens.Lens' ListDeploymentConfigs (Prelude.Maybe Prelude.Text)
listDeploymentConfigs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeploymentConfigs -> f ListDeploymentConfigs
listDeploymentConfigs_nextToken = (ListDeploymentConfigs -> Maybe Text)
-> (ListDeploymentConfigs -> Maybe Text -> ListDeploymentConfigs)
-> Lens
     ListDeploymentConfigs
     ListDeploymentConfigs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeploymentConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeploymentConfigs' :: ListDeploymentConfigs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeploymentConfigs
s@ListDeploymentConfigs' {} Maybe Text
a -> ListDeploymentConfigs
s {$sel:nextToken:ListDeploymentConfigs' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeploymentConfigs)

instance Core.AWSPager ListDeploymentConfigs where
  page :: ListDeploymentConfigs
-> AWSResponse ListDeploymentConfigs -> Maybe ListDeploymentConfigs
page ListDeploymentConfigs
rq AWSResponse ListDeploymentConfigs
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDeploymentConfigs
ListDeploymentConfigsResponse
rs
            ListDeploymentConfigsResponse
-> Getting (First Text) ListDeploymentConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeploymentConfigsResponse
-> Const (First Text) ListDeploymentConfigsResponse
Lens' ListDeploymentConfigsResponse (Maybe Text)
listDeploymentConfigsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDeploymentConfigsResponse
 -> Const (First Text) ListDeploymentConfigsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeploymentConfigsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDeploymentConfigs
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDeploymentConfigs
ListDeploymentConfigsResponse
rs
            ListDeploymentConfigsResponse
-> Getting (First [Text]) ListDeploymentConfigsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListDeploymentConfigsResponse
-> Const (First [Text]) ListDeploymentConfigsResponse
Lens' ListDeploymentConfigsResponse (Maybe [Text])
listDeploymentConfigsResponse_deploymentConfigsList
              ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListDeploymentConfigsResponse
 -> Const (First [Text]) ListDeploymentConfigsResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListDeploymentConfigsResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDeploymentConfigs
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDeploymentConfigs -> Maybe ListDeploymentConfigs
forall a. a -> Maybe a
Prelude.Just (ListDeploymentConfigs -> Maybe ListDeploymentConfigs)
-> ListDeploymentConfigs -> Maybe ListDeploymentConfigs
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDeploymentConfigs
rq
          ListDeploymentConfigs
-> (ListDeploymentConfigs -> ListDeploymentConfigs)
-> ListDeploymentConfigs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDeploymentConfigs -> Identity ListDeploymentConfigs
Lens
  ListDeploymentConfigs
  ListDeploymentConfigs
  (Maybe Text)
  (Maybe Text)
listDeploymentConfigs_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDeploymentConfigs -> Identity ListDeploymentConfigs)
-> Maybe Text -> ListDeploymentConfigs -> ListDeploymentConfigs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDeploymentConfigs
ListDeploymentConfigsResponse
rs
          ListDeploymentConfigsResponse
-> Getting (First Text) ListDeploymentConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeploymentConfigsResponse
-> Const (First Text) ListDeploymentConfigsResponse
Lens' ListDeploymentConfigsResponse (Maybe Text)
listDeploymentConfigsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDeploymentConfigsResponse
 -> Const (First Text) ListDeploymentConfigsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeploymentConfigsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListDeploymentConfigs

instance Core.ToHeaders ListDeploymentConfigs where
  toHeaders :: ListDeploymentConfigs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDeploymentConfigs -> 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
"CodeDeploy_20141006.ListDeploymentConfigs" ::
                          Prelude.ByteString
                      ),
            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 ListDeploymentConfigs where
  toJSON :: ListDeploymentConfigs -> Value
toJSON ListDeploymentConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeploymentConfigs' :: ListDeploymentConfigs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(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]
      )

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

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

-- | Represents the output of a @ListDeploymentConfigs@ operation.
--
-- /See:/ 'newListDeploymentConfigsResponse' smart constructor.
data ListDeploymentConfigsResponse = ListDeploymentConfigsResponse'
  { -- | If a large amount of information is returned, an identifier is also
    -- returned. It can be used in a subsequent list deployment configurations
    -- call to return the next set of deployment configurations in the list.
    ListDeploymentConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of deployment configurations, including built-in configurations
    -- such as @CodeDeployDefault.OneAtATime@.
    ListDeploymentConfigsResponse -> Maybe [Text]
deploymentConfigsList :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListDeploymentConfigsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDeploymentConfigsResponse
-> ListDeploymentConfigsResponse -> Bool
(ListDeploymentConfigsResponse
 -> ListDeploymentConfigsResponse -> Bool)
-> (ListDeploymentConfigsResponse
    -> ListDeploymentConfigsResponse -> Bool)
-> Eq ListDeploymentConfigsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeploymentConfigsResponse
-> ListDeploymentConfigsResponse -> Bool
$c/= :: ListDeploymentConfigsResponse
-> ListDeploymentConfigsResponse -> Bool
== :: ListDeploymentConfigsResponse
-> ListDeploymentConfigsResponse -> Bool
$c== :: ListDeploymentConfigsResponse
-> ListDeploymentConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListDeploymentConfigsResponse]
ReadPrec ListDeploymentConfigsResponse
Int -> ReadS ListDeploymentConfigsResponse
ReadS [ListDeploymentConfigsResponse]
(Int -> ReadS ListDeploymentConfigsResponse)
-> ReadS [ListDeploymentConfigsResponse]
-> ReadPrec ListDeploymentConfigsResponse
-> ReadPrec [ListDeploymentConfigsResponse]
-> Read ListDeploymentConfigsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeploymentConfigsResponse]
$creadListPrec :: ReadPrec [ListDeploymentConfigsResponse]
readPrec :: ReadPrec ListDeploymentConfigsResponse
$creadPrec :: ReadPrec ListDeploymentConfigsResponse
readList :: ReadS [ListDeploymentConfigsResponse]
$creadList :: ReadS [ListDeploymentConfigsResponse]
readsPrec :: Int -> ReadS ListDeploymentConfigsResponse
$creadsPrec :: Int -> ReadS ListDeploymentConfigsResponse
Prelude.Read, Int -> ListDeploymentConfigsResponse -> ShowS
[ListDeploymentConfigsResponse] -> ShowS
ListDeploymentConfigsResponse -> String
(Int -> ListDeploymentConfigsResponse -> ShowS)
-> (ListDeploymentConfigsResponse -> String)
-> ([ListDeploymentConfigsResponse] -> ShowS)
-> Show ListDeploymentConfigsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeploymentConfigsResponse] -> ShowS
$cshowList :: [ListDeploymentConfigsResponse] -> ShowS
show :: ListDeploymentConfigsResponse -> String
$cshow :: ListDeploymentConfigsResponse -> String
showsPrec :: Int -> ListDeploymentConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListDeploymentConfigsResponse -> ShowS
Prelude.Show, (forall x.
 ListDeploymentConfigsResponse
 -> Rep ListDeploymentConfigsResponse x)
-> (forall x.
    Rep ListDeploymentConfigsResponse x
    -> ListDeploymentConfigsResponse)
-> Generic ListDeploymentConfigsResponse
forall x.
Rep ListDeploymentConfigsResponse x
-> ListDeploymentConfigsResponse
forall x.
ListDeploymentConfigsResponse
-> Rep ListDeploymentConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDeploymentConfigsResponse x
-> ListDeploymentConfigsResponse
$cfrom :: forall x.
ListDeploymentConfigsResponse
-> Rep ListDeploymentConfigsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDeploymentConfigsResponse' 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', 'listDeploymentConfigsResponse_nextToken' - If a large amount of information is returned, an identifier is also
-- returned. It can be used in a subsequent list deployment configurations
-- call to return the next set of deployment configurations in the list.
--
-- 'deploymentConfigsList', 'listDeploymentConfigsResponse_deploymentConfigsList' - A list of deployment configurations, including built-in configurations
-- such as @CodeDeployDefault.OneAtATime@.
--
-- 'httpStatus', 'listDeploymentConfigsResponse_httpStatus' - The response's http status code.
newListDeploymentConfigsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDeploymentConfigsResponse
newListDeploymentConfigsResponse :: Int -> ListDeploymentConfigsResponse
newListDeploymentConfigsResponse Int
pHttpStatus_ =
  ListDeploymentConfigsResponse' :: Maybe Text -> Maybe [Text] -> Int -> ListDeploymentConfigsResponse
ListDeploymentConfigsResponse'
    { $sel:nextToken:ListDeploymentConfigsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentConfigsList:ListDeploymentConfigsResponse' :: Maybe [Text]
deploymentConfigsList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDeploymentConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If a large amount of information is returned, an identifier is also
-- returned. It can be used in a subsequent list deployment configurations
-- call to return the next set of deployment configurations in the list.
listDeploymentConfigsResponse_nextToken :: Lens.Lens' ListDeploymentConfigsResponse (Prelude.Maybe Prelude.Text)
listDeploymentConfigsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeploymentConfigsResponse -> f ListDeploymentConfigsResponse
listDeploymentConfigsResponse_nextToken = (ListDeploymentConfigsResponse -> Maybe Text)
-> (ListDeploymentConfigsResponse
    -> Maybe Text -> ListDeploymentConfigsResponse)
-> Lens' ListDeploymentConfigsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeploymentConfigsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeploymentConfigsResponse' :: ListDeploymentConfigsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeploymentConfigsResponse
s@ListDeploymentConfigsResponse' {} Maybe Text
a -> ListDeploymentConfigsResponse
s {$sel:nextToken:ListDeploymentConfigsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeploymentConfigsResponse)

-- | A list of deployment configurations, including built-in configurations
-- such as @CodeDeployDefault.OneAtATime@.
listDeploymentConfigsResponse_deploymentConfigsList :: Lens.Lens' ListDeploymentConfigsResponse (Prelude.Maybe [Prelude.Text])
listDeploymentConfigsResponse_deploymentConfigsList :: (Maybe [Text] -> f (Maybe [Text]))
-> ListDeploymentConfigsResponse -> f ListDeploymentConfigsResponse
listDeploymentConfigsResponse_deploymentConfigsList = (ListDeploymentConfigsResponse -> Maybe [Text])
-> (ListDeploymentConfigsResponse
    -> Maybe [Text] -> ListDeploymentConfigsResponse)
-> Lens' ListDeploymentConfigsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeploymentConfigsResponse' {Maybe [Text]
deploymentConfigsList :: Maybe [Text]
$sel:deploymentConfigsList:ListDeploymentConfigsResponse' :: ListDeploymentConfigsResponse -> Maybe [Text]
deploymentConfigsList} -> Maybe [Text]
deploymentConfigsList) (\s :: ListDeploymentConfigsResponse
s@ListDeploymentConfigsResponse' {} Maybe [Text]
a -> ListDeploymentConfigsResponse
s {$sel:deploymentConfigsList:ListDeploymentConfigsResponse' :: Maybe [Text]
deploymentConfigsList = Maybe [Text]
a} :: ListDeploymentConfigsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListDeploymentConfigsResponse
 -> f ListDeploymentConfigsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListDeploymentConfigsResponse
-> f ListDeploymentConfigsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListDeploymentConfigsResponse