{-# 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.Neptune.Types.Timezone where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Timezone = Timezone'
{
Timezone -> Maybe Text
timezoneName :: Prelude.Maybe Prelude.Text
}
deriving (Timezone -> Timezone -> Bool
(Timezone -> Timezone -> Bool)
-> (Timezone -> Timezone -> Bool) -> Eq Timezone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Timezone -> Timezone -> Bool
$c/= :: Timezone -> Timezone -> Bool
== :: Timezone -> Timezone -> Bool
$c== :: Timezone -> Timezone -> Bool
Prelude.Eq, ReadPrec [Timezone]
ReadPrec Timezone
Int -> ReadS Timezone
ReadS [Timezone]
(Int -> ReadS Timezone)
-> ReadS [Timezone]
-> ReadPrec Timezone
-> ReadPrec [Timezone]
-> Read Timezone
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Timezone]
$creadListPrec :: ReadPrec [Timezone]
readPrec :: ReadPrec Timezone
$creadPrec :: ReadPrec Timezone
readList :: ReadS [Timezone]
$creadList :: ReadS [Timezone]
readsPrec :: Int -> ReadS Timezone
$creadsPrec :: Int -> ReadS Timezone
Prelude.Read, Int -> Timezone -> ShowS
[Timezone] -> ShowS
Timezone -> String
(Int -> Timezone -> ShowS)
-> (Timezone -> String) -> ([Timezone] -> ShowS) -> Show Timezone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Timezone] -> ShowS
$cshowList :: [Timezone] -> ShowS
show :: Timezone -> String
$cshow :: Timezone -> String
showsPrec :: Int -> Timezone -> ShowS
$cshowsPrec :: Int -> Timezone -> ShowS
Prelude.Show, (forall x. Timezone -> Rep Timezone x)
-> (forall x. Rep Timezone x -> Timezone) -> Generic Timezone
forall x. Rep Timezone x -> Timezone
forall x. Timezone -> Rep Timezone x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Timezone x -> Timezone
$cfrom :: forall x. Timezone -> Rep Timezone x
Prelude.Generic)
newTimezone ::
Timezone
newTimezone :: Timezone
newTimezone =
Timezone' :: Maybe Text -> Timezone
Timezone' {$sel:timezoneName:Timezone' :: Maybe Text
timezoneName = Maybe Text
forall a. Maybe a
Prelude.Nothing}
timezone_timezoneName :: Lens.Lens' Timezone (Prelude.Maybe Prelude.Text)
timezone_timezoneName :: (Maybe Text -> f (Maybe Text)) -> Timezone -> f Timezone
timezone_timezoneName = (Timezone -> Maybe Text)
-> (Timezone -> Maybe Text -> Timezone)
-> Lens Timezone Timezone (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Timezone' {Maybe Text
timezoneName :: Maybe Text
$sel:timezoneName:Timezone' :: Timezone -> Maybe Text
timezoneName} -> Maybe Text
timezoneName) (\s :: Timezone
s@Timezone' {} Maybe Text
a -> Timezone
s {$sel:timezoneName:Timezone' :: Maybe Text
timezoneName = Maybe Text
a} :: Timezone)
instance Core.FromXML Timezone where
parseXML :: [Node] -> Either String Timezone
parseXML [Node]
x =
Maybe Text -> Timezone
Timezone' (Maybe Text -> Timezone)
-> Either String (Maybe Text) -> Either String Timezone
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
"TimezoneName")
instance Prelude.Hashable Timezone
instance Prelude.NFData Timezone