{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GroundStation.Types.GroundStationData 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

-- | 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
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]
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
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. 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'
    { $sel:groundStationId:GroundStationData' :: Maybe Text
groundStationId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:groundStationName:GroundStationData' :: Maybe Text
groundStationName = forall a. Maybe a
Prelude.Nothing,
      $sel:region:GroundStationData' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing
    }

-- | UUID of a ground station.
groundStationData_groundStationId :: Lens.Lens' GroundStationData (Prelude.Maybe Prelude.Text)
groundStationData_groundStationId :: Lens' GroundStationData (Maybe Text)
groundStationData_groundStationId = 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 :: Lens' GroundStationData (Maybe Text)
groundStationData_groundStationName = 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 :: Lens' GroundStationData (Maybe Text)
groundStationData_region = 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 Data.FromJSON GroundStationData where
  parseJSON :: Value -> Parser GroundStationData
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"GroundStationData"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> GroundStationData
GroundStationData'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"groundStationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"groundStationName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"region")
      )

instance Prelude.Hashable GroundStationData where
  hashWithSalt :: Int -> GroundStationData -> Int
hashWithSalt Int
_salt GroundStationData' {Maybe Text
region :: Maybe Text
groundStationName :: Maybe Text
groundStationId :: Maybe Text
$sel:region:GroundStationData' :: GroundStationData -> Maybe Text
$sel:groundStationName:GroundStationData' :: GroundStationData -> Maybe Text
$sel:groundStationId:GroundStationData' :: GroundStationData -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groundStationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groundStationName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region

instance Prelude.NFData GroundStationData where
  rnf :: GroundStationData -> ()
rnf GroundStationData' {Maybe Text
region :: Maybe Text
groundStationName :: Maybe Text
groundStationId :: Maybe Text
$sel:region:GroundStationData' :: GroundStationData -> Maybe Text
$sel:groundStationName:GroundStationData' :: GroundStationData -> Maybe Text
$sel:groundStationId:GroundStationData' :: GroundStationData -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groundStationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groundStationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region