{-# 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.EKS.ListIdentityProviderConfigs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- A list of identity provider configurations.
--
-- This operation returns paginated results.
module Amazonka.EKS.ListIdentityProviderConfigs
  ( -- * Creating a Request
    ListIdentityProviderConfigs (..),
    newListIdentityProviderConfigs,

    -- * Request Lenses
    listIdentityProviderConfigs_maxResults,
    listIdentityProviderConfigs_nextToken,
    listIdentityProviderConfigs_clusterName,

    -- * Destructuring the Response
    ListIdentityProviderConfigsResponse (..),
    newListIdentityProviderConfigsResponse,

    -- * Response Lenses
    listIdentityProviderConfigsResponse_identityProviderConfigs,
    listIdentityProviderConfigsResponse_nextToken,
    listIdentityProviderConfigsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListIdentityProviderConfigs' smart constructor.
data ListIdentityProviderConfigs = ListIdentityProviderConfigs'
  { -- | The maximum number of identity provider configurations returned by
    -- @ListIdentityProviderConfigs@ in paginated output. When you use this
    -- parameter, @ListIdentityProviderConfigs@ returns only @maxResults@
    -- results in a single page along with a @nextToken@ response element. You
    -- can see the remaining results of the initial request by sending another
    -- @ListIdentityProviderConfigs@ request with the returned @nextToken@
    -- value. This value can be between 1 and 100. If you don\'t use this
    -- parameter, @ListIdentityProviderConfigs@ returns up to 100 results and a
    -- @nextToken@ value, if applicable.
    ListIdentityProviderConfigs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The @nextToken@ value returned from a previous paginated
    -- @IdentityProviderConfigsRequest@ where @maxResults@ was used and the
    -- results exceeded the value of that parameter. Pagination continues from
    -- the end of the previous results that returned the @nextToken@ value.
    ListIdentityProviderConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The cluster name that you want to list identity provider configurations
    -- for.
    ListIdentityProviderConfigs -> Text
clusterName :: Prelude.Text
  }
  deriving (ListIdentityProviderConfigs -> ListIdentityProviderConfigs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentityProviderConfigs -> ListIdentityProviderConfigs -> Bool
$c/= :: ListIdentityProviderConfigs -> ListIdentityProviderConfigs -> Bool
== :: ListIdentityProviderConfigs -> ListIdentityProviderConfigs -> Bool
$c== :: ListIdentityProviderConfigs -> ListIdentityProviderConfigs -> Bool
Prelude.Eq, ReadPrec [ListIdentityProviderConfigs]
ReadPrec ListIdentityProviderConfigs
Int -> ReadS ListIdentityProviderConfigs
ReadS [ListIdentityProviderConfigs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentityProviderConfigs]
$creadListPrec :: ReadPrec [ListIdentityProviderConfigs]
readPrec :: ReadPrec ListIdentityProviderConfigs
$creadPrec :: ReadPrec ListIdentityProviderConfigs
readList :: ReadS [ListIdentityProviderConfigs]
$creadList :: ReadS [ListIdentityProviderConfigs]
readsPrec :: Int -> ReadS ListIdentityProviderConfigs
$creadsPrec :: Int -> ReadS ListIdentityProviderConfigs
Prelude.Read, Int -> ListIdentityProviderConfigs -> ShowS
[ListIdentityProviderConfigs] -> ShowS
ListIdentityProviderConfigs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentityProviderConfigs] -> ShowS
$cshowList :: [ListIdentityProviderConfigs] -> ShowS
show :: ListIdentityProviderConfigs -> String
$cshow :: ListIdentityProviderConfigs -> String
showsPrec :: Int -> ListIdentityProviderConfigs -> ShowS
$cshowsPrec :: Int -> ListIdentityProviderConfigs -> ShowS
Prelude.Show, forall x.
Rep ListIdentityProviderConfigs x -> ListIdentityProviderConfigs
forall x.
ListIdentityProviderConfigs -> Rep ListIdentityProviderConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIdentityProviderConfigs x -> ListIdentityProviderConfigs
$cfrom :: forall x.
ListIdentityProviderConfigs -> Rep ListIdentityProviderConfigs x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentityProviderConfigs' 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:
--
-- 'maxResults', 'listIdentityProviderConfigs_maxResults' - The maximum number of identity provider configurations returned by
-- @ListIdentityProviderConfigs@ in paginated output. When you use this
-- parameter, @ListIdentityProviderConfigs@ returns only @maxResults@
-- results in a single page along with a @nextToken@ response element. You
-- can see the remaining results of the initial request by sending another
-- @ListIdentityProviderConfigs@ request with the returned @nextToken@
-- value. This value can be between 1 and 100. If you don\'t use this
-- parameter, @ListIdentityProviderConfigs@ returns up to 100 results and a
-- @nextToken@ value, if applicable.
--
-- 'nextToken', 'listIdentityProviderConfigs_nextToken' - The @nextToken@ value returned from a previous paginated
-- @IdentityProviderConfigsRequest@ where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
--
-- 'clusterName', 'listIdentityProviderConfigs_clusterName' - The cluster name that you want to list identity provider configurations
-- for.
newListIdentityProviderConfigs ::
  -- | 'clusterName'
  Prelude.Text ->
  ListIdentityProviderConfigs
newListIdentityProviderConfigs :: Text -> ListIdentityProviderConfigs
newListIdentityProviderConfigs Text
pClusterName_ =
  ListIdentityProviderConfigs'
    { $sel:maxResults:ListIdentityProviderConfigs' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListIdentityProviderConfigs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:clusterName:ListIdentityProviderConfigs' :: Text
clusterName = Text
pClusterName_
    }

-- | The maximum number of identity provider configurations returned by
-- @ListIdentityProviderConfigs@ in paginated output. When you use this
-- parameter, @ListIdentityProviderConfigs@ returns only @maxResults@
-- results in a single page along with a @nextToken@ response element. You
-- can see the remaining results of the initial request by sending another
-- @ListIdentityProviderConfigs@ request with the returned @nextToken@
-- value. This value can be between 1 and 100. If you don\'t use this
-- parameter, @ListIdentityProviderConfigs@ returns up to 100 results and a
-- @nextToken@ value, if applicable.
listIdentityProviderConfigs_maxResults :: Lens.Lens' ListIdentityProviderConfigs (Prelude.Maybe Prelude.Natural)
listIdentityProviderConfigs_maxResults :: Lens' ListIdentityProviderConfigs (Maybe Natural)
listIdentityProviderConfigs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityProviderConfigs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListIdentityProviderConfigs
s@ListIdentityProviderConfigs' {} Maybe Natural
a -> ListIdentityProviderConfigs
s {$sel:maxResults:ListIdentityProviderConfigs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListIdentityProviderConfigs)

-- | The @nextToken@ value returned from a previous paginated
-- @IdentityProviderConfigsRequest@ where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
listIdentityProviderConfigs_nextToken :: Lens.Lens' ListIdentityProviderConfigs (Prelude.Maybe Prelude.Text)
listIdentityProviderConfigs_nextToken :: Lens' ListIdentityProviderConfigs (Maybe Text)
listIdentityProviderConfigs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityProviderConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentityProviderConfigs
s@ListIdentityProviderConfigs' {} Maybe Text
a -> ListIdentityProviderConfigs
s {$sel:nextToken:ListIdentityProviderConfigs' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentityProviderConfigs)

-- | The cluster name that you want to list identity provider configurations
-- for.
listIdentityProviderConfigs_clusterName :: Lens.Lens' ListIdentityProviderConfigs Prelude.Text
listIdentityProviderConfigs_clusterName :: Lens' ListIdentityProviderConfigs Text
listIdentityProviderConfigs_clusterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityProviderConfigs' {Text
clusterName :: Text
$sel:clusterName:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Text
clusterName} -> Text
clusterName) (\s :: ListIdentityProviderConfigs
s@ListIdentityProviderConfigs' {} Text
a -> ListIdentityProviderConfigs
s {$sel:clusterName:ListIdentityProviderConfigs' :: Text
clusterName = Text
a} :: ListIdentityProviderConfigs)

instance Core.AWSPager ListIdentityProviderConfigs where
  page :: ListIdentityProviderConfigs
-> AWSResponse ListIdentityProviderConfigs
-> Maybe ListIdentityProviderConfigs
page ListIdentityProviderConfigs
rq AWSResponse ListIdentityProviderConfigs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListIdentityProviderConfigs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListIdentityProviderConfigsResponse (Maybe Text)
listIdentityProviderConfigsResponse_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 ListIdentityProviderConfigs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListIdentityProviderConfigsResponse
  (Maybe [IdentityProviderConfig])
listIdentityProviderConfigsResponse_identityProviderConfigs
            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.$ ListIdentityProviderConfigs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListIdentityProviderConfigs (Maybe Text)
listIdentityProviderConfigs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListIdentityProviderConfigs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListIdentityProviderConfigsResponse (Maybe Text)
listIdentityProviderConfigsResponse_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 ListIdentityProviderConfigs where
  type
    AWSResponse ListIdentityProviderConfigs =
      ListIdentityProviderConfigsResponse
  request :: (Service -> Service)
-> ListIdentityProviderConfigs
-> Request ListIdentityProviderConfigs
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListIdentityProviderConfigs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListIdentityProviderConfigs)))
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 [IdentityProviderConfig]
-> Maybe Text -> Int -> ListIdentityProviderConfigsResponse
ListIdentityProviderConfigsResponse'
            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
"identityProviderConfigs"
                            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 ListIdentityProviderConfigs where
  hashWithSalt :: Int -> ListIdentityProviderConfigs -> Int
hashWithSalt Int
_salt ListIdentityProviderConfigs' {Maybe Natural
Maybe Text
Text
clusterName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:clusterName:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Text
$sel:nextToken:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Text
$sel:maxResults:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterName

instance Prelude.NFData ListIdentityProviderConfigs where
  rnf :: ListIdentityProviderConfigs -> ()
rnf ListIdentityProviderConfigs' {Maybe Natural
Maybe Text
Text
clusterName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:clusterName:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Text
$sel:nextToken:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Text
$sel:maxResults:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      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 Text
clusterName

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

instance Data.ToPath ListIdentityProviderConfigs where
  toPath :: ListIdentityProviderConfigs -> ByteString
toPath ListIdentityProviderConfigs' {Maybe Natural
Maybe Text
Text
clusterName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:clusterName:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Text
$sel:nextToken:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Text
$sel:maxResults:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/clusters/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
clusterName,
        ByteString
"/identity-provider-configs"
      ]

instance Data.ToQuery ListIdentityProviderConfigs where
  toQuery :: ListIdentityProviderConfigs -> QueryString
toQuery ListIdentityProviderConfigs' {Maybe Natural
Maybe Text
Text
clusterName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:clusterName:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Text
$sel:nextToken:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Text
$sel:maxResults:ListIdentityProviderConfigs' :: ListIdentityProviderConfigs -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListIdentityProviderConfigsResponse' smart constructor.
data ListIdentityProviderConfigsResponse = ListIdentityProviderConfigsResponse'
  { -- | The identity provider configurations for the cluster.
    ListIdentityProviderConfigsResponse
-> Maybe [IdentityProviderConfig]
identityProviderConfigs :: Prelude.Maybe [IdentityProviderConfig],
    -- | The @nextToken@ value returned from a previous paginated
    -- @ListIdentityProviderConfigsResponse@ where @maxResults@ was used and
    -- the results exceeded the value of that parameter. Pagination continues
    -- from the end of the previous results that returned the @nextToken@
    -- value.
    ListIdentityProviderConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListIdentityProviderConfigsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListIdentityProviderConfigsResponse
-> ListIdentityProviderConfigsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentityProviderConfigsResponse
-> ListIdentityProviderConfigsResponse -> Bool
$c/= :: ListIdentityProviderConfigsResponse
-> ListIdentityProviderConfigsResponse -> Bool
== :: ListIdentityProviderConfigsResponse
-> ListIdentityProviderConfigsResponse -> Bool
$c== :: ListIdentityProviderConfigsResponse
-> ListIdentityProviderConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListIdentityProviderConfigsResponse]
ReadPrec ListIdentityProviderConfigsResponse
Int -> ReadS ListIdentityProviderConfigsResponse
ReadS [ListIdentityProviderConfigsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentityProviderConfigsResponse]
$creadListPrec :: ReadPrec [ListIdentityProviderConfigsResponse]
readPrec :: ReadPrec ListIdentityProviderConfigsResponse
$creadPrec :: ReadPrec ListIdentityProviderConfigsResponse
readList :: ReadS [ListIdentityProviderConfigsResponse]
$creadList :: ReadS [ListIdentityProviderConfigsResponse]
readsPrec :: Int -> ReadS ListIdentityProviderConfigsResponse
$creadsPrec :: Int -> ReadS ListIdentityProviderConfigsResponse
Prelude.Read, Int -> ListIdentityProviderConfigsResponse -> ShowS
[ListIdentityProviderConfigsResponse] -> ShowS
ListIdentityProviderConfigsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentityProviderConfigsResponse] -> ShowS
$cshowList :: [ListIdentityProviderConfigsResponse] -> ShowS
show :: ListIdentityProviderConfigsResponse -> String
$cshow :: ListIdentityProviderConfigsResponse -> String
showsPrec :: Int -> ListIdentityProviderConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListIdentityProviderConfigsResponse -> ShowS
Prelude.Show, forall x.
Rep ListIdentityProviderConfigsResponse x
-> ListIdentityProviderConfigsResponse
forall x.
ListIdentityProviderConfigsResponse
-> Rep ListIdentityProviderConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIdentityProviderConfigsResponse x
-> ListIdentityProviderConfigsResponse
$cfrom :: forall x.
ListIdentityProviderConfigsResponse
-> Rep ListIdentityProviderConfigsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentityProviderConfigsResponse' 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:
--
-- 'identityProviderConfigs', 'listIdentityProviderConfigsResponse_identityProviderConfigs' - The identity provider configurations for the cluster.
--
-- 'nextToken', 'listIdentityProviderConfigsResponse_nextToken' - The @nextToken@ value returned from a previous paginated
-- @ListIdentityProviderConfigsResponse@ where @maxResults@ was used and
-- the results exceeded the value of that parameter. Pagination continues
-- from the end of the previous results that returned the @nextToken@
-- value.
--
-- 'httpStatus', 'listIdentityProviderConfigsResponse_httpStatus' - The response's http status code.
newListIdentityProviderConfigsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListIdentityProviderConfigsResponse
newListIdentityProviderConfigsResponse :: Int -> ListIdentityProviderConfigsResponse
newListIdentityProviderConfigsResponse Int
pHttpStatus_ =
  ListIdentityProviderConfigsResponse'
    { $sel:identityProviderConfigs:ListIdentityProviderConfigsResponse' :: Maybe [IdentityProviderConfig]
identityProviderConfigs =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListIdentityProviderConfigsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListIdentityProviderConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identity provider configurations for the cluster.
listIdentityProviderConfigsResponse_identityProviderConfigs :: Lens.Lens' ListIdentityProviderConfigsResponse (Prelude.Maybe [IdentityProviderConfig])
listIdentityProviderConfigsResponse_identityProviderConfigs :: Lens'
  ListIdentityProviderConfigsResponse
  (Maybe [IdentityProviderConfig])
listIdentityProviderConfigsResponse_identityProviderConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityProviderConfigsResponse' {Maybe [IdentityProviderConfig]
identityProviderConfigs :: Maybe [IdentityProviderConfig]
$sel:identityProviderConfigs:ListIdentityProviderConfigsResponse' :: ListIdentityProviderConfigsResponse
-> Maybe [IdentityProviderConfig]
identityProviderConfigs} -> Maybe [IdentityProviderConfig]
identityProviderConfigs) (\s :: ListIdentityProviderConfigsResponse
s@ListIdentityProviderConfigsResponse' {} Maybe [IdentityProviderConfig]
a -> ListIdentityProviderConfigsResponse
s {$sel:identityProviderConfigs:ListIdentityProviderConfigsResponse' :: Maybe [IdentityProviderConfig]
identityProviderConfigs = Maybe [IdentityProviderConfig]
a} :: ListIdentityProviderConfigsResponse) 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 @nextToken@ value returned from a previous paginated
-- @ListIdentityProviderConfigsResponse@ where @maxResults@ was used and
-- the results exceeded the value of that parameter. Pagination continues
-- from the end of the previous results that returned the @nextToken@
-- value.
listIdentityProviderConfigsResponse_nextToken :: Lens.Lens' ListIdentityProviderConfigsResponse (Prelude.Maybe Prelude.Text)
listIdentityProviderConfigsResponse_nextToken :: Lens' ListIdentityProviderConfigsResponse (Maybe Text)
listIdentityProviderConfigsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityProviderConfigsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentityProviderConfigsResponse' :: ListIdentityProviderConfigsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentityProviderConfigsResponse
s@ListIdentityProviderConfigsResponse' {} Maybe Text
a -> ListIdentityProviderConfigsResponse
s {$sel:nextToken:ListIdentityProviderConfigsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentityProviderConfigsResponse)

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

instance
  Prelude.NFData
    ListIdentityProviderConfigsResponse
  where
  rnf :: ListIdentityProviderConfigsResponse -> ()
rnf ListIdentityProviderConfigsResponse' {Int
Maybe [IdentityProviderConfig]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
identityProviderConfigs :: Maybe [IdentityProviderConfig]
$sel:httpStatus:ListIdentityProviderConfigsResponse' :: ListIdentityProviderConfigsResponse -> Int
$sel:nextToken:ListIdentityProviderConfigsResponse' :: ListIdentityProviderConfigsResponse -> Maybe Text
$sel:identityProviderConfigs:ListIdentityProviderConfigsResponse' :: ListIdentityProviderConfigsResponse
-> Maybe [IdentityProviderConfig]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [IdentityProviderConfig]
identityProviderConfigs
      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