{-# 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.Provider 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
data Provider = Provider'
{
Provider -> Maybe Text
keyArn :: Prelude.Maybe Prelude.Text
}
deriving (Provider -> Provider -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Provider -> Provider -> Bool
$c/= :: Provider -> Provider -> Bool
== :: Provider -> Provider -> Bool
$c== :: Provider -> Provider -> Bool
Prelude.Eq, ReadPrec [Provider]
ReadPrec Provider
Int -> ReadS Provider
ReadS [Provider]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Provider]
$creadListPrec :: ReadPrec [Provider]
readPrec :: ReadPrec Provider
$creadPrec :: ReadPrec Provider
readList :: ReadS [Provider]
$creadList :: ReadS [Provider]
readsPrec :: Int -> ReadS Provider
$creadsPrec :: Int -> ReadS Provider
Prelude.Read, Int -> Provider -> ShowS
[Provider] -> ShowS
Provider -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Provider] -> ShowS
$cshowList :: [Provider] -> ShowS
show :: Provider -> String
$cshow :: Provider -> String
showsPrec :: Int -> Provider -> ShowS
$cshowsPrec :: Int -> Provider -> ShowS
Prelude.Show, forall x. Rep Provider x -> Provider
forall x. Provider -> Rep Provider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Provider x -> Provider
$cfrom :: forall x. Provider -> Rep Provider x
Prelude.Generic)
newProvider ::
Provider
newProvider :: Provider
newProvider = Provider' {$sel:keyArn:Provider' :: Maybe Text
keyArn = forall a. Maybe a
Prelude.Nothing}
provider_keyArn :: Lens.Lens' Provider (Prelude.Maybe Prelude.Text)
provider_keyArn :: Lens' Provider (Maybe Text)
provider_keyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Provider' {Maybe Text
keyArn :: Maybe Text
$sel:keyArn:Provider' :: Provider -> Maybe Text
keyArn} -> Maybe Text
keyArn) (\s :: Provider
s@Provider' {} Maybe Text
a -> Provider
s {$sel:keyArn:Provider' :: Maybe Text
keyArn = Maybe Text
a} :: Provider)
instance Data.FromJSON Provider where
parseJSON :: Value -> Parser Provider
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Provider"
(\Object
x -> Maybe Text -> Provider
Provider' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"keyArn"))
instance Prelude.Hashable Provider where
hashWithSalt :: Int -> Provider -> Int
hashWithSalt Int
_salt Provider' {Maybe Text
keyArn :: Maybe Text
$sel:keyArn:Provider' :: Provider -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyArn
instance Prelude.NFData Provider where
rnf :: Provider -> ()
rnf Provider' {Maybe Text
keyArn :: Maybe Text
$sel:keyArn:Provider' :: Provider -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyArn
instance Data.ToJSON Provider where
toJSON :: Provider -> Value
toJSON Provider' {Maybe Text
keyArn :: Maybe Text
$sel:keyArn:Provider' :: Provider -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"keyArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyArn]
)