{-# 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.Redshift.DescribeClusterSubnetGroups
-- 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 one or more cluster subnet group objects, which contain metadata
-- about your cluster subnet groups. By default, this operation returns
-- information about all cluster subnet groups that are defined in your
-- Amazon Web Services account.
--
-- If you specify both tag keys and tag values in the same request, Amazon
-- Redshift returns all subnet groups that match any combination of the
-- specified keys and values. For example, if you have @owner@ and
-- @environment@ for tag keys, and @admin@ and @test@ for tag values, all
-- subnet groups that have any combination of those values are returned.
--
-- If both tag keys and values are omitted from the request, subnet groups
-- are returned regardless of whether they have tag keys or values
-- associated with them.
--
-- This operation returns paginated results.
module Amazonka.Redshift.DescribeClusterSubnetGroups
  ( -- * Creating a Request
    DescribeClusterSubnetGroups (..),
    newDescribeClusterSubnetGroups,

    -- * Request Lenses
    describeClusterSubnetGroups_clusterSubnetGroupName,
    describeClusterSubnetGroups_marker,
    describeClusterSubnetGroups_maxRecords,
    describeClusterSubnetGroups_tagKeys,
    describeClusterSubnetGroups_tagValues,

    -- * Destructuring the Response
    DescribeClusterSubnetGroupsResponse (..),
    newDescribeClusterSubnetGroupsResponse,

    -- * Response Lenses
    describeClusterSubnetGroupsResponse_clusterSubnetGroups,
    describeClusterSubnetGroupsResponse_marker,
    describeClusterSubnetGroupsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeClusterSubnetGroups' smart constructor.
data DescribeClusterSubnetGroups = DescribeClusterSubnetGroups'
  { -- | The name of the cluster subnet group for which information is requested.
    DescribeClusterSubnetGroups -> Maybe Text
clusterSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a DescribeClusterSubnetGroups
    -- request exceed the value specified in @MaxRecords@, Amazon Web Services
    -- returns a value in the @Marker@ field of the response. You can retrieve
    -- the next set of response records by providing the returned marker value
    -- in the @Marker@ parameter and retrying the request.
    DescribeClusterSubnetGroups -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of response records to return in each call. If the
    -- number of remaining response records exceeds the specified @MaxRecords@
    -- value, a value is returned in a @marker@ field of the response. You can
    -- retrieve the next set of records by retrying the command with the
    -- returned marker value.
    --
    -- Default: @100@
    --
    -- Constraints: minimum 20, maximum 100.
    DescribeClusterSubnetGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | A tag key or keys for which you want to return all matching cluster
    -- subnet groups that are associated with the specified key or keys. For
    -- example, suppose that you have subnet groups that are tagged with keys
    -- called @owner@ and @environment@. If you specify both of these tag keys
    -- in the request, Amazon Redshift returns a response with the subnet
    -- groups that have either or both of these tag keys associated with them.
    DescribeClusterSubnetGroups -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
    -- | A tag value or values for which you want to return all matching cluster
    -- subnet groups that are associated with the specified tag value or
    -- values. For example, suppose that you have subnet groups that are tagged
    -- with values called @admin@ and @test@. If you specify both of these tag
    -- values in the request, Amazon Redshift returns a response with the
    -- subnet groups that have either or both of these tag values associated
    -- with them.
    DescribeClusterSubnetGroups -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeClusterSubnetGroups -> DescribeClusterSubnetGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterSubnetGroups -> DescribeClusterSubnetGroups -> Bool
$c/= :: DescribeClusterSubnetGroups -> DescribeClusterSubnetGroups -> Bool
== :: DescribeClusterSubnetGroups -> DescribeClusterSubnetGroups -> Bool
$c== :: DescribeClusterSubnetGroups -> DescribeClusterSubnetGroups -> Bool
Prelude.Eq, ReadPrec [DescribeClusterSubnetGroups]
ReadPrec DescribeClusterSubnetGroups
Int -> ReadS DescribeClusterSubnetGroups
ReadS [DescribeClusterSubnetGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterSubnetGroups]
$creadListPrec :: ReadPrec [DescribeClusterSubnetGroups]
readPrec :: ReadPrec DescribeClusterSubnetGroups
$creadPrec :: ReadPrec DescribeClusterSubnetGroups
readList :: ReadS [DescribeClusterSubnetGroups]
$creadList :: ReadS [DescribeClusterSubnetGroups]
readsPrec :: Int -> ReadS DescribeClusterSubnetGroups
$creadsPrec :: Int -> ReadS DescribeClusterSubnetGroups
Prelude.Read, Int -> DescribeClusterSubnetGroups -> ShowS
[DescribeClusterSubnetGroups] -> ShowS
DescribeClusterSubnetGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterSubnetGroups] -> ShowS
$cshowList :: [DescribeClusterSubnetGroups] -> ShowS
show :: DescribeClusterSubnetGroups -> String
$cshow :: DescribeClusterSubnetGroups -> String
showsPrec :: Int -> DescribeClusterSubnetGroups -> ShowS
$cshowsPrec :: Int -> DescribeClusterSubnetGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeClusterSubnetGroups x -> DescribeClusterSubnetGroups
forall x.
DescribeClusterSubnetGroups -> Rep DescribeClusterSubnetGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterSubnetGroups x -> DescribeClusterSubnetGroups
$cfrom :: forall x.
DescribeClusterSubnetGroups -> Rep DescribeClusterSubnetGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterSubnetGroups' 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:
--
-- 'clusterSubnetGroupName', 'describeClusterSubnetGroups_clusterSubnetGroupName' - The name of the cluster subnet group for which information is requested.
--
-- 'marker', 'describeClusterSubnetGroups_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeClusterSubnetGroups
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- returns a value in the @Marker@ field of the response. You can retrieve
-- the next set of response records by providing the returned marker value
-- in the @Marker@ parameter and retrying the request.
--
-- 'maxRecords', 'describeClusterSubnetGroups_maxRecords' - The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
--
-- 'tagKeys', 'describeClusterSubnetGroups_tagKeys' - A tag key or keys for which you want to return all matching cluster
-- subnet groups that are associated with the specified key or keys. For
-- example, suppose that you have subnet groups that are tagged with keys
-- called @owner@ and @environment@. If you specify both of these tag keys
-- in the request, Amazon Redshift returns a response with the subnet
-- groups that have either or both of these tag keys associated with them.
--
-- 'tagValues', 'describeClusterSubnetGroups_tagValues' - A tag value or values for which you want to return all matching cluster
-- subnet groups that are associated with the specified tag value or
-- values. For example, suppose that you have subnet groups that are tagged
-- with values called @admin@ and @test@. If you specify both of these tag
-- values in the request, Amazon Redshift returns a response with the
-- subnet groups that have either or both of these tag values associated
-- with them.
newDescribeClusterSubnetGroups ::
  DescribeClusterSubnetGroups
newDescribeClusterSubnetGroups :: DescribeClusterSubnetGroups
newDescribeClusterSubnetGroups =
  DescribeClusterSubnetGroups'
    { $sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: Maybe Text
clusterSubnetGroupName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeClusterSubnetGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeClusterSubnetGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:tagKeys:DescribeClusterSubnetGroups' :: Maybe [Text]
tagKeys = forall a. Maybe a
Prelude.Nothing,
      $sel:tagValues:DescribeClusterSubnetGroups' :: Maybe [Text]
tagValues = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the cluster subnet group for which information is requested.
describeClusterSubnetGroups_clusterSubnetGroupName :: Lens.Lens' DescribeClusterSubnetGroups (Prelude.Maybe Prelude.Text)
describeClusterSubnetGroups_clusterSubnetGroupName :: Lens' DescribeClusterSubnetGroups (Maybe Text)
describeClusterSubnetGroups_clusterSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroups' {Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
clusterSubnetGroupName} -> Maybe Text
clusterSubnetGroupName) (\s :: DescribeClusterSubnetGroups
s@DescribeClusterSubnetGroups' {} Maybe Text
a -> DescribeClusterSubnetGroups
s {$sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: Maybe Text
clusterSubnetGroupName = Maybe Text
a} :: DescribeClusterSubnetGroups)

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeClusterSubnetGroups
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- returns a value in the @Marker@ field of the response. You can retrieve
-- the next set of response records by providing the returned marker value
-- in the @Marker@ parameter and retrying the request.
describeClusterSubnetGroups_marker :: Lens.Lens' DescribeClusterSubnetGroups (Prelude.Maybe Prelude.Text)
describeClusterSubnetGroups_marker :: Lens' DescribeClusterSubnetGroups (Maybe Text)
describeClusterSubnetGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterSubnetGroups
s@DescribeClusterSubnetGroups' {} Maybe Text
a -> DescribeClusterSubnetGroups
s {$sel:marker:DescribeClusterSubnetGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterSubnetGroups)

-- | The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
describeClusterSubnetGroups_maxRecords :: Lens.Lens' DescribeClusterSubnetGroups (Prelude.Maybe Prelude.Int)
describeClusterSubnetGroups_maxRecords :: Lens' DescribeClusterSubnetGroups (Maybe Int)
describeClusterSubnetGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeClusterSubnetGroups
s@DescribeClusterSubnetGroups' {} Maybe Int
a -> DescribeClusterSubnetGroups
s {$sel:maxRecords:DescribeClusterSubnetGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeClusterSubnetGroups)

-- | A tag key or keys for which you want to return all matching cluster
-- subnet groups that are associated with the specified key or keys. For
-- example, suppose that you have subnet groups that are tagged with keys
-- called @owner@ and @environment@. If you specify both of these tag keys
-- in the request, Amazon Redshift returns a response with the subnet
-- groups that have either or both of these tag keys associated with them.
describeClusterSubnetGroups_tagKeys :: Lens.Lens' DescribeClusterSubnetGroups (Prelude.Maybe [Prelude.Text])
describeClusterSubnetGroups_tagKeys :: Lens' DescribeClusterSubnetGroups (Maybe [Text])
describeClusterSubnetGroups_tagKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroups' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeClusterSubnetGroups
s@DescribeClusterSubnetGroups' {} Maybe [Text]
a -> DescribeClusterSubnetGroups
s {$sel:tagKeys:DescribeClusterSubnetGroups' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeClusterSubnetGroups) 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 tag value or values for which you want to return all matching cluster
-- subnet groups that are associated with the specified tag value or
-- values. For example, suppose that you have subnet groups that are tagged
-- with values called @admin@ and @test@. If you specify both of these tag
-- values in the request, Amazon Redshift returns a response with the
-- subnet groups that have either or both of these tag values associated
-- with them.
describeClusterSubnetGroups_tagValues :: Lens.Lens' DescribeClusterSubnetGroups (Prelude.Maybe [Prelude.Text])
describeClusterSubnetGroups_tagValues :: Lens' DescribeClusterSubnetGroups (Maybe [Text])
describeClusterSubnetGroups_tagValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroups' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeClusterSubnetGroups
s@DescribeClusterSubnetGroups' {} Maybe [Text]
a -> DescribeClusterSubnetGroups
s {$sel:tagValues:DescribeClusterSubnetGroups' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeClusterSubnetGroups) 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

instance Core.AWSPager DescribeClusterSubnetGroups where
  page :: DescribeClusterSubnetGroups
-> AWSResponse DescribeClusterSubnetGroups
-> Maybe DescribeClusterSubnetGroups
page DescribeClusterSubnetGroups
rq AWSResponse DescribeClusterSubnetGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeClusterSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeClusterSubnetGroupsResponse (Maybe Text)
describeClusterSubnetGroupsResponse_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 DescribeClusterSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeClusterSubnetGroupsResponse (Maybe [ClusterSubnetGroup])
describeClusterSubnetGroupsResponse_clusterSubnetGroups
            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.$ DescribeClusterSubnetGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeClusterSubnetGroups (Maybe Text)
describeClusterSubnetGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeClusterSubnetGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeClusterSubnetGroupsResponse (Maybe Text)
describeClusterSubnetGroupsResponse_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 DescribeClusterSubnetGroups where
  type
    AWSResponse DescribeClusterSubnetGroups =
      DescribeClusterSubnetGroupsResponse
  request :: (Service -> Service)
-> DescribeClusterSubnetGroups
-> Request DescribeClusterSubnetGroups
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 DescribeClusterSubnetGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeClusterSubnetGroups)))
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
"DescribeClusterSubnetGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [ClusterSubnetGroup]
-> Maybe Text -> Int -> DescribeClusterSubnetGroupsResponse
DescribeClusterSubnetGroupsResponse'
            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
"ClusterSubnetGroups"
                            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
"ClusterSubnetGroup")
                        )
            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 DescribeClusterSubnetGroups where
  hashWithSalt :: Int -> DescribeClusterSubnetGroups -> Int
hashWithSalt Int
_salt DescribeClusterSubnetGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
maxRecords :: Maybe Int
marker :: Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:tagValues:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:maxRecords:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Int
$sel:marker:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
$sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterSubnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tagKeys
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tagValues

instance Prelude.NFData DescribeClusterSubnetGroups where
  rnf :: DescribeClusterSubnetGroups -> ()
rnf DescribeClusterSubnetGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
maxRecords :: Maybe Int
marker :: Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:tagValues:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:maxRecords:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Int
$sel:marker:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
$sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterSubnetGroupName
      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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tagKeys
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tagValues

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

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

instance Data.ToQuery DescribeClusterSubnetGroups where
  toQuery :: DescribeClusterSubnetGroups -> QueryString
toQuery DescribeClusterSubnetGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
maxRecords :: Maybe Int
marker :: Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:tagValues:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe [Text]
$sel:maxRecords:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Int
$sel:marker:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
$sel:clusterSubnetGroupName:DescribeClusterSubnetGroups' :: DescribeClusterSubnetGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeClusterSubnetGroups" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"ClusterSubnetGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clusterSubnetGroupName,
        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,
        ByteString
"TagKeys"
          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
"TagKey" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
        ByteString
"TagValues"
          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
"TagValue" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues)
      ]

-- | Contains the output from the DescribeClusterSubnetGroups action.
--
-- /See:/ 'newDescribeClusterSubnetGroupsResponse' smart constructor.
data DescribeClusterSubnetGroupsResponse = DescribeClusterSubnetGroupsResponse'
  { -- | A list of ClusterSubnetGroup instances.
    DescribeClusterSubnetGroupsResponse -> Maybe [ClusterSubnetGroup]
clusterSubnetGroups :: Prelude.Maybe [ClusterSubnetGroup],
    -- | A value that indicates the starting point for the next set of response
    -- records in a subsequent request. If a value is returned in a response,
    -- you can retrieve the next set of records by providing this returned
    -- marker value in the @Marker@ parameter and retrying the command. If the
    -- @Marker@ field is empty, all response records have been retrieved for
    -- the request.
    DescribeClusterSubnetGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeClusterSubnetGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeClusterSubnetGroupsResponse
-> DescribeClusterSubnetGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterSubnetGroupsResponse
-> DescribeClusterSubnetGroupsResponse -> Bool
$c/= :: DescribeClusterSubnetGroupsResponse
-> DescribeClusterSubnetGroupsResponse -> Bool
== :: DescribeClusterSubnetGroupsResponse
-> DescribeClusterSubnetGroupsResponse -> Bool
$c== :: DescribeClusterSubnetGroupsResponse
-> DescribeClusterSubnetGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeClusterSubnetGroupsResponse]
ReadPrec DescribeClusterSubnetGroupsResponse
Int -> ReadS DescribeClusterSubnetGroupsResponse
ReadS [DescribeClusterSubnetGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterSubnetGroupsResponse]
$creadListPrec :: ReadPrec [DescribeClusterSubnetGroupsResponse]
readPrec :: ReadPrec DescribeClusterSubnetGroupsResponse
$creadPrec :: ReadPrec DescribeClusterSubnetGroupsResponse
readList :: ReadS [DescribeClusterSubnetGroupsResponse]
$creadList :: ReadS [DescribeClusterSubnetGroupsResponse]
readsPrec :: Int -> ReadS DescribeClusterSubnetGroupsResponse
$creadsPrec :: Int -> ReadS DescribeClusterSubnetGroupsResponse
Prelude.Read, Int -> DescribeClusterSubnetGroupsResponse -> ShowS
[DescribeClusterSubnetGroupsResponse] -> ShowS
DescribeClusterSubnetGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterSubnetGroupsResponse] -> ShowS
$cshowList :: [DescribeClusterSubnetGroupsResponse] -> ShowS
show :: DescribeClusterSubnetGroupsResponse -> String
$cshow :: DescribeClusterSubnetGroupsResponse -> String
showsPrec :: Int -> DescribeClusterSubnetGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeClusterSubnetGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeClusterSubnetGroupsResponse x
-> DescribeClusterSubnetGroupsResponse
forall x.
DescribeClusterSubnetGroupsResponse
-> Rep DescribeClusterSubnetGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterSubnetGroupsResponse x
-> DescribeClusterSubnetGroupsResponse
$cfrom :: forall x.
DescribeClusterSubnetGroupsResponse
-> Rep DescribeClusterSubnetGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterSubnetGroupsResponse' 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:
--
-- 'clusterSubnetGroups', 'describeClusterSubnetGroupsResponse_clusterSubnetGroups' - A list of ClusterSubnetGroup instances.
--
-- 'marker', 'describeClusterSubnetGroupsResponse_marker' - A value that indicates the starting point for the next set of response
-- records in a subsequent request. If a value is returned in a response,
-- you can retrieve the next set of records by providing this returned
-- marker value in the @Marker@ parameter and retrying the command. If the
-- @Marker@ field is empty, all response records have been retrieved for
-- the request.
--
-- 'httpStatus', 'describeClusterSubnetGroupsResponse_httpStatus' - The response's http status code.
newDescribeClusterSubnetGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeClusterSubnetGroupsResponse
newDescribeClusterSubnetGroupsResponse :: Int -> DescribeClusterSubnetGroupsResponse
newDescribeClusterSubnetGroupsResponse Int
pHttpStatus_ =
  DescribeClusterSubnetGroupsResponse'
    { $sel:clusterSubnetGroups:DescribeClusterSubnetGroupsResponse' :: Maybe [ClusterSubnetGroup]
clusterSubnetGroups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeClusterSubnetGroupsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeClusterSubnetGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of ClusterSubnetGroup instances.
describeClusterSubnetGroupsResponse_clusterSubnetGroups :: Lens.Lens' DescribeClusterSubnetGroupsResponse (Prelude.Maybe [ClusterSubnetGroup])
describeClusterSubnetGroupsResponse_clusterSubnetGroups :: Lens'
  DescribeClusterSubnetGroupsResponse (Maybe [ClusterSubnetGroup])
describeClusterSubnetGroupsResponse_clusterSubnetGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroupsResponse' {Maybe [ClusterSubnetGroup]
clusterSubnetGroups :: Maybe [ClusterSubnetGroup]
$sel:clusterSubnetGroups:DescribeClusterSubnetGroupsResponse' :: DescribeClusterSubnetGroupsResponse -> Maybe [ClusterSubnetGroup]
clusterSubnetGroups} -> Maybe [ClusterSubnetGroup]
clusterSubnetGroups) (\s :: DescribeClusterSubnetGroupsResponse
s@DescribeClusterSubnetGroupsResponse' {} Maybe [ClusterSubnetGroup]
a -> DescribeClusterSubnetGroupsResponse
s {$sel:clusterSubnetGroups:DescribeClusterSubnetGroupsResponse' :: Maybe [ClusterSubnetGroup]
clusterSubnetGroups = Maybe [ClusterSubnetGroup]
a} :: DescribeClusterSubnetGroupsResponse) 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 value that indicates the starting point for the next set of response
-- records in a subsequent request. If a value is returned in a response,
-- you can retrieve the next set of records by providing this returned
-- marker value in the @Marker@ parameter and retrying the command. If the
-- @Marker@ field is empty, all response records have been retrieved for
-- the request.
describeClusterSubnetGroupsResponse_marker :: Lens.Lens' DescribeClusterSubnetGroupsResponse (Prelude.Maybe Prelude.Text)
describeClusterSubnetGroupsResponse_marker :: Lens' DescribeClusterSubnetGroupsResponse (Maybe Text)
describeClusterSubnetGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSubnetGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterSubnetGroupsResponse' :: DescribeClusterSubnetGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterSubnetGroupsResponse
s@DescribeClusterSubnetGroupsResponse' {} Maybe Text
a -> DescribeClusterSubnetGroupsResponse
s {$sel:marker:DescribeClusterSubnetGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterSubnetGroupsResponse)

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

instance
  Prelude.NFData
    DescribeClusterSubnetGroupsResponse
  where
  rnf :: DescribeClusterSubnetGroupsResponse -> ()
rnf DescribeClusterSubnetGroupsResponse' {Int
Maybe [ClusterSubnetGroup]
Maybe Text
httpStatus :: Int
marker :: Maybe Text
clusterSubnetGroups :: Maybe [ClusterSubnetGroup]
$sel:httpStatus:DescribeClusterSubnetGroupsResponse' :: DescribeClusterSubnetGroupsResponse -> Int
$sel:marker:DescribeClusterSubnetGroupsResponse' :: DescribeClusterSubnetGroupsResponse -> Maybe Text
$sel:clusterSubnetGroups:DescribeClusterSubnetGroupsResponse' :: DescribeClusterSubnetGroupsResponse -> Maybe [ClusterSubnetGroup]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ClusterSubnetGroup]
clusterSubnetGroups
      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