{-# 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.DocumentDB.DescribeGlobalClusters
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about Amazon DocumentDB global clusters. This API
-- supports pagination.
--
-- This action only applies to Amazon DocumentDB clusters.
--
-- This operation returns paginated results.
module Amazonka.DocumentDB.DescribeGlobalClusters
  ( -- * Creating a Request
    DescribeGlobalClusters (..),
    newDescribeGlobalClusters,

    -- * Request Lenses
    describeGlobalClusters_filters,
    describeGlobalClusters_globalClusterIdentifier,
    describeGlobalClusters_marker,
    describeGlobalClusters_maxRecords,

    -- * Destructuring the Response
    DescribeGlobalClustersResponse (..),
    newDescribeGlobalClustersResponse,

    -- * Response Lenses
    describeGlobalClustersResponse_globalClusters,
    describeGlobalClustersResponse_marker,
    describeGlobalClustersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeGlobalClusters' smart constructor.
data DescribeGlobalClusters = DescribeGlobalClusters'
  { -- | A filter that specifies one or more global DB clusters to describe.
    --
    -- Supported filters: @db-cluster-id@ accepts cluster identifiers and
    -- cluster Amazon Resource Names (ARNs). The results list will only include
    -- information about the clusters identified by these ARNs.
    DescribeGlobalClusters -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The user-supplied cluster identifier. If this parameter is specified,
    -- information from only the specific cluster is returned. This parameter
    -- isn\'t case-sensitive.
    DescribeGlobalClusters -> Maybe Text
globalClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | An optional pagination token provided by a previous
    -- @DescribeGlobalClusters@ request. If this parameter is specified, the
    -- response includes only records beyond the marker, up to the value
    -- specified by @MaxRecords@.
    DescribeGlobalClusters -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a pagination token
    -- called a marker is included in the response so that you can retrieve the
    -- remaining results.
    DescribeGlobalClusters -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeGlobalClusters -> DescribeGlobalClusters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGlobalClusters -> DescribeGlobalClusters -> Bool
$c/= :: DescribeGlobalClusters -> DescribeGlobalClusters -> Bool
== :: DescribeGlobalClusters -> DescribeGlobalClusters -> Bool
$c== :: DescribeGlobalClusters -> DescribeGlobalClusters -> Bool
Prelude.Eq, ReadPrec [DescribeGlobalClusters]
ReadPrec DescribeGlobalClusters
Int -> ReadS DescribeGlobalClusters
ReadS [DescribeGlobalClusters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGlobalClusters]
$creadListPrec :: ReadPrec [DescribeGlobalClusters]
readPrec :: ReadPrec DescribeGlobalClusters
$creadPrec :: ReadPrec DescribeGlobalClusters
readList :: ReadS [DescribeGlobalClusters]
$creadList :: ReadS [DescribeGlobalClusters]
readsPrec :: Int -> ReadS DescribeGlobalClusters
$creadsPrec :: Int -> ReadS DescribeGlobalClusters
Prelude.Read, Int -> DescribeGlobalClusters -> ShowS
[DescribeGlobalClusters] -> ShowS
DescribeGlobalClusters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGlobalClusters] -> ShowS
$cshowList :: [DescribeGlobalClusters] -> ShowS
show :: DescribeGlobalClusters -> String
$cshow :: DescribeGlobalClusters -> String
showsPrec :: Int -> DescribeGlobalClusters -> ShowS
$cshowsPrec :: Int -> DescribeGlobalClusters -> ShowS
Prelude.Show, forall x. Rep DescribeGlobalClusters x -> DescribeGlobalClusters
forall x. DescribeGlobalClusters -> Rep DescribeGlobalClusters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeGlobalClusters x -> DescribeGlobalClusters
$cfrom :: forall x. DescribeGlobalClusters -> Rep DescribeGlobalClusters x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGlobalClusters' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'filters', 'describeGlobalClusters_filters' - A filter that specifies one or more global DB clusters to describe.
--
-- Supported filters: @db-cluster-id@ accepts cluster identifiers and
-- cluster Amazon Resource Names (ARNs). The results list will only include
-- information about the clusters identified by these ARNs.
--
-- 'globalClusterIdentifier', 'describeGlobalClusters_globalClusterIdentifier' - The user-supplied cluster identifier. If this parameter is specified,
-- information from only the specific cluster is returned. This parameter
-- isn\'t case-sensitive.
--
-- 'marker', 'describeGlobalClusters_marker' - An optional pagination token provided by a previous
-- @DescribeGlobalClusters@ request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
--
-- 'maxRecords', 'describeGlobalClusters_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
newDescribeGlobalClusters ::
  DescribeGlobalClusters
newDescribeGlobalClusters :: DescribeGlobalClusters
newDescribeGlobalClusters =
  DescribeGlobalClusters'
    { $sel:filters:DescribeGlobalClusters' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:globalClusterIdentifier:DescribeGlobalClusters' :: Maybe Text
globalClusterIdentifier = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeGlobalClusters' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeGlobalClusters' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that specifies one or more global DB clusters to describe.
--
-- Supported filters: @db-cluster-id@ accepts cluster identifiers and
-- cluster Amazon Resource Names (ARNs). The results list will only include
-- information about the clusters identified by these ARNs.
describeGlobalClusters_filters :: Lens.Lens' DescribeGlobalClusters (Prelude.Maybe [Filter])
describeGlobalClusters_filters :: Lens' DescribeGlobalClusters (Maybe [Filter])
describeGlobalClusters_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClusters' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeGlobalClusters
s@DescribeGlobalClusters' {} Maybe [Filter]
a -> DescribeGlobalClusters
s {$sel:filters:DescribeGlobalClusters' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeGlobalClusters) 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 user-supplied cluster identifier. If this parameter is specified,
-- information from only the specific cluster is returned. This parameter
-- isn\'t case-sensitive.
describeGlobalClusters_globalClusterIdentifier :: Lens.Lens' DescribeGlobalClusters (Prelude.Maybe Prelude.Text)
describeGlobalClusters_globalClusterIdentifier :: Lens' DescribeGlobalClusters (Maybe Text)
describeGlobalClusters_globalClusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClusters' {Maybe Text
globalClusterIdentifier :: Maybe Text
$sel:globalClusterIdentifier:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
globalClusterIdentifier} -> Maybe Text
globalClusterIdentifier) (\s :: DescribeGlobalClusters
s@DescribeGlobalClusters' {} Maybe Text
a -> DescribeGlobalClusters
s {$sel:globalClusterIdentifier:DescribeGlobalClusters' :: Maybe Text
globalClusterIdentifier = Maybe Text
a} :: DescribeGlobalClusters)

-- | An optional pagination token provided by a previous
-- @DescribeGlobalClusters@ request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
describeGlobalClusters_marker :: Lens.Lens' DescribeGlobalClusters (Prelude.Maybe Prelude.Text)
describeGlobalClusters_marker :: Lens' DescribeGlobalClusters (Maybe Text)
describeGlobalClusters_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClusters' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeGlobalClusters
s@DescribeGlobalClusters' {} Maybe Text
a -> DescribeGlobalClusters
s {$sel:marker:DescribeGlobalClusters' :: Maybe Text
marker = Maybe Text
a} :: DescribeGlobalClusters)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
describeGlobalClusters_maxRecords :: Lens.Lens' DescribeGlobalClusters (Prelude.Maybe Prelude.Int)
describeGlobalClusters_maxRecords :: Lens' DescribeGlobalClusters (Maybe Int)
describeGlobalClusters_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClusters' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeGlobalClusters
s@DescribeGlobalClusters' {} Maybe Int
a -> DescribeGlobalClusters
s {$sel:maxRecords:DescribeGlobalClusters' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeGlobalClusters)

instance Core.AWSPager DescribeGlobalClusters where
  page :: DescribeGlobalClusters
-> AWSResponse DescribeGlobalClusters
-> Maybe DescribeGlobalClusters
page DescribeGlobalClusters
rq AWSResponse DescribeGlobalClusters
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeGlobalClusters
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGlobalClustersResponse (Maybe Text)
describeGlobalClustersResponse_marker
            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 DescribeGlobalClusters
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGlobalClustersResponse (Maybe [GlobalCluster])
describeGlobalClustersResponse_globalClusters
            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.$ DescribeGlobalClusters
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeGlobalClusters (Maybe Text)
describeGlobalClusters_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeGlobalClusters
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGlobalClustersResponse (Maybe Text)
describeGlobalClustersResponse_marker
          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 DescribeGlobalClusters where
  type
    AWSResponse DescribeGlobalClusters =
      DescribeGlobalClustersResponse
  request :: (Service -> Service)
-> DescribeGlobalClusters -> Request DescribeGlobalClusters
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeGlobalClusters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeGlobalClusters)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeGlobalClustersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [GlobalCluster]
-> Maybe Text -> Int -> DescribeGlobalClustersResponse
DescribeGlobalClustersResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"GlobalClusters"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"GlobalClusterMember")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            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 DescribeGlobalClusters where
  hashWithSalt :: Int -> DescribeGlobalClusters -> Int
hashWithSalt Int
_salt DescribeGlobalClusters' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
globalClusterIdentifier :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Int
$sel:marker:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:globalClusterIdentifier:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:filters:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
globalClusterIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords

instance Prelude.NFData DescribeGlobalClusters where
  rnf :: DescribeGlobalClusters -> ()
rnf DescribeGlobalClusters' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
globalClusterIdentifier :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Int
$sel:marker:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:globalClusterIdentifier:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:filters:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
globalClusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords

instance Data.ToHeaders DescribeGlobalClusters where
  toHeaders :: DescribeGlobalClusters -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeGlobalClusters where
  toQuery :: DescribeGlobalClusters -> QueryString
toQuery DescribeGlobalClusters' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
globalClusterIdentifier :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Int
$sel:marker:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:globalClusterIdentifier:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe Text
$sel:filters:DescribeGlobalClusters' :: DescribeGlobalClusters -> Maybe [Filter]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeGlobalClusters" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Filters"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"GlobalClusterIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
globalClusterIdentifier,
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords
      ]

-- | /See:/ 'newDescribeGlobalClustersResponse' smart constructor.
data DescribeGlobalClustersResponse = DescribeGlobalClustersResponse'
  { DescribeGlobalClustersResponse -> Maybe [GlobalCluster]
globalClusters :: Prelude.Maybe [GlobalCluster],
    DescribeGlobalClustersResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeGlobalClustersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeGlobalClustersResponse
-> DescribeGlobalClustersResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGlobalClustersResponse
-> DescribeGlobalClustersResponse -> Bool
$c/= :: DescribeGlobalClustersResponse
-> DescribeGlobalClustersResponse -> Bool
== :: DescribeGlobalClustersResponse
-> DescribeGlobalClustersResponse -> Bool
$c== :: DescribeGlobalClustersResponse
-> DescribeGlobalClustersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGlobalClustersResponse]
ReadPrec DescribeGlobalClustersResponse
Int -> ReadS DescribeGlobalClustersResponse
ReadS [DescribeGlobalClustersResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGlobalClustersResponse]
$creadListPrec :: ReadPrec [DescribeGlobalClustersResponse]
readPrec :: ReadPrec DescribeGlobalClustersResponse
$creadPrec :: ReadPrec DescribeGlobalClustersResponse
readList :: ReadS [DescribeGlobalClustersResponse]
$creadList :: ReadS [DescribeGlobalClustersResponse]
readsPrec :: Int -> ReadS DescribeGlobalClustersResponse
$creadsPrec :: Int -> ReadS DescribeGlobalClustersResponse
Prelude.Read, Int -> DescribeGlobalClustersResponse -> ShowS
[DescribeGlobalClustersResponse] -> ShowS
DescribeGlobalClustersResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGlobalClustersResponse] -> ShowS
$cshowList :: [DescribeGlobalClustersResponse] -> ShowS
show :: DescribeGlobalClustersResponse -> String
$cshow :: DescribeGlobalClustersResponse -> String
showsPrec :: Int -> DescribeGlobalClustersResponse -> ShowS
$cshowsPrec :: Int -> DescribeGlobalClustersResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeGlobalClustersResponse x
-> DescribeGlobalClustersResponse
forall x.
DescribeGlobalClustersResponse
-> Rep DescribeGlobalClustersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGlobalClustersResponse x
-> DescribeGlobalClustersResponse
$cfrom :: forall x.
DescribeGlobalClustersResponse
-> Rep DescribeGlobalClustersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGlobalClustersResponse' 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:
--
-- 'globalClusters', 'describeGlobalClustersResponse_globalClusters' -
--
-- 'marker', 'describeGlobalClustersResponse_marker' -
--
-- 'httpStatus', 'describeGlobalClustersResponse_httpStatus' - The response's http status code.
newDescribeGlobalClustersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeGlobalClustersResponse
newDescribeGlobalClustersResponse :: Int -> DescribeGlobalClustersResponse
newDescribeGlobalClustersResponse Int
pHttpStatus_ =
  DescribeGlobalClustersResponse'
    { $sel:globalClusters:DescribeGlobalClustersResponse' :: Maybe [GlobalCluster]
globalClusters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeGlobalClustersResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeGlobalClustersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

describeGlobalClustersResponse_globalClusters :: Lens.Lens' DescribeGlobalClustersResponse (Prelude.Maybe [GlobalCluster])
describeGlobalClustersResponse_globalClusters :: Lens' DescribeGlobalClustersResponse (Maybe [GlobalCluster])
describeGlobalClustersResponse_globalClusters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClustersResponse' {Maybe [GlobalCluster]
globalClusters :: Maybe [GlobalCluster]
$sel:globalClusters:DescribeGlobalClustersResponse' :: DescribeGlobalClustersResponse -> Maybe [GlobalCluster]
globalClusters} -> Maybe [GlobalCluster]
globalClusters) (\s :: DescribeGlobalClustersResponse
s@DescribeGlobalClustersResponse' {} Maybe [GlobalCluster]
a -> DescribeGlobalClustersResponse
s {$sel:globalClusters:DescribeGlobalClustersResponse' :: Maybe [GlobalCluster]
globalClusters = Maybe [GlobalCluster]
a} :: DescribeGlobalClustersResponse) 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

describeGlobalClustersResponse_marker :: Lens.Lens' DescribeGlobalClustersResponse (Prelude.Maybe Prelude.Text)
describeGlobalClustersResponse_marker :: Lens' DescribeGlobalClustersResponse (Maybe Text)
describeGlobalClustersResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGlobalClustersResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeGlobalClustersResponse' :: DescribeGlobalClustersResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeGlobalClustersResponse
s@DescribeGlobalClustersResponse' {} Maybe Text
a -> DescribeGlobalClustersResponse
s {$sel:marker:DescribeGlobalClustersResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeGlobalClustersResponse)

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

instance
  Prelude.NFData
    DescribeGlobalClustersResponse
  where
  rnf :: DescribeGlobalClustersResponse -> ()
rnf DescribeGlobalClustersResponse' {Int
Maybe [GlobalCluster]
Maybe Text
httpStatus :: Int
marker :: Maybe Text
globalClusters :: Maybe [GlobalCluster]
$sel:httpStatus:DescribeGlobalClustersResponse' :: DescribeGlobalClustersResponse -> Int
$sel:marker:DescribeGlobalClustersResponse' :: DescribeGlobalClustersResponse -> Maybe Text
$sel:globalClusters:DescribeGlobalClustersResponse' :: DescribeGlobalClustersResponse -> Maybe [GlobalCluster]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [GlobalCluster]
globalClusters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus