{-# 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.SatelliteListItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SatelliteListItem = SatelliteListItem'
{
SatelliteListItem -> Maybe Text
satelliteId :: Prelude.Maybe Prelude.Text,
SatelliteListItem -> Maybe Text
satelliteArn :: Prelude.Maybe Prelude.Text,
SatelliteListItem -> Maybe [Text]
groundStations :: Prelude.Maybe [Prelude.Text],
SatelliteListItem -> Maybe Natural
noradSatelliteID :: Prelude.Maybe Prelude.Natural
}
deriving (SatelliteListItem -> SatelliteListItem -> Bool
(SatelliteListItem -> SatelliteListItem -> Bool)
-> (SatelliteListItem -> SatelliteListItem -> Bool)
-> Eq SatelliteListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SatelliteListItem -> SatelliteListItem -> Bool
$c/= :: SatelliteListItem -> SatelliteListItem -> Bool
== :: SatelliteListItem -> SatelliteListItem -> Bool
$c== :: SatelliteListItem -> SatelliteListItem -> Bool
Prelude.Eq, ReadPrec [SatelliteListItem]
ReadPrec SatelliteListItem
Int -> ReadS SatelliteListItem
ReadS [SatelliteListItem]
(Int -> ReadS SatelliteListItem)
-> ReadS [SatelliteListItem]
-> ReadPrec SatelliteListItem
-> ReadPrec [SatelliteListItem]
-> Read SatelliteListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SatelliteListItem]
$creadListPrec :: ReadPrec [SatelliteListItem]
readPrec :: ReadPrec SatelliteListItem
$creadPrec :: ReadPrec SatelliteListItem
readList :: ReadS [SatelliteListItem]
$creadList :: ReadS [SatelliteListItem]
readsPrec :: Int -> ReadS SatelliteListItem
$creadsPrec :: Int -> ReadS SatelliteListItem
Prelude.Read, Int -> SatelliteListItem -> ShowS
[SatelliteListItem] -> ShowS
SatelliteListItem -> String
(Int -> SatelliteListItem -> ShowS)
-> (SatelliteListItem -> String)
-> ([SatelliteListItem] -> ShowS)
-> Show SatelliteListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SatelliteListItem] -> ShowS
$cshowList :: [SatelliteListItem] -> ShowS
show :: SatelliteListItem -> String
$cshow :: SatelliteListItem -> String
showsPrec :: Int -> SatelliteListItem -> ShowS
$cshowsPrec :: Int -> SatelliteListItem -> ShowS
Prelude.Show, (forall x. SatelliteListItem -> Rep SatelliteListItem x)
-> (forall x. Rep SatelliteListItem x -> SatelliteListItem)
-> Generic SatelliteListItem
forall x. Rep SatelliteListItem x -> SatelliteListItem
forall x. SatelliteListItem -> Rep SatelliteListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SatelliteListItem x -> SatelliteListItem
$cfrom :: forall x. SatelliteListItem -> Rep SatelliteListItem x
Prelude.Generic)
newSatelliteListItem ::
SatelliteListItem
newSatelliteListItem :: SatelliteListItem
newSatelliteListItem =
SatelliteListItem' :: Maybe Text
-> Maybe Text -> Maybe [Text] -> Maybe Natural -> SatelliteListItem
SatelliteListItem'
{ $sel:satelliteId:SatelliteListItem' :: Maybe Text
satelliteId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:satelliteArn:SatelliteListItem' :: Maybe Text
satelliteArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groundStations:SatelliteListItem' :: Maybe [Text]
groundStations = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:noradSatelliteID:SatelliteListItem' :: Maybe Natural
noradSatelliteID = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
satelliteListItem_satelliteId :: Lens.Lens' SatelliteListItem (Prelude.Maybe Prelude.Text)
satelliteListItem_satelliteId :: (Maybe Text -> f (Maybe Text))
-> SatelliteListItem -> f SatelliteListItem
satelliteListItem_satelliteId = (SatelliteListItem -> Maybe Text)
-> (SatelliteListItem -> Maybe Text -> SatelliteListItem)
-> Lens
SatelliteListItem SatelliteListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SatelliteListItem' {Maybe Text
satelliteId :: Maybe Text
$sel:satelliteId:SatelliteListItem' :: SatelliteListItem -> Maybe Text
satelliteId} -> Maybe Text
satelliteId) (\s :: SatelliteListItem
s@SatelliteListItem' {} Maybe Text
a -> SatelliteListItem
s {$sel:satelliteId:SatelliteListItem' :: Maybe Text
satelliteId = Maybe Text
a} :: SatelliteListItem)
satelliteListItem_satelliteArn :: Lens.Lens' SatelliteListItem (Prelude.Maybe Prelude.Text)
satelliteListItem_satelliteArn :: (Maybe Text -> f (Maybe Text))
-> SatelliteListItem -> f SatelliteListItem
satelliteListItem_satelliteArn = (SatelliteListItem -> Maybe Text)
-> (SatelliteListItem -> Maybe Text -> SatelliteListItem)
-> Lens
SatelliteListItem SatelliteListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SatelliteListItem' {Maybe Text
satelliteArn :: Maybe Text
$sel:satelliteArn:SatelliteListItem' :: SatelliteListItem -> Maybe Text
satelliteArn} -> Maybe Text
satelliteArn) (\s :: SatelliteListItem
s@SatelliteListItem' {} Maybe Text
a -> SatelliteListItem
s {$sel:satelliteArn:SatelliteListItem' :: Maybe Text
satelliteArn = Maybe Text
a} :: SatelliteListItem)
satelliteListItem_groundStations :: Lens.Lens' SatelliteListItem (Prelude.Maybe [Prelude.Text])
satelliteListItem_groundStations :: (Maybe [Text] -> f (Maybe [Text]))
-> SatelliteListItem -> f SatelliteListItem
satelliteListItem_groundStations = (SatelliteListItem -> Maybe [Text])
-> (SatelliteListItem -> Maybe [Text] -> SatelliteListItem)
-> Lens
SatelliteListItem SatelliteListItem (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SatelliteListItem' {Maybe [Text]
groundStations :: Maybe [Text]
$sel:groundStations:SatelliteListItem' :: SatelliteListItem -> Maybe [Text]
groundStations} -> Maybe [Text]
groundStations) (\s :: SatelliteListItem
s@SatelliteListItem' {} Maybe [Text]
a -> SatelliteListItem
s {$sel:groundStations:SatelliteListItem' :: Maybe [Text]
groundStations = Maybe [Text]
a} :: SatelliteListItem) ((Maybe [Text] -> f (Maybe [Text]))
-> SatelliteListItem -> f SatelliteListItem)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SatelliteListItem
-> f SatelliteListItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
satelliteListItem_noradSatelliteID :: Lens.Lens' SatelliteListItem (Prelude.Maybe Prelude.Natural)
satelliteListItem_noradSatelliteID :: (Maybe Natural -> f (Maybe Natural))
-> SatelliteListItem -> f SatelliteListItem
satelliteListItem_noradSatelliteID = (SatelliteListItem -> Maybe Natural)
-> (SatelliteListItem -> Maybe Natural -> SatelliteListItem)
-> Lens
SatelliteListItem SatelliteListItem (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SatelliteListItem' {Maybe Natural
noradSatelliteID :: Maybe Natural
$sel:noradSatelliteID:SatelliteListItem' :: SatelliteListItem -> Maybe Natural
noradSatelliteID} -> Maybe Natural
noradSatelliteID) (\s :: SatelliteListItem
s@SatelliteListItem' {} Maybe Natural
a -> SatelliteListItem
s {$sel:noradSatelliteID:SatelliteListItem' :: Maybe Natural
noradSatelliteID = Maybe Natural
a} :: SatelliteListItem)
instance Core.FromJSON SatelliteListItem where
parseJSON :: Value -> Parser SatelliteListItem
parseJSON =
String
-> (Object -> Parser SatelliteListItem)
-> Value
-> Parser SatelliteListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SatelliteListItem"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe [Text] -> Maybe Natural -> SatelliteListItem
SatelliteListItem'
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Natural
-> SatelliteListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe [Text] -> Maybe Natural -> SatelliteListItem)
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
"satelliteId")
Parser
(Maybe Text -> Maybe [Text] -> Maybe Natural -> SatelliteListItem)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> Maybe Natural -> SatelliteListItem)
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
"satelliteArn")
Parser (Maybe [Text] -> Maybe Natural -> SatelliteListItem)
-> Parser (Maybe [Text])
-> Parser (Maybe Natural -> SatelliteListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"groundStations" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Natural -> SatelliteListItem)
-> Parser (Maybe Natural) -> Parser SatelliteListItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"noradSatelliteID")
)
instance Prelude.Hashable SatelliteListItem
instance Prelude.NFData SatelliteListItem