{-# 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.GameLift.DescribeFleetAttributes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves core fleet-wide properties, including the computing hardware
-- and deployment configuration for all instances in the fleet.
--
-- This operation can be used in the following ways:
--
-- -   To get attributes for one or more specific fleets, provide a list of
--     fleet IDs or fleet ARNs.
--
-- -   To get attributes for all fleets, do not provide a fleet identifier.
--
-- When requesting attributes for multiple fleets, use the pagination
-- parameters to retrieve results as a set of sequential pages.
--
-- If successful, a @FleetAttributes@ object is returned for each fleet
-- requested, unless the fleet identifier is not found.
--
-- Some API operations limit the number of fleet IDs that allowed in one
-- request. If a request exceeds this limit, the request fails and the
-- error message contains the maximum allowed number.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html Setting up GameLift fleets>
--
-- This operation returns paginated results.
module Amazonka.GameLift.DescribeFleetAttributes
  ( -- * Creating a Request
    DescribeFleetAttributes (..),
    newDescribeFleetAttributes,

    -- * Request Lenses
    describeFleetAttributes_fleetIds,
    describeFleetAttributes_limit,
    describeFleetAttributes_nextToken,

    -- * Destructuring the Response
    DescribeFleetAttributesResponse (..),
    newDescribeFleetAttributesResponse,

    -- * Response Lenses
    describeFleetAttributesResponse_fleetAttributes,
    describeFleetAttributesResponse_nextToken,
    describeFleetAttributesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeFleetAttributes' smart constructor.
data DescribeFleetAttributes = DescribeFleetAttributes'
  { -- | A list of unique fleet identifiers to retrieve attributes for. You can
    -- use either the fleet ID or ARN value. To retrieve attributes for all
    -- current fleets, do not include this parameter.
    DescribeFleetAttributes -> Maybe (NonEmpty Text)
fleetIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The maximum number of results to return. Use this parameter with
    -- @NextToken@ to get results as a set of sequential pages. This parameter
    -- is ignored when the request specifies one or a list of fleet IDs.
    DescribeFleetAttributes -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | A token that indicates the start of the next sequential page of results.
    -- Use the token that is returned with a previous call to this operation.
    -- To start at the beginning of the result set, do not specify a value.
    -- This parameter is ignored when the request specifies one or a list of
    -- fleet IDs.
    DescribeFleetAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeFleetAttributes -> DescribeFleetAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetAttributes -> DescribeFleetAttributes -> Bool
$c/= :: DescribeFleetAttributes -> DescribeFleetAttributes -> Bool
== :: DescribeFleetAttributes -> DescribeFleetAttributes -> Bool
$c== :: DescribeFleetAttributes -> DescribeFleetAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeFleetAttributes]
ReadPrec DescribeFleetAttributes
Int -> ReadS DescribeFleetAttributes
ReadS [DescribeFleetAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetAttributes]
$creadListPrec :: ReadPrec [DescribeFleetAttributes]
readPrec :: ReadPrec DescribeFleetAttributes
$creadPrec :: ReadPrec DescribeFleetAttributes
readList :: ReadS [DescribeFleetAttributes]
$creadList :: ReadS [DescribeFleetAttributes]
readsPrec :: Int -> ReadS DescribeFleetAttributes
$creadsPrec :: Int -> ReadS DescribeFleetAttributes
Prelude.Read, Int -> DescribeFleetAttributes -> ShowS
[DescribeFleetAttributes] -> ShowS
DescribeFleetAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetAttributes] -> ShowS
$cshowList :: [DescribeFleetAttributes] -> ShowS
show :: DescribeFleetAttributes -> String
$cshow :: DescribeFleetAttributes -> String
showsPrec :: Int -> DescribeFleetAttributes -> ShowS
$cshowsPrec :: Int -> DescribeFleetAttributes -> ShowS
Prelude.Show, forall x. Rep DescribeFleetAttributes x -> DescribeFleetAttributes
forall x. DescribeFleetAttributes -> Rep DescribeFleetAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFleetAttributes x -> DescribeFleetAttributes
$cfrom :: forall x. DescribeFleetAttributes -> Rep DescribeFleetAttributes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetAttributes' 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:
--
-- 'fleetIds', 'describeFleetAttributes_fleetIds' - A list of unique fleet identifiers to retrieve attributes for. You can
-- use either the fleet ID or ARN value. To retrieve attributes for all
-- current fleets, do not include this parameter.
--
-- 'limit', 'describeFleetAttributes_limit' - The maximum number of results to return. Use this parameter with
-- @NextToken@ to get results as a set of sequential pages. This parameter
-- is ignored when the request specifies one or a list of fleet IDs.
--
-- 'nextToken', 'describeFleetAttributes_nextToken' - A token that indicates the start of the next sequential page of results.
-- Use the token that is returned with a previous call to this operation.
-- To start at the beginning of the result set, do not specify a value.
-- This parameter is ignored when the request specifies one or a list of
-- fleet IDs.
newDescribeFleetAttributes ::
  DescribeFleetAttributes
newDescribeFleetAttributes :: DescribeFleetAttributes
newDescribeFleetAttributes =
  DescribeFleetAttributes'
    { $sel:fleetIds:DescribeFleetAttributes' :: Maybe (NonEmpty Text)
fleetIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeFleetAttributes' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFleetAttributes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | A list of unique fleet identifiers to retrieve attributes for. You can
-- use either the fleet ID or ARN value. To retrieve attributes for all
-- current fleets, do not include this parameter.
describeFleetAttributes_fleetIds :: Lens.Lens' DescribeFleetAttributes (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeFleetAttributes_fleetIds :: Lens' DescribeFleetAttributes (Maybe (NonEmpty Text))
describeFleetAttributes_fleetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAttributes' {Maybe (NonEmpty Text)
fleetIds :: Maybe (NonEmpty Text)
$sel:fleetIds:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe (NonEmpty Text)
fleetIds} -> Maybe (NonEmpty Text)
fleetIds) (\s :: DescribeFleetAttributes
s@DescribeFleetAttributes' {} Maybe (NonEmpty Text)
a -> DescribeFleetAttributes
s {$sel:fleetIds:DescribeFleetAttributes' :: Maybe (NonEmpty Text)
fleetIds = Maybe (NonEmpty Text)
a} :: DescribeFleetAttributes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return. Use this parameter with
-- @NextToken@ to get results as a set of sequential pages. This parameter
-- is ignored when the request specifies one or a list of fleet IDs.
describeFleetAttributes_limit :: Lens.Lens' DescribeFleetAttributes (Prelude.Maybe Prelude.Natural)
describeFleetAttributes_limit :: Lens' DescribeFleetAttributes (Maybe Natural)
describeFleetAttributes_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAttributes' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeFleetAttributes
s@DescribeFleetAttributes' {} Maybe Natural
a -> DescribeFleetAttributes
s {$sel:limit:DescribeFleetAttributes' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeFleetAttributes)

-- | A token that indicates the start of the next sequential page of results.
-- Use the token that is returned with a previous call to this operation.
-- To start at the beginning of the result set, do not specify a value.
-- This parameter is ignored when the request specifies one or a list of
-- fleet IDs.
describeFleetAttributes_nextToken :: Lens.Lens' DescribeFleetAttributes (Prelude.Maybe Prelude.Text)
describeFleetAttributes_nextToken :: Lens' DescribeFleetAttributes (Maybe Text)
describeFleetAttributes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAttributes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFleetAttributes
s@DescribeFleetAttributes' {} Maybe Text
a -> DescribeFleetAttributes
s {$sel:nextToken:DescribeFleetAttributes' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFleetAttributes)

instance Core.AWSPager DescribeFleetAttributes where
  page :: DescribeFleetAttributes
-> AWSResponse DescribeFleetAttributes
-> Maybe DescribeFleetAttributes
page DescribeFleetAttributes
rq AWSResponse DescribeFleetAttributes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeFleetAttributes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFleetAttributesResponse (Maybe Text)
describeFleetAttributesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeFleetAttributes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFleetAttributesResponse (Maybe [FleetAttributes])
describeFleetAttributesResponse_fleetAttributes
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeFleetAttributes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeFleetAttributes (Maybe Text)
describeFleetAttributes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeFleetAttributes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFleetAttributesResponse (Maybe Text)
describeFleetAttributesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeFleetAttributes where
  type
    AWSResponse DescribeFleetAttributes =
      DescribeFleetAttributesResponse
  request :: (Service -> Service)
-> DescribeFleetAttributes -> Request DescribeFleetAttributes
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeFleetAttributes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFleetAttributes)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [FleetAttributes]
-> Maybe Text -> Int -> DescribeFleetAttributesResponse
DescribeFleetAttributesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FleetAttributes"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeFleetAttributes where
  hashWithSalt :: Int -> DescribeFleetAttributes -> Int
hashWithSalt Int
_salt DescribeFleetAttributes' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
fleetIds :: Maybe (NonEmpty Text)
$sel:nextToken:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Text
$sel:limit:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Natural
$sel:fleetIds:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe (NonEmpty Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
fleetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeFleetAttributes where
  rnf :: DescribeFleetAttributes -> ()
rnf DescribeFleetAttributes' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
fleetIds :: Maybe (NonEmpty Text)
$sel:nextToken:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Text
$sel:limit:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Natural
$sel:fleetIds:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe (NonEmpty Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
fleetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

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

instance Data.ToJSON DescribeFleetAttributes where
  toJSON :: DescribeFleetAttributes -> Value
toJSON DescribeFleetAttributes' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
fleetIds :: Maybe (NonEmpty Text)
$sel:nextToken:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Text
$sel:limit:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe Natural
$sel:fleetIds:DescribeFleetAttributes' :: DescribeFleetAttributes -> Maybe (NonEmpty Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"FleetIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
fleetIds,
            (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

-- | /See:/ 'newDescribeFleetAttributesResponse' smart constructor.
data DescribeFleetAttributesResponse = DescribeFleetAttributesResponse'
  { -- | A collection of objects containing attribute metadata for each requested
    -- fleet ID. Attribute objects are returned only for fleets that currently
    -- exist.
    DescribeFleetAttributesResponse -> Maybe [FleetAttributes]
fleetAttributes :: Prelude.Maybe [FleetAttributes],
    -- | A token that indicates where to resume retrieving results on the next
    -- call to this operation. If no token is returned, these results represent
    -- the end of the list.
    DescribeFleetAttributesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFleetAttributesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFleetAttributesResponse
-> DescribeFleetAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetAttributesResponse
-> DescribeFleetAttributesResponse -> Bool
$c/= :: DescribeFleetAttributesResponse
-> DescribeFleetAttributesResponse -> Bool
== :: DescribeFleetAttributesResponse
-> DescribeFleetAttributesResponse -> Bool
$c== :: DescribeFleetAttributesResponse
-> DescribeFleetAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFleetAttributesResponse]
ReadPrec DescribeFleetAttributesResponse
Int -> ReadS DescribeFleetAttributesResponse
ReadS [DescribeFleetAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetAttributesResponse]
$creadListPrec :: ReadPrec [DescribeFleetAttributesResponse]
readPrec :: ReadPrec DescribeFleetAttributesResponse
$creadPrec :: ReadPrec DescribeFleetAttributesResponse
readList :: ReadS [DescribeFleetAttributesResponse]
$creadList :: ReadS [DescribeFleetAttributesResponse]
readsPrec :: Int -> ReadS DescribeFleetAttributesResponse
$creadsPrec :: Int -> ReadS DescribeFleetAttributesResponse
Prelude.Read, Int -> DescribeFleetAttributesResponse -> ShowS
[DescribeFleetAttributesResponse] -> ShowS
DescribeFleetAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetAttributesResponse] -> ShowS
$cshowList :: [DescribeFleetAttributesResponse] -> ShowS
show :: DescribeFleetAttributesResponse -> String
$cshow :: DescribeFleetAttributesResponse -> String
showsPrec :: Int -> DescribeFleetAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeFleetAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeFleetAttributesResponse x
-> DescribeFleetAttributesResponse
forall x.
DescribeFleetAttributesResponse
-> Rep DescribeFleetAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetAttributesResponse x
-> DescribeFleetAttributesResponse
$cfrom :: forall x.
DescribeFleetAttributesResponse
-> Rep DescribeFleetAttributesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetAttributesResponse' 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:
--
-- 'fleetAttributes', 'describeFleetAttributesResponse_fleetAttributes' - A collection of objects containing attribute metadata for each requested
-- fleet ID. Attribute objects are returned only for fleets that currently
-- exist.
--
-- 'nextToken', 'describeFleetAttributesResponse_nextToken' - A token that indicates where to resume retrieving results on the next
-- call to this operation. If no token is returned, these results represent
-- the end of the list.
--
-- 'httpStatus', 'describeFleetAttributesResponse_httpStatus' - The response's http status code.
newDescribeFleetAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFleetAttributesResponse
newDescribeFleetAttributesResponse :: Int -> DescribeFleetAttributesResponse
newDescribeFleetAttributesResponse Int
pHttpStatus_ =
  DescribeFleetAttributesResponse'
    { $sel:fleetAttributes:DescribeFleetAttributesResponse' :: Maybe [FleetAttributes]
fleetAttributes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFleetAttributesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFleetAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A collection of objects containing attribute metadata for each requested
-- fleet ID. Attribute objects are returned only for fleets that currently
-- exist.
describeFleetAttributesResponse_fleetAttributes :: Lens.Lens' DescribeFleetAttributesResponse (Prelude.Maybe [FleetAttributes])
describeFleetAttributesResponse_fleetAttributes :: Lens' DescribeFleetAttributesResponse (Maybe [FleetAttributes])
describeFleetAttributesResponse_fleetAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAttributesResponse' {Maybe [FleetAttributes]
fleetAttributes :: Maybe [FleetAttributes]
$sel:fleetAttributes:DescribeFleetAttributesResponse' :: DescribeFleetAttributesResponse -> Maybe [FleetAttributes]
fleetAttributes} -> Maybe [FleetAttributes]
fleetAttributes) (\s :: DescribeFleetAttributesResponse
s@DescribeFleetAttributesResponse' {} Maybe [FleetAttributes]
a -> DescribeFleetAttributesResponse
s {$sel:fleetAttributes:DescribeFleetAttributesResponse' :: Maybe [FleetAttributes]
fleetAttributes = Maybe [FleetAttributes]
a} :: DescribeFleetAttributesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token that indicates where to resume retrieving results on the next
-- call to this operation. If no token is returned, these results represent
-- the end of the list.
describeFleetAttributesResponse_nextToken :: Lens.Lens' DescribeFleetAttributesResponse (Prelude.Maybe Prelude.Text)
describeFleetAttributesResponse_nextToken :: Lens' DescribeFleetAttributesResponse (Maybe Text)
describeFleetAttributesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAttributesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFleetAttributesResponse' :: DescribeFleetAttributesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFleetAttributesResponse
s@DescribeFleetAttributesResponse' {} Maybe Text
a -> DescribeFleetAttributesResponse
s {$sel:nextToken:DescribeFleetAttributesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFleetAttributesResponse)

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

instance
  Prelude.NFData
    DescribeFleetAttributesResponse
  where
  rnf :: DescribeFleetAttributesResponse -> ()
rnf DescribeFleetAttributesResponse' {Int
Maybe [FleetAttributes]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
fleetAttributes :: Maybe [FleetAttributes]
$sel:httpStatus:DescribeFleetAttributesResponse' :: DescribeFleetAttributesResponse -> Int
$sel:nextToken:DescribeFleetAttributesResponse' :: DescribeFleetAttributesResponse -> Maybe Text
$sel:fleetAttributes:DescribeFleetAttributesResponse' :: DescribeFleetAttributesResponse -> Maybe [FleetAttributes]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [FleetAttributes]
fleetAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus