{-# 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.Route53.Types.GeoLocationDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
data GeoLocationDetails = GeoLocationDetails'
{
GeoLocationDetails -> Maybe Text
subdivisionName :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
subdivisionCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
countryName :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
countryCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
continentCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
continentName :: Prelude.Maybe Prelude.Text
}
deriving (GeoLocationDetails -> GeoLocationDetails -> Bool
(GeoLocationDetails -> GeoLocationDetails -> Bool)
-> (GeoLocationDetails -> GeoLocationDetails -> Bool)
-> Eq GeoLocationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeoLocationDetails -> GeoLocationDetails -> Bool
$c/= :: GeoLocationDetails -> GeoLocationDetails -> Bool
== :: GeoLocationDetails -> GeoLocationDetails -> Bool
$c== :: GeoLocationDetails -> GeoLocationDetails -> Bool
Prelude.Eq, ReadPrec [GeoLocationDetails]
ReadPrec GeoLocationDetails
Int -> ReadS GeoLocationDetails
ReadS [GeoLocationDetails]
(Int -> ReadS GeoLocationDetails)
-> ReadS [GeoLocationDetails]
-> ReadPrec GeoLocationDetails
-> ReadPrec [GeoLocationDetails]
-> Read GeoLocationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GeoLocationDetails]
$creadListPrec :: ReadPrec [GeoLocationDetails]
readPrec :: ReadPrec GeoLocationDetails
$creadPrec :: ReadPrec GeoLocationDetails
readList :: ReadS [GeoLocationDetails]
$creadList :: ReadS [GeoLocationDetails]
readsPrec :: Int -> ReadS GeoLocationDetails
$creadsPrec :: Int -> ReadS GeoLocationDetails
Prelude.Read, Int -> GeoLocationDetails -> ShowS
[GeoLocationDetails] -> ShowS
GeoLocationDetails -> String
(Int -> GeoLocationDetails -> ShowS)
-> (GeoLocationDetails -> String)
-> ([GeoLocationDetails] -> ShowS)
-> Show GeoLocationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GeoLocationDetails] -> ShowS
$cshowList :: [GeoLocationDetails] -> ShowS
show :: GeoLocationDetails -> String
$cshow :: GeoLocationDetails -> String
showsPrec :: Int -> GeoLocationDetails -> ShowS
$cshowsPrec :: Int -> GeoLocationDetails -> ShowS
Prelude.Show, (forall x. GeoLocationDetails -> Rep GeoLocationDetails x)
-> (forall x. Rep GeoLocationDetails x -> GeoLocationDetails)
-> Generic GeoLocationDetails
forall x. Rep GeoLocationDetails x -> GeoLocationDetails
forall x. GeoLocationDetails -> Rep GeoLocationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GeoLocationDetails x -> GeoLocationDetails
$cfrom :: forall x. GeoLocationDetails -> Rep GeoLocationDetails x
Prelude.Generic)
newGeoLocationDetails ::
GeoLocationDetails
newGeoLocationDetails :: GeoLocationDetails
newGeoLocationDetails =
GeoLocationDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GeoLocationDetails
GeoLocationDetails'
{ $sel:subdivisionName:GeoLocationDetails' :: Maybe Text
subdivisionName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subdivisionCode:GeoLocationDetails' :: Maybe Text
subdivisionCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:countryName:GeoLocationDetails' :: Maybe Text
countryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:countryCode:GeoLocationDetails' :: Maybe Text
countryCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:continentCode:GeoLocationDetails' :: Maybe Text
continentCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:continentName:GeoLocationDetails' :: Maybe Text
continentName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
geoLocationDetails_subdivisionName :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_subdivisionName :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_subdivisionName = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
subdivisionName :: Maybe Text
$sel:subdivisionName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
subdivisionName} -> Maybe Text
subdivisionName) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:subdivisionName:GeoLocationDetails' :: Maybe Text
subdivisionName = Maybe Text
a} :: GeoLocationDetails)
geoLocationDetails_subdivisionCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_subdivisionCode :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_subdivisionCode = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
subdivisionCode :: Maybe Text
$sel:subdivisionCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
subdivisionCode} -> Maybe Text
subdivisionCode) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:subdivisionCode:GeoLocationDetails' :: Maybe Text
subdivisionCode = Maybe Text
a} :: GeoLocationDetails)
geoLocationDetails_countryName :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_countryName :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_countryName = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
countryName :: Maybe Text
$sel:countryName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
countryName} -> Maybe Text
countryName) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:countryName:GeoLocationDetails' :: Maybe Text
countryName = Maybe Text
a} :: GeoLocationDetails)
geoLocationDetails_countryCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_countryCode :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_countryCode = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
countryCode :: Maybe Text
$sel:countryCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
countryCode} -> Maybe Text
countryCode) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:countryCode:GeoLocationDetails' :: Maybe Text
countryCode = Maybe Text
a} :: GeoLocationDetails)
geoLocationDetails_continentCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_continentCode :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_continentCode = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
continentCode :: Maybe Text
$sel:continentCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
continentCode} -> Maybe Text
continentCode) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:continentCode:GeoLocationDetails' :: Maybe Text
continentCode = Maybe Text
a} :: GeoLocationDetails)
geoLocationDetails_continentName :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_continentName :: (Maybe Text -> f (Maybe Text))
-> GeoLocationDetails -> f GeoLocationDetails
geoLocationDetails_continentName = (GeoLocationDetails -> Maybe Text)
-> (GeoLocationDetails -> Maybe Text -> GeoLocationDetails)
-> Lens
GeoLocationDetails GeoLocationDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GeoLocationDetails' {Maybe Text
continentName :: Maybe Text
$sel:continentName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
continentName} -> Maybe Text
continentName) (\s :: GeoLocationDetails
s@GeoLocationDetails' {} Maybe Text
a -> GeoLocationDetails
s {$sel:continentName:GeoLocationDetails' :: Maybe Text
continentName = Maybe Text
a} :: GeoLocationDetails)
instance Core.FromXML GeoLocationDetails where
parseXML :: [Node] -> Either String GeoLocationDetails
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GeoLocationDetails
GeoLocationDetails'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GeoLocationDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GeoLocationDetails)
forall (f :: * -> *) a b. Functor 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
"SubdivisionName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GeoLocationDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> GeoLocationDetails)
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
"SubdivisionCode")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> GeoLocationDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> GeoLocationDetails)
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
"CountryName")
Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> GeoLocationDetails)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> GeoLocationDetails)
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
"CountryCode")
Either String (Maybe Text -> Maybe Text -> GeoLocationDetails)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> GeoLocationDetails)
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
"ContinentCode")
Either String (Maybe Text -> GeoLocationDetails)
-> Either String (Maybe Text) -> Either String GeoLocationDetails
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
"ContinentName")
instance Prelude.Hashable GeoLocationDetails
instance Prelude.NFData GeoLocationDetails