{-# 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.RDS.Types.CustomAvailabilityZone where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.VpnDetails
data CustomAvailabilityZone = CustomAvailabilityZone'
{
CustomAvailabilityZone -> Maybe VpnDetails
vpnDetails :: Prelude.Maybe VpnDetails,
CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneName :: Prelude.Maybe Prelude.Text,
CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneId :: Prelude.Maybe Prelude.Text,
CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneStatus :: Prelude.Maybe Prelude.Text
}
deriving (CustomAvailabilityZone -> CustomAvailabilityZone -> Bool
(CustomAvailabilityZone -> CustomAvailabilityZone -> Bool)
-> (CustomAvailabilityZone -> CustomAvailabilityZone -> Bool)
-> Eq CustomAvailabilityZone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomAvailabilityZone -> CustomAvailabilityZone -> Bool
$c/= :: CustomAvailabilityZone -> CustomAvailabilityZone -> Bool
== :: CustomAvailabilityZone -> CustomAvailabilityZone -> Bool
$c== :: CustomAvailabilityZone -> CustomAvailabilityZone -> Bool
Prelude.Eq, Int -> CustomAvailabilityZone -> ShowS
[CustomAvailabilityZone] -> ShowS
CustomAvailabilityZone -> String
(Int -> CustomAvailabilityZone -> ShowS)
-> (CustomAvailabilityZone -> String)
-> ([CustomAvailabilityZone] -> ShowS)
-> Show CustomAvailabilityZone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomAvailabilityZone] -> ShowS
$cshowList :: [CustomAvailabilityZone] -> ShowS
show :: CustomAvailabilityZone -> String
$cshow :: CustomAvailabilityZone -> String
showsPrec :: Int -> CustomAvailabilityZone -> ShowS
$cshowsPrec :: Int -> CustomAvailabilityZone -> ShowS
Prelude.Show, (forall x. CustomAvailabilityZone -> Rep CustomAvailabilityZone x)
-> (forall x.
Rep CustomAvailabilityZone x -> CustomAvailabilityZone)
-> Generic CustomAvailabilityZone
forall x. Rep CustomAvailabilityZone x -> CustomAvailabilityZone
forall x. CustomAvailabilityZone -> Rep CustomAvailabilityZone x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomAvailabilityZone x -> CustomAvailabilityZone
$cfrom :: forall x. CustomAvailabilityZone -> Rep CustomAvailabilityZone x
Prelude.Generic)
newCustomAvailabilityZone ::
CustomAvailabilityZone
newCustomAvailabilityZone :: CustomAvailabilityZone
newCustomAvailabilityZone =
CustomAvailabilityZone' :: Maybe VpnDetails
-> Maybe Text -> Maybe Text -> Maybe Text -> CustomAvailabilityZone
CustomAvailabilityZone'
{ $sel:vpnDetails:CustomAvailabilityZone' :: Maybe VpnDetails
vpnDetails =
Maybe VpnDetails
forall a. Maybe a
Prelude.Nothing,
$sel:customAvailabilityZoneName:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customAvailabilityZoneId:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customAvailabilityZoneStatus:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customAvailabilityZone_vpnDetails :: Lens.Lens' CustomAvailabilityZone (Prelude.Maybe VpnDetails)
customAvailabilityZone_vpnDetails :: (Maybe VpnDetails -> f (Maybe VpnDetails))
-> CustomAvailabilityZone -> f CustomAvailabilityZone
customAvailabilityZone_vpnDetails = (CustomAvailabilityZone -> Maybe VpnDetails)
-> (CustomAvailabilityZone
-> Maybe VpnDetails -> CustomAvailabilityZone)
-> Lens
CustomAvailabilityZone
CustomAvailabilityZone
(Maybe VpnDetails)
(Maybe VpnDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAvailabilityZone' {Maybe VpnDetails
vpnDetails :: Maybe VpnDetails
$sel:vpnDetails:CustomAvailabilityZone' :: CustomAvailabilityZone -> Maybe VpnDetails
vpnDetails} -> Maybe VpnDetails
vpnDetails) (\s :: CustomAvailabilityZone
s@CustomAvailabilityZone' {} Maybe VpnDetails
a -> CustomAvailabilityZone
s {$sel:vpnDetails:CustomAvailabilityZone' :: Maybe VpnDetails
vpnDetails = Maybe VpnDetails
a} :: CustomAvailabilityZone)
customAvailabilityZone_customAvailabilityZoneName :: Lens.Lens' CustomAvailabilityZone (Prelude.Maybe Prelude.Text)
customAvailabilityZone_customAvailabilityZoneName :: (Maybe Text -> f (Maybe Text))
-> CustomAvailabilityZone -> f CustomAvailabilityZone
customAvailabilityZone_customAvailabilityZoneName = (CustomAvailabilityZone -> Maybe Text)
-> (CustomAvailabilityZone -> Maybe Text -> CustomAvailabilityZone)
-> Lens
CustomAvailabilityZone
CustomAvailabilityZone
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAvailabilityZone' {Maybe Text
customAvailabilityZoneName :: Maybe Text
$sel:customAvailabilityZoneName:CustomAvailabilityZone' :: CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneName} -> Maybe Text
customAvailabilityZoneName) (\s :: CustomAvailabilityZone
s@CustomAvailabilityZone' {} Maybe Text
a -> CustomAvailabilityZone
s {$sel:customAvailabilityZoneName:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneName = Maybe Text
a} :: CustomAvailabilityZone)
customAvailabilityZone_customAvailabilityZoneId :: Lens.Lens' CustomAvailabilityZone (Prelude.Maybe Prelude.Text)
customAvailabilityZone_customAvailabilityZoneId :: (Maybe Text -> f (Maybe Text))
-> CustomAvailabilityZone -> f CustomAvailabilityZone
customAvailabilityZone_customAvailabilityZoneId = (CustomAvailabilityZone -> Maybe Text)
-> (CustomAvailabilityZone -> Maybe Text -> CustomAvailabilityZone)
-> Lens
CustomAvailabilityZone
CustomAvailabilityZone
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAvailabilityZone' {Maybe Text
customAvailabilityZoneId :: Maybe Text
$sel:customAvailabilityZoneId:CustomAvailabilityZone' :: CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneId} -> Maybe Text
customAvailabilityZoneId) (\s :: CustomAvailabilityZone
s@CustomAvailabilityZone' {} Maybe Text
a -> CustomAvailabilityZone
s {$sel:customAvailabilityZoneId:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneId = Maybe Text
a} :: CustomAvailabilityZone)
customAvailabilityZone_customAvailabilityZoneStatus :: Lens.Lens' CustomAvailabilityZone (Prelude.Maybe Prelude.Text)
customAvailabilityZone_customAvailabilityZoneStatus :: (Maybe Text -> f (Maybe Text))
-> CustomAvailabilityZone -> f CustomAvailabilityZone
customAvailabilityZone_customAvailabilityZoneStatus = (CustomAvailabilityZone -> Maybe Text)
-> (CustomAvailabilityZone -> Maybe Text -> CustomAvailabilityZone)
-> Lens
CustomAvailabilityZone
CustomAvailabilityZone
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAvailabilityZone' {Maybe Text
customAvailabilityZoneStatus :: Maybe Text
$sel:customAvailabilityZoneStatus:CustomAvailabilityZone' :: CustomAvailabilityZone -> Maybe Text
customAvailabilityZoneStatus} -> Maybe Text
customAvailabilityZoneStatus) (\s :: CustomAvailabilityZone
s@CustomAvailabilityZone' {} Maybe Text
a -> CustomAvailabilityZone
s {$sel:customAvailabilityZoneStatus:CustomAvailabilityZone' :: Maybe Text
customAvailabilityZoneStatus = Maybe Text
a} :: CustomAvailabilityZone)
instance Core.FromXML CustomAvailabilityZone where
parseXML :: [Node] -> Either String CustomAvailabilityZone
parseXML [Node]
x =
Maybe VpnDetails
-> Maybe Text -> Maybe Text -> Maybe Text -> CustomAvailabilityZone
CustomAvailabilityZone'
(Maybe VpnDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CustomAvailabilityZone)
-> Either String (Maybe VpnDetails)
-> Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> CustomAvailabilityZone)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe VpnDetails)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnDetails")
Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> CustomAvailabilityZone)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> CustomAvailabilityZone)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomAvailabilityZoneName")
Either String (Maybe Text -> Maybe Text -> CustomAvailabilityZone)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> CustomAvailabilityZone)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomAvailabilityZoneId")
Either String (Maybe Text -> CustomAvailabilityZone)
-> Either String (Maybe Text)
-> Either String CustomAvailabilityZone
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomAvailabilityZoneStatus")
instance Prelude.Hashable CustomAvailabilityZone
instance Prelude.NFData CustomAvailabilityZone