{-# 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.AwsRdsDbSubnetGroupSubnet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsRdsDbSubnetGroupSubnetAvailabilityZone
data AwsRdsDbSubnetGroupSubnet = AwsRdsDbSubnetGroupSubnet'
{
AwsRdsDbSubnetGroupSubnet -> Maybe Text
subnetStatus :: Prelude.Maybe Prelude.Text,
AwsRdsDbSubnetGroupSubnet -> Maybe Text
subnetIdentifier :: Prelude.Maybe Prelude.Text,
AwsRdsDbSubnetGroupSubnet
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone :: Prelude.Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
}
deriving (AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool
(AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool)
-> (AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool)
-> Eq AwsRdsDbSubnetGroupSubnet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool
$c/= :: AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool
== :: AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool
$c== :: AwsRdsDbSubnetGroupSubnet -> AwsRdsDbSubnetGroupSubnet -> Bool
Prelude.Eq, ReadPrec [AwsRdsDbSubnetGroupSubnet]
ReadPrec AwsRdsDbSubnetGroupSubnet
Int -> ReadS AwsRdsDbSubnetGroupSubnet
ReadS [AwsRdsDbSubnetGroupSubnet]
(Int -> ReadS AwsRdsDbSubnetGroupSubnet)
-> ReadS [AwsRdsDbSubnetGroupSubnet]
-> ReadPrec AwsRdsDbSubnetGroupSubnet
-> ReadPrec [AwsRdsDbSubnetGroupSubnet]
-> Read AwsRdsDbSubnetGroupSubnet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRdsDbSubnetGroupSubnet]
$creadListPrec :: ReadPrec [AwsRdsDbSubnetGroupSubnet]
readPrec :: ReadPrec AwsRdsDbSubnetGroupSubnet
$creadPrec :: ReadPrec AwsRdsDbSubnetGroupSubnet
readList :: ReadS [AwsRdsDbSubnetGroupSubnet]
$creadList :: ReadS [AwsRdsDbSubnetGroupSubnet]
readsPrec :: Int -> ReadS AwsRdsDbSubnetGroupSubnet
$creadsPrec :: Int -> ReadS AwsRdsDbSubnetGroupSubnet
Prelude.Read, Int -> AwsRdsDbSubnetGroupSubnet -> ShowS
[AwsRdsDbSubnetGroupSubnet] -> ShowS
AwsRdsDbSubnetGroupSubnet -> String
(Int -> AwsRdsDbSubnetGroupSubnet -> ShowS)
-> (AwsRdsDbSubnetGroupSubnet -> String)
-> ([AwsRdsDbSubnetGroupSubnet] -> ShowS)
-> Show AwsRdsDbSubnetGroupSubnet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRdsDbSubnetGroupSubnet] -> ShowS
$cshowList :: [AwsRdsDbSubnetGroupSubnet] -> ShowS
show :: AwsRdsDbSubnetGroupSubnet -> String
$cshow :: AwsRdsDbSubnetGroupSubnet -> String
showsPrec :: Int -> AwsRdsDbSubnetGroupSubnet -> ShowS
$cshowsPrec :: Int -> AwsRdsDbSubnetGroupSubnet -> ShowS
Prelude.Show, (forall x.
AwsRdsDbSubnetGroupSubnet -> Rep AwsRdsDbSubnetGroupSubnet x)
-> (forall x.
Rep AwsRdsDbSubnetGroupSubnet x -> AwsRdsDbSubnetGroupSubnet)
-> Generic AwsRdsDbSubnetGroupSubnet
forall x.
Rep AwsRdsDbSubnetGroupSubnet x -> AwsRdsDbSubnetGroupSubnet
forall x.
AwsRdsDbSubnetGroupSubnet -> Rep AwsRdsDbSubnetGroupSubnet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRdsDbSubnetGroupSubnet x -> AwsRdsDbSubnetGroupSubnet
$cfrom :: forall x.
AwsRdsDbSubnetGroupSubnet -> Rep AwsRdsDbSubnetGroupSubnet x
Prelude.Generic)
newAwsRdsDbSubnetGroupSubnet ::
AwsRdsDbSubnetGroupSubnet
newAwsRdsDbSubnetGroupSubnet :: AwsRdsDbSubnetGroupSubnet
newAwsRdsDbSubnetGroupSubnet =
AwsRdsDbSubnetGroupSubnet' :: Maybe Text
-> Maybe Text
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet
AwsRdsDbSubnetGroupSubnet'
{ $sel:subnetStatus:AwsRdsDbSubnetGroupSubnet' :: Maybe Text
subnetStatus =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIdentifier:AwsRdsDbSubnetGroupSubnet' :: Maybe Text
subnetIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetAvailabilityZone:AwsRdsDbSubnetGroupSubnet' :: Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone = Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
forall a. Maybe a
Prelude.Nothing
}
awsRdsDbSubnetGroupSubnet_subnetStatus :: Lens.Lens' AwsRdsDbSubnetGroupSubnet (Prelude.Maybe Prelude.Text)
awsRdsDbSubnetGroupSubnet_subnetStatus :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbSubnetGroupSubnet -> f AwsRdsDbSubnetGroupSubnet
awsRdsDbSubnetGroupSubnet_subnetStatus = (AwsRdsDbSubnetGroupSubnet -> Maybe Text)
-> (AwsRdsDbSubnetGroupSubnet
-> Maybe Text -> AwsRdsDbSubnetGroupSubnet)
-> Lens
AwsRdsDbSubnetGroupSubnet
AwsRdsDbSubnetGroupSubnet
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbSubnetGroupSubnet' {Maybe Text
subnetStatus :: Maybe Text
$sel:subnetStatus:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet -> Maybe Text
subnetStatus} -> Maybe Text
subnetStatus) (\s :: AwsRdsDbSubnetGroupSubnet
s@AwsRdsDbSubnetGroupSubnet' {} Maybe Text
a -> AwsRdsDbSubnetGroupSubnet
s {$sel:subnetStatus:AwsRdsDbSubnetGroupSubnet' :: Maybe Text
subnetStatus = Maybe Text
a} :: AwsRdsDbSubnetGroupSubnet)
awsRdsDbSubnetGroupSubnet_subnetIdentifier :: Lens.Lens' AwsRdsDbSubnetGroupSubnet (Prelude.Maybe Prelude.Text)
awsRdsDbSubnetGroupSubnet_subnetIdentifier :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbSubnetGroupSubnet -> f AwsRdsDbSubnetGroupSubnet
awsRdsDbSubnetGroupSubnet_subnetIdentifier = (AwsRdsDbSubnetGroupSubnet -> Maybe Text)
-> (AwsRdsDbSubnetGroupSubnet
-> Maybe Text -> AwsRdsDbSubnetGroupSubnet)
-> Lens
AwsRdsDbSubnetGroupSubnet
AwsRdsDbSubnetGroupSubnet
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbSubnetGroupSubnet' {Maybe Text
subnetIdentifier :: Maybe Text
$sel:subnetIdentifier:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet -> Maybe Text
subnetIdentifier} -> Maybe Text
subnetIdentifier) (\s :: AwsRdsDbSubnetGroupSubnet
s@AwsRdsDbSubnetGroupSubnet' {} Maybe Text
a -> AwsRdsDbSubnetGroupSubnet
s {$sel:subnetIdentifier:AwsRdsDbSubnetGroupSubnet' :: Maybe Text
subnetIdentifier = Maybe Text
a} :: AwsRdsDbSubnetGroupSubnet)
awsRdsDbSubnetGroupSubnet_subnetAvailabilityZone :: Lens.Lens' AwsRdsDbSubnetGroupSubnet (Prelude.Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
awsRdsDbSubnetGroupSubnet_subnetAvailabilityZone :: (Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> f (Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone))
-> AwsRdsDbSubnetGroupSubnet -> f AwsRdsDbSubnetGroupSubnet
awsRdsDbSubnetGroupSubnet_subnetAvailabilityZone = (AwsRdsDbSubnetGroupSubnet
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
-> (AwsRdsDbSubnetGroupSubnet
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
-> Lens
AwsRdsDbSubnetGroupSubnet
AwsRdsDbSubnetGroupSubnet
(Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
(Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbSubnetGroupSubnet' {Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone :: Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
$sel:subnetAvailabilityZone:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone} -> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone) (\s :: AwsRdsDbSubnetGroupSubnet
s@AwsRdsDbSubnetGroupSubnet' {} Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
a -> AwsRdsDbSubnetGroupSubnet
s {$sel:subnetAvailabilityZone:AwsRdsDbSubnetGroupSubnet' :: Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone = Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
a} :: AwsRdsDbSubnetGroupSubnet)
instance Core.FromJSON AwsRdsDbSubnetGroupSubnet where
parseJSON :: Value -> Parser AwsRdsDbSubnetGroupSubnet
parseJSON =
String
-> (Object -> Parser AwsRdsDbSubnetGroupSubnet)
-> Value
-> Parser AwsRdsDbSubnetGroupSubnet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsRdsDbSubnetGroupSubnet"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet
AwsRdsDbSubnetGroupSubnet'
(Maybe Text
-> Maybe Text
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
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
"SubnetStatus")
Parser
(Maybe Text
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
-> Parser (Maybe Text)
-> Parser
(Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
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
"SubnetIdentifier")
Parser
(Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
-> AwsRdsDbSubnetGroupSubnet)
-> Parser (Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
-> Parser AwsRdsDbSubnetGroupSubnet
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetAvailabilityZone")
)
instance Prelude.Hashable AwsRdsDbSubnetGroupSubnet
instance Prelude.NFData AwsRdsDbSubnetGroupSubnet
instance Core.ToJSON AwsRdsDbSubnetGroupSubnet where
toJSON :: AwsRdsDbSubnetGroupSubnet -> Value
toJSON AwsRdsDbSubnetGroupSubnet' {Maybe Text
Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone :: Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetIdentifier :: Maybe Text
subnetStatus :: Maybe Text
$sel:subnetAvailabilityZone:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
$sel:subnetIdentifier:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet -> Maybe Text
$sel:subnetStatus:AwsRdsDbSubnetGroupSubnet' :: AwsRdsDbSubnetGroupSubnet -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SubnetStatus" 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
subnetStatus,
(Text
"SubnetIdentifier" 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
subnetIdentifier,
(Text
"SubnetAvailabilityZone" Text -> AwsRdsDbSubnetGroupSubnetAvailabilityZone -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsRdsDbSubnetGroupSubnetAvailabilityZone -> Pair)
-> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsRdsDbSubnetGroupSubnetAvailabilityZone
subnetAvailabilityZone
]
)