{-# 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.SecurityHub.Types.AwsCertificateManagerCertificateResourceRecord where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsCertificateManagerCertificateResourceRecord = AwsCertificateManagerCertificateResourceRecord'
{
AwsCertificateManagerCertificateResourceRecord -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
AwsCertificateManagerCertificateResourceRecord -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AwsCertificateManagerCertificateResourceRecord -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool
(AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool)
-> (AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool)
-> Eq AwsCertificateManagerCertificateResourceRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool
$c/= :: AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool
== :: AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool
$c== :: AwsCertificateManagerCertificateResourceRecord
-> AwsCertificateManagerCertificateResourceRecord -> Bool
Prelude.Eq, ReadPrec [AwsCertificateManagerCertificateResourceRecord]
ReadPrec AwsCertificateManagerCertificateResourceRecord
Int -> ReadS AwsCertificateManagerCertificateResourceRecord
ReadS [AwsCertificateManagerCertificateResourceRecord]
(Int -> ReadS AwsCertificateManagerCertificateResourceRecord)
-> ReadS [AwsCertificateManagerCertificateResourceRecord]
-> ReadPrec AwsCertificateManagerCertificateResourceRecord
-> ReadPrec [AwsCertificateManagerCertificateResourceRecord]
-> Read AwsCertificateManagerCertificateResourceRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCertificateManagerCertificateResourceRecord]
$creadListPrec :: ReadPrec [AwsCertificateManagerCertificateResourceRecord]
readPrec :: ReadPrec AwsCertificateManagerCertificateResourceRecord
$creadPrec :: ReadPrec AwsCertificateManagerCertificateResourceRecord
readList :: ReadS [AwsCertificateManagerCertificateResourceRecord]
$creadList :: ReadS [AwsCertificateManagerCertificateResourceRecord]
readsPrec :: Int -> ReadS AwsCertificateManagerCertificateResourceRecord
$creadsPrec :: Int -> ReadS AwsCertificateManagerCertificateResourceRecord
Prelude.Read, Int -> AwsCertificateManagerCertificateResourceRecord -> ShowS
[AwsCertificateManagerCertificateResourceRecord] -> ShowS
AwsCertificateManagerCertificateResourceRecord -> String
(Int -> AwsCertificateManagerCertificateResourceRecord -> ShowS)
-> (AwsCertificateManagerCertificateResourceRecord -> String)
-> ([AwsCertificateManagerCertificateResourceRecord] -> ShowS)
-> Show AwsCertificateManagerCertificateResourceRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCertificateManagerCertificateResourceRecord] -> ShowS
$cshowList :: [AwsCertificateManagerCertificateResourceRecord] -> ShowS
show :: AwsCertificateManagerCertificateResourceRecord -> String
$cshow :: AwsCertificateManagerCertificateResourceRecord -> String
showsPrec :: Int -> AwsCertificateManagerCertificateResourceRecord -> ShowS
$cshowsPrec :: Int -> AwsCertificateManagerCertificateResourceRecord -> ShowS
Prelude.Show, (forall x.
AwsCertificateManagerCertificateResourceRecord
-> Rep AwsCertificateManagerCertificateResourceRecord x)
-> (forall x.
Rep AwsCertificateManagerCertificateResourceRecord x
-> AwsCertificateManagerCertificateResourceRecord)
-> Generic AwsCertificateManagerCertificateResourceRecord
forall x.
Rep AwsCertificateManagerCertificateResourceRecord x
-> AwsCertificateManagerCertificateResourceRecord
forall x.
AwsCertificateManagerCertificateResourceRecord
-> Rep AwsCertificateManagerCertificateResourceRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCertificateManagerCertificateResourceRecord x
-> AwsCertificateManagerCertificateResourceRecord
$cfrom :: forall x.
AwsCertificateManagerCertificateResourceRecord
-> Rep AwsCertificateManagerCertificateResourceRecord x
Prelude.Generic)
newAwsCertificateManagerCertificateResourceRecord ::
AwsCertificateManagerCertificateResourceRecord
newAwsCertificateManagerCertificateResourceRecord :: AwsCertificateManagerCertificateResourceRecord
newAwsCertificateManagerCertificateResourceRecord =
AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsCertificateManagerCertificateResourceRecord
AwsCertificateManagerCertificateResourceRecord'
{ $sel:value:AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
value =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsCertificateManagerCertificateResourceRecord_value :: Lens.Lens' AwsCertificateManagerCertificateResourceRecord (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateResourceRecord_value :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateResourceRecord
-> f AwsCertificateManagerCertificateResourceRecord
awsCertificateManagerCertificateResourceRecord_value = (AwsCertificateManagerCertificateResourceRecord -> Maybe Text)
-> (AwsCertificateManagerCertificateResourceRecord
-> Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
-> Lens
AwsCertificateManagerCertificateResourceRecord
AwsCertificateManagerCertificateResourceRecord
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateResourceRecord' {Maybe Text
value :: Maybe Text
$sel:value:AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
value} -> Maybe Text
value) (\s :: AwsCertificateManagerCertificateResourceRecord
s@AwsCertificateManagerCertificateResourceRecord' {} Maybe Text
a -> AwsCertificateManagerCertificateResourceRecord
s {$sel:value:AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
value = Maybe Text
a} :: AwsCertificateManagerCertificateResourceRecord)
awsCertificateManagerCertificateResourceRecord_name :: Lens.Lens' AwsCertificateManagerCertificateResourceRecord (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateResourceRecord_name :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateResourceRecord
-> f AwsCertificateManagerCertificateResourceRecord
awsCertificateManagerCertificateResourceRecord_name = (AwsCertificateManagerCertificateResourceRecord -> Maybe Text)
-> (AwsCertificateManagerCertificateResourceRecord
-> Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
-> Lens
AwsCertificateManagerCertificateResourceRecord
AwsCertificateManagerCertificateResourceRecord
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateResourceRecord' {Maybe Text
name :: Maybe Text
$sel:name:AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsCertificateManagerCertificateResourceRecord
s@AwsCertificateManagerCertificateResourceRecord' {} Maybe Text
a -> AwsCertificateManagerCertificateResourceRecord
s {$sel:name:AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
name = Maybe Text
a} :: AwsCertificateManagerCertificateResourceRecord)
awsCertificateManagerCertificateResourceRecord_type :: Lens.Lens' AwsCertificateManagerCertificateResourceRecord (Prelude.Maybe Prelude.Text)
awsCertificateManagerCertificateResourceRecord_type :: (Maybe Text -> f (Maybe Text))
-> AwsCertificateManagerCertificateResourceRecord
-> f AwsCertificateManagerCertificateResourceRecord
awsCertificateManagerCertificateResourceRecord_type = (AwsCertificateManagerCertificateResourceRecord -> Maybe Text)
-> (AwsCertificateManagerCertificateResourceRecord
-> Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
-> Lens
AwsCertificateManagerCertificateResourceRecord
AwsCertificateManagerCertificateResourceRecord
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCertificateManagerCertificateResourceRecord' {Maybe Text
type' :: Maybe Text
$sel:type':AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
type'} -> Maybe Text
type') (\s :: AwsCertificateManagerCertificateResourceRecord
s@AwsCertificateManagerCertificateResourceRecord' {} Maybe Text
a -> AwsCertificateManagerCertificateResourceRecord
s {$sel:type':AwsCertificateManagerCertificateResourceRecord' :: Maybe Text
type' = Maybe Text
a} :: AwsCertificateManagerCertificateResourceRecord)
instance
Core.FromJSON
AwsCertificateManagerCertificateResourceRecord
where
parseJSON :: Value -> Parser AwsCertificateManagerCertificateResourceRecord
parseJSON =
String
-> (Object
-> Parser AwsCertificateManagerCertificateResourceRecord)
-> Value
-> Parser AwsCertificateManagerCertificateResourceRecord
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsCertificateManagerCertificateResourceRecord"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsCertificateManagerCertificateResourceRecord
AwsCertificateManagerCertificateResourceRecord'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsCertificateManagerCertificateResourceRecord)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
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
"Value") Parser
(Maybe Text
-> Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsCertificateManagerCertificateResourceRecord)
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 -> AwsCertificateManagerCertificateResourceRecord)
-> Parser (Maybe Text)
-> Parser AwsCertificateManagerCertificateResourceRecord
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
AwsCertificateManagerCertificateResourceRecord
instance
Prelude.NFData
AwsCertificateManagerCertificateResourceRecord
instance
Core.ToJSON
AwsCertificateManagerCertificateResourceRecord
where
toJSON :: AwsCertificateManagerCertificateResourceRecord -> Value
toJSON
AwsCertificateManagerCertificateResourceRecord' {Maybe Text
type' :: Maybe Text
name :: Maybe Text
value :: Maybe Text
$sel:type':AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
$sel:name:AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
$sel:value:AwsCertificateManagerCertificateResourceRecord' :: AwsCertificateManagerCertificateResourceRecord -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Value" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
value,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Text
"Type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
type'
]
)