{-# 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.GroundStation.Types.GroundStationData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GroundStationData = GroundStationData'
{
GroundStationData -> Maybe Text
groundStationId :: Prelude.Maybe Prelude.Text,
GroundStationData -> Maybe Text
groundStationName :: Prelude.Maybe Prelude.Text,
GroundStationData -> Maybe Text
region :: Prelude.Maybe Prelude.Text
}
deriving (GroundStationData -> GroundStationData -> Bool
(GroundStationData -> GroundStationData -> Bool)
-> (GroundStationData -> GroundStationData -> Bool)
-> Eq GroundStationData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroundStationData -> GroundStationData -> Bool
$c/= :: GroundStationData -> GroundStationData -> Bool
== :: GroundStationData -> GroundStationData -> Bool
$c== :: GroundStationData -> GroundStationData -> Bool
Prelude.Eq, ReadPrec [GroundStationData]
ReadPrec GroundStationData
Int -> ReadS GroundStationData
ReadS [GroundStationData]
(Int -> ReadS GroundStationData)
-> ReadS [GroundStationData]
-> ReadPrec GroundStationData
-> ReadPrec [GroundStationData]
-> Read GroundStationData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroundStationData]
$creadListPrec :: ReadPrec [GroundStationData]
readPrec :: ReadPrec GroundStationData
$creadPrec :: ReadPrec GroundStationData
readList :: ReadS [GroundStationData]
$creadList :: ReadS [GroundStationData]
readsPrec :: Int -> ReadS GroundStationData
$creadsPrec :: Int -> ReadS GroundStationData
Prelude.Read, Int -> GroundStationData -> ShowS
[GroundStationData] -> ShowS
GroundStationData -> String
(Int -> GroundStationData -> ShowS)
-> (GroundStationData -> String)
-> ([GroundStationData] -> ShowS)
-> Show GroundStationData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroundStationData] -> ShowS
$cshowList :: [GroundStationData] -> ShowS
show :: GroundStationData -> String
$cshow :: GroundStationData -> String
showsPrec :: Int -> GroundStationData -> ShowS
$cshowsPrec :: Int -> GroundStationData -> ShowS
Prelude.Show, (forall x. GroundStationData -> Rep GroundStationData x)
-> (forall x. Rep GroundStationData x -> GroundStationData)
-> Generic GroundStationData
forall x. Rep GroundStationData x -> GroundStationData
forall x. GroundStationData -> Rep GroundStationData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroundStationData x -> GroundStationData
$cfrom :: forall x. GroundStationData -> Rep GroundStationData x
Prelude.Generic)
newGroundStationData ::
GroundStationData
newGroundStationData :: GroundStationData
newGroundStationData =
GroundStationData' :: Maybe Text -> Maybe Text -> Maybe Text -> GroundStationData
GroundStationData'
{ $sel:groundStationId:GroundStationData' :: Maybe Text
groundStationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groundStationName:GroundStationData' :: Maybe Text
groundStationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:GroundStationData' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
groundStationData_groundStationId :: Lens.Lens' GroundStationData (Prelude.Maybe Prelude.Text)
groundStationData_groundStationId :: (Maybe Text -> f (Maybe Text))
-> GroundStationData -> f GroundStationData
groundStationData_groundStationId = (GroundStationData -> Maybe Text)
-> (GroundStationData -> Maybe Text -> GroundStationData)
-> Lens
GroundStationData GroundStationData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroundStationData' {Maybe Text
groundStationId :: Maybe Text
$sel:groundStationId:GroundStationData' :: GroundStationData -> Maybe Text
groundStationId} -> Maybe Text
groundStationId) (\s :: GroundStationData
s@GroundStationData' {} Maybe Text
a -> GroundStationData
s {$sel:groundStationId:GroundStationData' :: Maybe Text
groundStationId = Maybe Text
a} :: GroundStationData)
groundStationData_groundStationName :: Lens.Lens' GroundStationData (Prelude.Maybe Prelude.Text)
groundStationData_groundStationName :: (Maybe Text -> f (Maybe Text))
-> GroundStationData -> f GroundStationData
groundStationData_groundStationName = (GroundStationData -> Maybe Text)
-> (GroundStationData -> Maybe Text -> GroundStationData)
-> Lens
GroundStationData GroundStationData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroundStationData' {Maybe Text
groundStationName :: Maybe Text
$sel:groundStationName:GroundStationData' :: GroundStationData -> Maybe Text
groundStationName} -> Maybe Text
groundStationName) (\s :: GroundStationData
s@GroundStationData' {} Maybe Text
a -> GroundStationData
s {$sel:groundStationName:GroundStationData' :: Maybe Text
groundStationName = Maybe Text
a} :: GroundStationData)
groundStationData_region :: Lens.Lens' GroundStationData (Prelude.Maybe Prelude.Text)
groundStationData_region :: (Maybe Text -> f (Maybe Text))
-> GroundStationData -> f GroundStationData
groundStationData_region = (GroundStationData -> Maybe Text)
-> (GroundStationData -> Maybe Text -> GroundStationData)
-> Lens
GroundStationData GroundStationData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroundStationData' {Maybe Text
region :: Maybe Text
$sel:region:GroundStationData' :: GroundStationData -> Maybe Text
region} -> Maybe Text
region) (\s :: GroundStationData
s@GroundStationData' {} Maybe Text
a -> GroundStationData
s {$sel:region:GroundStationData' :: Maybe Text
region = Maybe Text
a} :: GroundStationData)
instance Core.FromJSON GroundStationData where
parseJSON :: Value -> Parser GroundStationData
parseJSON =
String
-> (Object -> Parser GroundStationData)
-> Value
-> Parser GroundStationData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GroundStationData"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> GroundStationData
GroundStationData'
(Maybe Text -> Maybe Text -> Maybe Text -> GroundStationData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> GroundStationData)
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
"groundStationId")
Parser (Maybe Text -> Maybe Text -> GroundStationData)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GroundStationData)
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
"groundStationName")
Parser (Maybe Text -> GroundStationData)
-> Parser (Maybe Text) -> Parser GroundStationData
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
"region")
)
instance Prelude.Hashable GroundStationData
instance Prelude.NFData GroundStationData