{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
data GeoLocationDetails = GeoLocationDetails'
{
GeoLocationDetails -> Maybe Text
continentCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
continentName :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
countryCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
countryName :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
subdivisionCode :: Prelude.Maybe Prelude.Text,
GeoLocationDetails -> Maybe Text
subdivisionName :: Prelude.Maybe Prelude.Text
}
deriving (GeoLocationDetails -> GeoLocationDetails -> Bool
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]
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
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. 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'
{ $sel:continentCode:GeoLocationDetails' :: Maybe Text
continentCode =
forall a. Maybe a
Prelude.Nothing,
$sel:continentName:GeoLocationDetails' :: Maybe Text
continentName = forall a. Maybe a
Prelude.Nothing,
$sel:countryCode:GeoLocationDetails' :: Maybe Text
countryCode = forall a. Maybe a
Prelude.Nothing,
$sel:countryName:GeoLocationDetails' :: Maybe Text
countryName = forall a. Maybe a
Prelude.Nothing,
$sel:subdivisionCode:GeoLocationDetails' :: Maybe Text
subdivisionCode = forall a. Maybe a
Prelude.Nothing,
$sel:subdivisionName:GeoLocationDetails' :: Maybe Text
subdivisionName = forall a. Maybe a
Prelude.Nothing
}
geoLocationDetails_continentCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_continentCode :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_continentCode = 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 :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_continentName = 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)
geoLocationDetails_countryCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_countryCode :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_countryCode = 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_countryName :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_countryName :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_countryName = 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_subdivisionCode :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_subdivisionCode :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_subdivisionCode = 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_subdivisionName :: Lens.Lens' GeoLocationDetails (Prelude.Maybe Prelude.Text)
geoLocationDetails_subdivisionName :: Lens' GeoLocationDetails (Maybe Text)
geoLocationDetails_subdivisionName = 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)
instance Data.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'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ContinentCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ContinentName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CountryCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CountryName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SubdivisionCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SubdivisionName")
instance Prelude.Hashable GeoLocationDetails where
hashWithSalt :: Int -> GeoLocationDetails -> Int
hashWithSalt Int
_salt GeoLocationDetails' {Maybe Text
subdivisionName :: Maybe Text
subdivisionCode :: Maybe Text
countryName :: Maybe Text
countryCode :: Maybe Text
continentName :: Maybe Text
continentCode :: Maybe Text
$sel:subdivisionName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:subdivisionCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:countryName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:countryCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:continentName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:continentCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
continentCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
continentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
countryCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
countryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subdivisionCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subdivisionName
instance Prelude.NFData GeoLocationDetails where
rnf :: GeoLocationDetails -> ()
rnf GeoLocationDetails' {Maybe Text
subdivisionName :: Maybe Text
subdivisionCode :: Maybe Text
countryName :: Maybe Text
countryCode :: Maybe Text
continentName :: Maybe Text
continentCode :: Maybe Text
$sel:subdivisionName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:subdivisionCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:countryName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:countryCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:continentName:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
$sel:continentCode:GeoLocationDetails' :: GeoLocationDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
continentCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
continentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
countryCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
countryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subdivisionCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subdivisionName