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