{-# 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.EMR.ListBootstrapActions
-- 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)
--
-- Provides information about the bootstrap actions associated with a
-- cluster.
--
-- This operation returns paginated results.
module Amazonka.EMR.ListBootstrapActions
  ( -- * Creating a Request
    ListBootstrapActions (..),
    newListBootstrapActions,

    -- * Request Lenses
    listBootstrapActions_marker,
    listBootstrapActions_clusterId,

    -- * Destructuring the Response
    ListBootstrapActionsResponse (..),
    newListBootstrapActionsResponse,

    -- * Response Lenses
    listBootstrapActionsResponse_bootstrapActions,
    listBootstrapActionsResponse_marker,
    listBootstrapActionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.EMR.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

-- | This input determines which bootstrap actions to retrieve.
--
-- /See:/ 'newListBootstrapActions' smart constructor.
data ListBootstrapActions = ListBootstrapActions'
  { -- | The pagination token that indicates the next set of results to retrieve.
    ListBootstrapActions -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The cluster identifier for the bootstrap actions to list.
    ListBootstrapActions -> Text
clusterId :: Prelude.Text
  }
  deriving (ListBootstrapActions -> ListBootstrapActions -> Bool
(ListBootstrapActions -> ListBootstrapActions -> Bool)
-> (ListBootstrapActions -> ListBootstrapActions -> Bool)
-> Eq ListBootstrapActions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBootstrapActions -> ListBootstrapActions -> Bool
$c/= :: ListBootstrapActions -> ListBootstrapActions -> Bool
== :: ListBootstrapActions -> ListBootstrapActions -> Bool
$c== :: ListBootstrapActions -> ListBootstrapActions -> Bool
Prelude.Eq, ReadPrec [ListBootstrapActions]
ReadPrec ListBootstrapActions
Int -> ReadS ListBootstrapActions
ReadS [ListBootstrapActions]
(Int -> ReadS ListBootstrapActions)
-> ReadS [ListBootstrapActions]
-> ReadPrec ListBootstrapActions
-> ReadPrec [ListBootstrapActions]
-> Read ListBootstrapActions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBootstrapActions]
$creadListPrec :: ReadPrec [ListBootstrapActions]
readPrec :: ReadPrec ListBootstrapActions
$creadPrec :: ReadPrec ListBootstrapActions
readList :: ReadS [ListBootstrapActions]
$creadList :: ReadS [ListBootstrapActions]
readsPrec :: Int -> ReadS ListBootstrapActions
$creadsPrec :: Int -> ReadS ListBootstrapActions
Prelude.Read, Int -> ListBootstrapActions -> ShowS
[ListBootstrapActions] -> ShowS
ListBootstrapActions -> String
(Int -> ListBootstrapActions -> ShowS)
-> (ListBootstrapActions -> String)
-> ([ListBootstrapActions] -> ShowS)
-> Show ListBootstrapActions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBootstrapActions] -> ShowS
$cshowList :: [ListBootstrapActions] -> ShowS
show :: ListBootstrapActions -> String
$cshow :: ListBootstrapActions -> String
showsPrec :: Int -> ListBootstrapActions -> ShowS
$cshowsPrec :: Int -> ListBootstrapActions -> ShowS
Prelude.Show, (forall x. ListBootstrapActions -> Rep ListBootstrapActions x)
-> (forall x. Rep ListBootstrapActions x -> ListBootstrapActions)
-> Generic ListBootstrapActions
forall x. Rep ListBootstrapActions x -> ListBootstrapActions
forall x. ListBootstrapActions -> Rep ListBootstrapActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBootstrapActions x -> ListBootstrapActions
$cfrom :: forall x. ListBootstrapActions -> Rep ListBootstrapActions x
Prelude.Generic)

-- |
-- Create a value of 'ListBootstrapActions' 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:
--
-- 'marker', 'listBootstrapActions_marker' - The pagination token that indicates the next set of results to retrieve.
--
-- 'clusterId', 'listBootstrapActions_clusterId' - The cluster identifier for the bootstrap actions to list.
newListBootstrapActions ::
  -- | 'clusterId'
  Prelude.Text ->
  ListBootstrapActions
newListBootstrapActions :: Text -> ListBootstrapActions
newListBootstrapActions Text
pClusterId_ =
  ListBootstrapActions' :: Maybe Text -> Text -> ListBootstrapActions
ListBootstrapActions'
    { $sel:marker:ListBootstrapActions' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterId:ListBootstrapActions' :: Text
clusterId = Text
pClusterId_
    }

-- | The pagination token that indicates the next set of results to retrieve.
listBootstrapActions_marker :: Lens.Lens' ListBootstrapActions (Prelude.Maybe Prelude.Text)
listBootstrapActions_marker :: (Maybe Text -> f (Maybe Text))
-> ListBootstrapActions -> f ListBootstrapActions
listBootstrapActions_marker = (ListBootstrapActions -> Maybe Text)
-> (ListBootstrapActions -> Maybe Text -> ListBootstrapActions)
-> Lens
     ListBootstrapActions ListBootstrapActions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBootstrapActions' {Maybe Text
marker :: Maybe Text
$sel:marker:ListBootstrapActions' :: ListBootstrapActions -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListBootstrapActions
s@ListBootstrapActions' {} Maybe Text
a -> ListBootstrapActions
s {$sel:marker:ListBootstrapActions' :: Maybe Text
marker = Maybe Text
a} :: ListBootstrapActions)

-- | The cluster identifier for the bootstrap actions to list.
listBootstrapActions_clusterId :: Lens.Lens' ListBootstrapActions Prelude.Text
listBootstrapActions_clusterId :: (Text -> f Text) -> ListBootstrapActions -> f ListBootstrapActions
listBootstrapActions_clusterId = (ListBootstrapActions -> Text)
-> (ListBootstrapActions -> Text -> ListBootstrapActions)
-> Lens ListBootstrapActions ListBootstrapActions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBootstrapActions' {Text
clusterId :: Text
$sel:clusterId:ListBootstrapActions' :: ListBootstrapActions -> Text
clusterId} -> Text
clusterId) (\s :: ListBootstrapActions
s@ListBootstrapActions' {} Text
a -> ListBootstrapActions
s {$sel:clusterId:ListBootstrapActions' :: Text
clusterId = Text
a} :: ListBootstrapActions)

instance Core.AWSPager ListBootstrapActions where
  page :: ListBootstrapActions
-> AWSResponse ListBootstrapActions -> Maybe ListBootstrapActions
page ListBootstrapActions
rq AWSResponse ListBootstrapActions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBootstrapActions
ListBootstrapActionsResponse
rs
            ListBootstrapActionsResponse
-> Getting (First Text) ListBootstrapActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBootstrapActionsResponse
-> Const (First Text) ListBootstrapActionsResponse
Lens' ListBootstrapActionsResponse (Maybe Text)
listBootstrapActionsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListBootstrapActionsResponse
 -> Const (First Text) ListBootstrapActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBootstrapActionsResponse 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 ListBootstrapActions
forall a. Maybe a
Prelude.Nothing
    | Maybe [Command] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBootstrapActions
ListBootstrapActionsResponse
rs
            ListBootstrapActionsResponse
-> Getting (First [Command]) ListBootstrapActionsResponse [Command]
-> Maybe [Command]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Command] -> Const (First [Command]) (Maybe [Command]))
-> ListBootstrapActionsResponse
-> Const (First [Command]) ListBootstrapActionsResponse
Lens' ListBootstrapActionsResponse (Maybe [Command])
listBootstrapActionsResponse_bootstrapActions
              ((Maybe [Command] -> Const (First [Command]) (Maybe [Command]))
 -> ListBootstrapActionsResponse
 -> Const (First [Command]) ListBootstrapActionsResponse)
-> (([Command] -> Const (First [Command]) [Command])
    -> Maybe [Command] -> Const (First [Command]) (Maybe [Command]))
-> Getting (First [Command]) ListBootstrapActionsResponse [Command]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Command] -> Const (First [Command]) [Command])
-> Maybe [Command] -> Const (First [Command]) (Maybe [Command])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListBootstrapActions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListBootstrapActions -> Maybe ListBootstrapActions
forall a. a -> Maybe a
Prelude.Just (ListBootstrapActions -> Maybe ListBootstrapActions)
-> ListBootstrapActions -> Maybe ListBootstrapActions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListBootstrapActions
rq
          ListBootstrapActions
-> (ListBootstrapActions -> ListBootstrapActions)
-> ListBootstrapActions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListBootstrapActions -> Identity ListBootstrapActions
Lens
  ListBootstrapActions ListBootstrapActions (Maybe Text) (Maybe Text)
listBootstrapActions_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListBootstrapActions -> Identity ListBootstrapActions)
-> Maybe Text -> ListBootstrapActions -> ListBootstrapActions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListBootstrapActions
ListBootstrapActionsResponse
rs
          ListBootstrapActionsResponse
-> Getting (First Text) ListBootstrapActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBootstrapActionsResponse
-> Const (First Text) ListBootstrapActionsResponse
Lens' ListBootstrapActionsResponse (Maybe Text)
listBootstrapActionsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListBootstrapActionsResponse
 -> Const (First Text) ListBootstrapActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBootstrapActionsResponse 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 ListBootstrapActions where
  type
    AWSResponse ListBootstrapActions =
      ListBootstrapActionsResponse
  request :: ListBootstrapActions -> Request ListBootstrapActions
request = Service -> ListBootstrapActions -> Request ListBootstrapActions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBootstrapActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBootstrapActions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListBootstrapActions))
-> Logger
-> Service
-> Proxy ListBootstrapActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBootstrapActions)))
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 [Command]
-> Maybe Text -> Int -> ListBootstrapActionsResponse
ListBootstrapActionsResponse'
            (Maybe [Command]
 -> Maybe Text -> Int -> ListBootstrapActionsResponse)
-> Either String (Maybe [Command])
-> Either
     String (Maybe Text -> Int -> ListBootstrapActionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Command]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BootstrapActions"
                            Either String (Maybe (Maybe [Command]))
-> Maybe [Command] -> Either String (Maybe [Command])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Command]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListBootstrapActionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListBootstrapActionsResponse)
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
"Marker")
            Either String (Int -> ListBootstrapActionsResponse)
-> Either String Int -> Either String ListBootstrapActionsResponse
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 ListBootstrapActions

instance Prelude.NFData ListBootstrapActions

instance Core.ToHeaders ListBootstrapActions where
  toHeaders :: ListBootstrapActions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListBootstrapActions -> 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
"ElasticMapReduce.ListBootstrapActions" ::
                          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 ListBootstrapActions where
  toJSON :: ListBootstrapActions -> Value
toJSON ListBootstrapActions' {Maybe Text
Text
clusterId :: Text
marker :: Maybe Text
$sel:clusterId:ListBootstrapActions' :: ListBootstrapActions -> Text
$sel:marker:ListBootstrapActions' :: ListBootstrapActions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Marker" 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
marker,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClusterId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clusterId)
          ]
      )

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

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

-- | This output contains the bootstrap actions detail.
--
-- /See:/ 'newListBootstrapActionsResponse' smart constructor.
data ListBootstrapActionsResponse = ListBootstrapActionsResponse'
  { -- | The bootstrap actions associated with the cluster.
    ListBootstrapActionsResponse -> Maybe [Command]
bootstrapActions :: Prelude.Maybe [Command],
    -- | The pagination token that indicates the next set of results to retrieve.
    ListBootstrapActionsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBootstrapActionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBootstrapActionsResponse
-> ListBootstrapActionsResponse -> Bool
(ListBootstrapActionsResponse
 -> ListBootstrapActionsResponse -> Bool)
-> (ListBootstrapActionsResponse
    -> ListBootstrapActionsResponse -> Bool)
-> Eq ListBootstrapActionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBootstrapActionsResponse
-> ListBootstrapActionsResponse -> Bool
$c/= :: ListBootstrapActionsResponse
-> ListBootstrapActionsResponse -> Bool
== :: ListBootstrapActionsResponse
-> ListBootstrapActionsResponse -> Bool
$c== :: ListBootstrapActionsResponse
-> ListBootstrapActionsResponse -> Bool
Prelude.Eq, ReadPrec [ListBootstrapActionsResponse]
ReadPrec ListBootstrapActionsResponse
Int -> ReadS ListBootstrapActionsResponse
ReadS [ListBootstrapActionsResponse]
(Int -> ReadS ListBootstrapActionsResponse)
-> ReadS [ListBootstrapActionsResponse]
-> ReadPrec ListBootstrapActionsResponse
-> ReadPrec [ListBootstrapActionsResponse]
-> Read ListBootstrapActionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBootstrapActionsResponse]
$creadListPrec :: ReadPrec [ListBootstrapActionsResponse]
readPrec :: ReadPrec ListBootstrapActionsResponse
$creadPrec :: ReadPrec ListBootstrapActionsResponse
readList :: ReadS [ListBootstrapActionsResponse]
$creadList :: ReadS [ListBootstrapActionsResponse]
readsPrec :: Int -> ReadS ListBootstrapActionsResponse
$creadsPrec :: Int -> ReadS ListBootstrapActionsResponse
Prelude.Read, Int -> ListBootstrapActionsResponse -> ShowS
[ListBootstrapActionsResponse] -> ShowS
ListBootstrapActionsResponse -> String
(Int -> ListBootstrapActionsResponse -> ShowS)
-> (ListBootstrapActionsResponse -> String)
-> ([ListBootstrapActionsResponse] -> ShowS)
-> Show ListBootstrapActionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBootstrapActionsResponse] -> ShowS
$cshowList :: [ListBootstrapActionsResponse] -> ShowS
show :: ListBootstrapActionsResponse -> String
$cshow :: ListBootstrapActionsResponse -> String
showsPrec :: Int -> ListBootstrapActionsResponse -> ShowS
$cshowsPrec :: Int -> ListBootstrapActionsResponse -> ShowS
Prelude.Show, (forall x.
 ListBootstrapActionsResponse -> Rep ListBootstrapActionsResponse x)
-> (forall x.
    Rep ListBootstrapActionsResponse x -> ListBootstrapActionsResponse)
-> Generic ListBootstrapActionsResponse
forall x.
Rep ListBootstrapActionsResponse x -> ListBootstrapActionsResponse
forall x.
ListBootstrapActionsResponse -> Rep ListBootstrapActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBootstrapActionsResponse x -> ListBootstrapActionsResponse
$cfrom :: forall x.
ListBootstrapActionsResponse -> Rep ListBootstrapActionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBootstrapActionsResponse' 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:
--
-- 'bootstrapActions', 'listBootstrapActionsResponse_bootstrapActions' - The bootstrap actions associated with the cluster.
--
-- 'marker', 'listBootstrapActionsResponse_marker' - The pagination token that indicates the next set of results to retrieve.
--
-- 'httpStatus', 'listBootstrapActionsResponse_httpStatus' - The response's http status code.
newListBootstrapActionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBootstrapActionsResponse
newListBootstrapActionsResponse :: Int -> ListBootstrapActionsResponse
newListBootstrapActionsResponse Int
pHttpStatus_ =
  ListBootstrapActionsResponse' :: Maybe [Command]
-> Maybe Text -> Int -> ListBootstrapActionsResponse
ListBootstrapActionsResponse'
    { $sel:bootstrapActions:ListBootstrapActionsResponse' :: Maybe [Command]
bootstrapActions =
        Maybe [Command]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListBootstrapActionsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBootstrapActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The bootstrap actions associated with the cluster.
listBootstrapActionsResponse_bootstrapActions :: Lens.Lens' ListBootstrapActionsResponse (Prelude.Maybe [Command])
listBootstrapActionsResponse_bootstrapActions :: (Maybe [Command] -> f (Maybe [Command]))
-> ListBootstrapActionsResponse -> f ListBootstrapActionsResponse
listBootstrapActionsResponse_bootstrapActions = (ListBootstrapActionsResponse -> Maybe [Command])
-> (ListBootstrapActionsResponse
    -> Maybe [Command] -> ListBootstrapActionsResponse)
-> Lens' ListBootstrapActionsResponse (Maybe [Command])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBootstrapActionsResponse' {Maybe [Command]
bootstrapActions :: Maybe [Command]
$sel:bootstrapActions:ListBootstrapActionsResponse' :: ListBootstrapActionsResponse -> Maybe [Command]
bootstrapActions} -> Maybe [Command]
bootstrapActions) (\s :: ListBootstrapActionsResponse
s@ListBootstrapActionsResponse' {} Maybe [Command]
a -> ListBootstrapActionsResponse
s {$sel:bootstrapActions:ListBootstrapActionsResponse' :: Maybe [Command]
bootstrapActions = Maybe [Command]
a} :: ListBootstrapActionsResponse) ((Maybe [Command] -> f (Maybe [Command]))
 -> ListBootstrapActionsResponse -> f ListBootstrapActionsResponse)
-> ((Maybe [Command] -> f (Maybe [Command]))
    -> Maybe [Command] -> f (Maybe [Command]))
-> (Maybe [Command] -> f (Maybe [Command]))
-> ListBootstrapActionsResponse
-> f ListBootstrapActionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Command] [Command] [Command] [Command]
-> Iso
     (Maybe [Command])
     (Maybe [Command])
     (Maybe [Command])
     (Maybe [Command])
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 [Command] [Command] [Command] [Command]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that indicates the next set of results to retrieve.
listBootstrapActionsResponse_marker :: Lens.Lens' ListBootstrapActionsResponse (Prelude.Maybe Prelude.Text)
listBootstrapActionsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListBootstrapActionsResponse -> f ListBootstrapActionsResponse
listBootstrapActionsResponse_marker = (ListBootstrapActionsResponse -> Maybe Text)
-> (ListBootstrapActionsResponse
    -> Maybe Text -> ListBootstrapActionsResponse)
-> Lens' ListBootstrapActionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBootstrapActionsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListBootstrapActionsResponse' :: ListBootstrapActionsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListBootstrapActionsResponse
s@ListBootstrapActionsResponse' {} Maybe Text
a -> ListBootstrapActionsResponse
s {$sel:marker:ListBootstrapActionsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListBootstrapActionsResponse)

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

instance Prelude.NFData ListBootstrapActionsResponse