{-# 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.ListInstanceFleets
-- 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 all available details about the instance fleets in a cluster.
--
-- The instance fleet configuration is available only in Amazon EMR
-- versions 4.8.0 and later, excluding 5.0.x versions.
--
-- This operation returns paginated results.
module Amazonka.EMR.ListInstanceFleets
  ( -- * Creating a Request
    ListInstanceFleets (..),
    newListInstanceFleets,

    -- * Request Lenses
    listInstanceFleets_marker,
    listInstanceFleets_clusterId,

    -- * Destructuring the Response
    ListInstanceFleetsResponse (..),
    newListInstanceFleetsResponse,

    -- * Response Lenses
    listInstanceFleetsResponse_instanceFleets,
    listInstanceFleetsResponse_marker,
    listInstanceFleetsResponse_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

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

-- |
-- Create a value of 'ListInstanceFleets' 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', 'listInstanceFleets_marker' - The pagination token that indicates the next set of results to retrieve.
--
-- 'clusterId', 'listInstanceFleets_clusterId' - The unique identifier of the cluster.
newListInstanceFleets ::
  -- | 'clusterId'
  Prelude.Text ->
  ListInstanceFleets
newListInstanceFleets :: Text -> ListInstanceFleets
newListInstanceFleets Text
pClusterId_ =
  ListInstanceFleets' :: Maybe Text -> Text -> ListInstanceFleets
ListInstanceFleets'
    { $sel:marker:ListInstanceFleets' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterId:ListInstanceFleets' :: Text
clusterId = Text
pClusterId_
    }

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

-- | The unique identifier of the cluster.
listInstanceFleets_clusterId :: Lens.Lens' ListInstanceFleets Prelude.Text
listInstanceFleets_clusterId :: (Text -> f Text) -> ListInstanceFleets -> f ListInstanceFleets
listInstanceFleets_clusterId = (ListInstanceFleets -> Text)
-> (ListInstanceFleets -> Text -> ListInstanceFleets)
-> Lens ListInstanceFleets ListInstanceFleets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceFleets' {Text
clusterId :: Text
$sel:clusterId:ListInstanceFleets' :: ListInstanceFleets -> Text
clusterId} -> Text
clusterId) (\s :: ListInstanceFleets
s@ListInstanceFleets' {} Text
a -> ListInstanceFleets
s {$sel:clusterId:ListInstanceFleets' :: Text
clusterId = Text
a} :: ListInstanceFleets)

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

instance Prelude.NFData ListInstanceFleets

instance Core.ToHeaders ListInstanceFleets where
  toHeaders :: ListInstanceFleets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListInstanceFleets -> 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.ListInstanceFleets" ::
                          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 ListInstanceFleets where
  toJSON :: ListInstanceFleets -> Value
toJSON ListInstanceFleets' {Maybe Text
Text
clusterId :: Text
marker :: Maybe Text
$sel:clusterId:ListInstanceFleets' :: ListInstanceFleets -> Text
$sel:marker:ListInstanceFleets' :: ListInstanceFleets -> 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 ListInstanceFleets where
  toPath :: ListInstanceFleets -> ByteString
toPath = ByteString -> ListInstanceFleets -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListInstanceFleetsResponse' smart constructor.
data ListInstanceFleetsResponse = ListInstanceFleetsResponse'
  { -- | The list of instance fleets for the cluster and given filters.
    ListInstanceFleetsResponse -> Maybe [InstanceFleet]
instanceFleets :: Prelude.Maybe [InstanceFleet],
    -- | The pagination token that indicates the next set of results to retrieve.
    ListInstanceFleetsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListInstanceFleetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool
(ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool)
-> (ListInstanceFleetsResponse
    -> ListInstanceFleetsResponse -> Bool)
-> Eq ListInstanceFleetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool
$c/= :: ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool
== :: ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool
$c== :: ListInstanceFleetsResponse -> ListInstanceFleetsResponse -> Bool
Prelude.Eq, ReadPrec [ListInstanceFleetsResponse]
ReadPrec ListInstanceFleetsResponse
Int -> ReadS ListInstanceFleetsResponse
ReadS [ListInstanceFleetsResponse]
(Int -> ReadS ListInstanceFleetsResponse)
-> ReadS [ListInstanceFleetsResponse]
-> ReadPrec ListInstanceFleetsResponse
-> ReadPrec [ListInstanceFleetsResponse]
-> Read ListInstanceFleetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceFleetsResponse]
$creadListPrec :: ReadPrec [ListInstanceFleetsResponse]
readPrec :: ReadPrec ListInstanceFleetsResponse
$creadPrec :: ReadPrec ListInstanceFleetsResponse
readList :: ReadS [ListInstanceFleetsResponse]
$creadList :: ReadS [ListInstanceFleetsResponse]
readsPrec :: Int -> ReadS ListInstanceFleetsResponse
$creadsPrec :: Int -> ReadS ListInstanceFleetsResponse
Prelude.Read, Int -> ListInstanceFleetsResponse -> ShowS
[ListInstanceFleetsResponse] -> ShowS
ListInstanceFleetsResponse -> String
(Int -> ListInstanceFleetsResponse -> ShowS)
-> (ListInstanceFleetsResponse -> String)
-> ([ListInstanceFleetsResponse] -> ShowS)
-> Show ListInstanceFleetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceFleetsResponse] -> ShowS
$cshowList :: [ListInstanceFleetsResponse] -> ShowS
show :: ListInstanceFleetsResponse -> String
$cshow :: ListInstanceFleetsResponse -> String
showsPrec :: Int -> ListInstanceFleetsResponse -> ShowS
$cshowsPrec :: Int -> ListInstanceFleetsResponse -> ShowS
Prelude.Show, (forall x.
 ListInstanceFleetsResponse -> Rep ListInstanceFleetsResponse x)
-> (forall x.
    Rep ListInstanceFleetsResponse x -> ListInstanceFleetsResponse)
-> Generic ListInstanceFleetsResponse
forall x.
Rep ListInstanceFleetsResponse x -> ListInstanceFleetsResponse
forall x.
ListInstanceFleetsResponse -> Rep ListInstanceFleetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInstanceFleetsResponse x -> ListInstanceFleetsResponse
$cfrom :: forall x.
ListInstanceFleetsResponse -> Rep ListInstanceFleetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceFleetsResponse' 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:
--
-- 'instanceFleets', 'listInstanceFleetsResponse_instanceFleets' - The list of instance fleets for the cluster and given filters.
--
-- 'marker', 'listInstanceFleetsResponse_marker' - The pagination token that indicates the next set of results to retrieve.
--
-- 'httpStatus', 'listInstanceFleetsResponse_httpStatus' - The response's http status code.
newListInstanceFleetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInstanceFleetsResponse
newListInstanceFleetsResponse :: Int -> ListInstanceFleetsResponse
newListInstanceFleetsResponse Int
pHttpStatus_ =
  ListInstanceFleetsResponse' :: Maybe [InstanceFleet]
-> Maybe Text -> Int -> ListInstanceFleetsResponse
ListInstanceFleetsResponse'
    { $sel:instanceFleets:ListInstanceFleetsResponse' :: Maybe [InstanceFleet]
instanceFleets =
        Maybe [InstanceFleet]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListInstanceFleetsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInstanceFleetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of instance fleets for the cluster and given filters.
listInstanceFleetsResponse_instanceFleets :: Lens.Lens' ListInstanceFleetsResponse (Prelude.Maybe [InstanceFleet])
listInstanceFleetsResponse_instanceFleets :: (Maybe [InstanceFleet] -> f (Maybe [InstanceFleet]))
-> ListInstanceFleetsResponse -> f ListInstanceFleetsResponse
listInstanceFleetsResponse_instanceFleets = (ListInstanceFleetsResponse -> Maybe [InstanceFleet])
-> (ListInstanceFleetsResponse
    -> Maybe [InstanceFleet] -> ListInstanceFleetsResponse)
-> Lens' ListInstanceFleetsResponse (Maybe [InstanceFleet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceFleetsResponse' {Maybe [InstanceFleet]
instanceFleets :: Maybe [InstanceFleet]
$sel:instanceFleets:ListInstanceFleetsResponse' :: ListInstanceFleetsResponse -> Maybe [InstanceFleet]
instanceFleets} -> Maybe [InstanceFleet]
instanceFleets) (\s :: ListInstanceFleetsResponse
s@ListInstanceFleetsResponse' {} Maybe [InstanceFleet]
a -> ListInstanceFleetsResponse
s {$sel:instanceFleets:ListInstanceFleetsResponse' :: Maybe [InstanceFleet]
instanceFleets = Maybe [InstanceFleet]
a} :: ListInstanceFleetsResponse) ((Maybe [InstanceFleet] -> f (Maybe [InstanceFleet]))
 -> ListInstanceFleetsResponse -> f ListInstanceFleetsResponse)
-> ((Maybe [InstanceFleet] -> f (Maybe [InstanceFleet]))
    -> Maybe [InstanceFleet] -> f (Maybe [InstanceFleet]))
-> (Maybe [InstanceFleet] -> f (Maybe [InstanceFleet]))
-> ListInstanceFleetsResponse
-> f ListInstanceFleetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InstanceFleet] [InstanceFleet] [InstanceFleet] [InstanceFleet]
-> Iso
     (Maybe [InstanceFleet])
     (Maybe [InstanceFleet])
     (Maybe [InstanceFleet])
     (Maybe [InstanceFleet])
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
  [InstanceFleet] [InstanceFleet] [InstanceFleet] [InstanceFleet]
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.
listInstanceFleetsResponse_marker :: Lens.Lens' ListInstanceFleetsResponse (Prelude.Maybe Prelude.Text)
listInstanceFleetsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListInstanceFleetsResponse -> f ListInstanceFleetsResponse
listInstanceFleetsResponse_marker = (ListInstanceFleetsResponse -> Maybe Text)
-> (ListInstanceFleetsResponse
    -> Maybe Text -> ListInstanceFleetsResponse)
-> Lens' ListInstanceFleetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceFleetsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListInstanceFleetsResponse' :: ListInstanceFleetsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListInstanceFleetsResponse
s@ListInstanceFleetsResponse' {} Maybe Text
a -> ListInstanceFleetsResponse
s {$sel:marker:ListInstanceFleetsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListInstanceFleetsResponse)

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

instance Prelude.NFData ListInstanceFleetsResponse