{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GroundStation.Types.GroundStationData
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GroundStation.Types.GroundStationData where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the ground station data.
--
-- /See:/ 'newGroundStationData' smart constructor.
data GroundStationData = GroundStationData'
  { -- | UUID of a ground station.
    GroundStationData -> Maybe Text
groundStationId :: Prelude.Maybe Prelude.Text,
    -- | Name of a ground station.
    GroundStationData -> Maybe Text
groundStationName :: Prelude.Maybe Prelude.Text,
    -- | Ground station Region.
    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)

-- |
-- Create a value of 'GroundStationData' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'groundStationId', 'groundStationData_groundStationId' - UUID of a ground station.
--
-- 'groundStationName', 'groundStationData_groundStationName' - Name of a ground station.
--
-- 'region', 'groundStationData_region' - Ground station Region.
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
    }

-- | UUID of a ground station.
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)

-- | Name of a ground station.
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)

-- | Ground station Region.
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