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