{-# 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 #-}
module Amazonka.EKS.Types.OIDC where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OIDC = OIDC'
{
OIDC -> Maybe Text
issuer :: Prelude.Maybe Prelude.Text
}
deriving (OIDC -> OIDC -> Bool
(OIDC -> OIDC -> Bool) -> (OIDC -> OIDC -> Bool) -> Eq OIDC
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OIDC -> OIDC -> Bool
$c/= :: OIDC -> OIDC -> Bool
== :: OIDC -> OIDC -> Bool
$c== :: OIDC -> OIDC -> Bool
Prelude.Eq, ReadPrec [OIDC]
ReadPrec OIDC
Int -> ReadS OIDC
ReadS [OIDC]
(Int -> ReadS OIDC)
-> ReadS [OIDC] -> ReadPrec OIDC -> ReadPrec [OIDC] -> Read OIDC
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OIDC]
$creadListPrec :: ReadPrec [OIDC]
readPrec :: ReadPrec OIDC
$creadPrec :: ReadPrec OIDC
readList :: ReadS [OIDC]
$creadList :: ReadS [OIDC]
readsPrec :: Int -> ReadS OIDC
$creadsPrec :: Int -> ReadS OIDC
Prelude.Read, Int -> OIDC -> ShowS
[OIDC] -> ShowS
OIDC -> String
(Int -> OIDC -> ShowS)
-> (OIDC -> String) -> ([OIDC] -> ShowS) -> Show OIDC
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OIDC] -> ShowS
$cshowList :: [OIDC] -> ShowS
show :: OIDC -> String
$cshow :: OIDC -> String
showsPrec :: Int -> OIDC -> ShowS
$cshowsPrec :: Int -> OIDC -> ShowS
Prelude.Show, (forall x. OIDC -> Rep OIDC x)
-> (forall x. Rep OIDC x -> OIDC) -> Generic OIDC
forall x. Rep OIDC x -> OIDC
forall x. OIDC -> Rep OIDC x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OIDC x -> OIDC
$cfrom :: forall x. OIDC -> Rep OIDC x
Prelude.Generic)
newOIDC ::
OIDC
newOIDC :: OIDC
newOIDC = OIDC' :: Maybe Text -> OIDC
OIDC' {$sel:issuer:OIDC' :: Maybe Text
issuer = Maybe Text
forall a. Maybe a
Prelude.Nothing}
oidc_issuer :: Lens.Lens' OIDC (Prelude.Maybe Prelude.Text)
oidc_issuer :: (Maybe Text -> f (Maybe Text)) -> OIDC -> f OIDC
oidc_issuer = (OIDC -> Maybe Text)
-> (OIDC -> Maybe Text -> OIDC)
-> Lens OIDC OIDC (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OIDC' {Maybe Text
issuer :: Maybe Text
$sel:issuer:OIDC' :: OIDC -> Maybe Text
issuer} -> Maybe Text
issuer) (\s :: OIDC
s@OIDC' {} Maybe Text
a -> OIDC
s {$sel:issuer:OIDC' :: Maybe Text
issuer = Maybe Text
a} :: OIDC)
instance Core.FromJSON OIDC where
parseJSON :: Value -> Parser OIDC
parseJSON =
String -> (Object -> Parser OIDC) -> Value -> Parser OIDC
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OIDC"
(\Object
x -> Maybe Text -> OIDC
OIDC' (Maybe Text -> OIDC) -> Parser (Maybe Text) -> Parser OIDC
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"issuer"))
instance Prelude.Hashable OIDC
instance Prelude.NFData OIDC