{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.IdentityProviderConfigResponse
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EKS.Types.IdentityProviderConfigResponse where

import qualified Amazonka.Core as Core
import Amazonka.EKS.Types.OidcIdentityProviderConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The full description of your identity configuration.
--
-- /See:/ 'newIdentityProviderConfigResponse' smart constructor.
data IdentityProviderConfigResponse = IdentityProviderConfigResponse'
  { -- | An object that represents an OpenID Connect (OIDC) identity provider
    -- configuration.
    IdentityProviderConfigResponse -> Maybe OidcIdentityProviderConfig
oidc :: Prelude.Maybe OidcIdentityProviderConfig
  }
  deriving (IdentityProviderConfigResponse
-> IdentityProviderConfigResponse -> Bool
(IdentityProviderConfigResponse
 -> IdentityProviderConfigResponse -> Bool)
-> (IdentityProviderConfigResponse
    -> IdentityProviderConfigResponse -> Bool)
-> Eq IdentityProviderConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityProviderConfigResponse
-> IdentityProviderConfigResponse -> Bool
$c/= :: IdentityProviderConfigResponse
-> IdentityProviderConfigResponse -> Bool
== :: IdentityProviderConfigResponse
-> IdentityProviderConfigResponse -> Bool
$c== :: IdentityProviderConfigResponse
-> IdentityProviderConfigResponse -> Bool
Prelude.Eq, ReadPrec [IdentityProviderConfigResponse]
ReadPrec IdentityProviderConfigResponse
Int -> ReadS IdentityProviderConfigResponse
ReadS [IdentityProviderConfigResponse]
(Int -> ReadS IdentityProviderConfigResponse)
-> ReadS [IdentityProviderConfigResponse]
-> ReadPrec IdentityProviderConfigResponse
-> ReadPrec [IdentityProviderConfigResponse]
-> Read IdentityProviderConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityProviderConfigResponse]
$creadListPrec :: ReadPrec [IdentityProviderConfigResponse]
readPrec :: ReadPrec IdentityProviderConfigResponse
$creadPrec :: ReadPrec IdentityProviderConfigResponse
readList :: ReadS [IdentityProviderConfigResponse]
$creadList :: ReadS [IdentityProviderConfigResponse]
readsPrec :: Int -> ReadS IdentityProviderConfigResponse
$creadsPrec :: Int -> ReadS IdentityProviderConfigResponse
Prelude.Read, Int -> IdentityProviderConfigResponse -> ShowS
[IdentityProviderConfigResponse] -> ShowS
IdentityProviderConfigResponse -> String
(Int -> IdentityProviderConfigResponse -> ShowS)
-> (IdentityProviderConfigResponse -> String)
-> ([IdentityProviderConfigResponse] -> ShowS)
-> Show IdentityProviderConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityProviderConfigResponse] -> ShowS
$cshowList :: [IdentityProviderConfigResponse] -> ShowS
show :: IdentityProviderConfigResponse -> String
$cshow :: IdentityProviderConfigResponse -> String
showsPrec :: Int -> IdentityProviderConfigResponse -> ShowS
$cshowsPrec :: Int -> IdentityProviderConfigResponse -> ShowS
Prelude.Show, (forall x.
 IdentityProviderConfigResponse
 -> Rep IdentityProviderConfigResponse x)
-> (forall x.
    Rep IdentityProviderConfigResponse x
    -> IdentityProviderConfigResponse)
-> Generic IdentityProviderConfigResponse
forall x.
Rep IdentityProviderConfigResponse x
-> IdentityProviderConfigResponse
forall x.
IdentityProviderConfigResponse
-> Rep IdentityProviderConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IdentityProviderConfigResponse x
-> IdentityProviderConfigResponse
$cfrom :: forall x.
IdentityProviderConfigResponse
-> Rep IdentityProviderConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'IdentityProviderConfigResponse' 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:
--
-- 'oidc', 'identityProviderConfigResponse_oidc' - An object that represents an OpenID Connect (OIDC) identity provider
-- configuration.
newIdentityProviderConfigResponse ::
  IdentityProviderConfigResponse
newIdentityProviderConfigResponse :: IdentityProviderConfigResponse
newIdentityProviderConfigResponse =
  IdentityProviderConfigResponse' :: Maybe OidcIdentityProviderConfig -> IdentityProviderConfigResponse
IdentityProviderConfigResponse'
    { $sel:oidc:IdentityProviderConfigResponse' :: Maybe OidcIdentityProviderConfig
oidc =
        Maybe OidcIdentityProviderConfig
forall a. Maybe a
Prelude.Nothing
    }

-- | An object that represents an OpenID Connect (OIDC) identity provider
-- configuration.
identityProviderConfigResponse_oidc :: Lens.Lens' IdentityProviderConfigResponse (Prelude.Maybe OidcIdentityProviderConfig)
identityProviderConfigResponse_oidc :: (Maybe OidcIdentityProviderConfig
 -> f (Maybe OidcIdentityProviderConfig))
-> IdentityProviderConfigResponse
-> f IdentityProviderConfigResponse
identityProviderConfigResponse_oidc = (IdentityProviderConfigResponse
 -> Maybe OidcIdentityProviderConfig)
-> (IdentityProviderConfigResponse
    -> Maybe OidcIdentityProviderConfig
    -> IdentityProviderConfigResponse)
-> Lens
     IdentityProviderConfigResponse
     IdentityProviderConfigResponse
     (Maybe OidcIdentityProviderConfig)
     (Maybe OidcIdentityProviderConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityProviderConfigResponse' {Maybe OidcIdentityProviderConfig
oidc :: Maybe OidcIdentityProviderConfig
$sel:oidc:IdentityProviderConfigResponse' :: IdentityProviderConfigResponse -> Maybe OidcIdentityProviderConfig
oidc} -> Maybe OidcIdentityProviderConfig
oidc) (\s :: IdentityProviderConfigResponse
s@IdentityProviderConfigResponse' {} Maybe OidcIdentityProviderConfig
a -> IdentityProviderConfigResponse
s {$sel:oidc:IdentityProviderConfigResponse' :: Maybe OidcIdentityProviderConfig
oidc = Maybe OidcIdentityProviderConfig
a} :: IdentityProviderConfigResponse)

instance Core.FromJSON IdentityProviderConfigResponse where
  parseJSON :: Value -> Parser IdentityProviderConfigResponse
parseJSON =
    String
-> (Object -> Parser IdentityProviderConfigResponse)
-> Value
-> Parser IdentityProviderConfigResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"IdentityProviderConfigResponse"
      ( \Object
x ->
          Maybe OidcIdentityProviderConfig -> IdentityProviderConfigResponse
IdentityProviderConfigResponse'
            (Maybe OidcIdentityProviderConfig
 -> IdentityProviderConfigResponse)
-> Parser (Maybe OidcIdentityProviderConfig)
-> Parser IdentityProviderConfigResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe OidcIdentityProviderConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"oidc")
      )

instance
  Prelude.Hashable
    IdentityProviderConfigResponse

instance
  Prelude.NFData
    IdentityProviderConfigResponse