{-# 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.EphemerisTypeDescription
-- 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.EphemerisTypeDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GroundStation.Types.EphemerisDescription
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newEphemerisTypeDescription' smart constructor.
data EphemerisTypeDescription = EphemerisTypeDescription'
  { EphemerisTypeDescription -> Maybe EphemerisDescription
oem :: Prelude.Maybe EphemerisDescription,
    EphemerisTypeDescription -> Maybe EphemerisDescription
tle :: Prelude.Maybe EphemerisDescription
  }
  deriving (EphemerisTypeDescription -> EphemerisTypeDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EphemerisTypeDescription -> EphemerisTypeDescription -> Bool
$c/= :: EphemerisTypeDescription -> EphemerisTypeDescription -> Bool
== :: EphemerisTypeDescription -> EphemerisTypeDescription -> Bool
$c== :: EphemerisTypeDescription -> EphemerisTypeDescription -> Bool
Prelude.Eq, ReadPrec [EphemerisTypeDescription]
ReadPrec EphemerisTypeDescription
Int -> ReadS EphemerisTypeDescription
ReadS [EphemerisTypeDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EphemerisTypeDescription]
$creadListPrec :: ReadPrec [EphemerisTypeDescription]
readPrec :: ReadPrec EphemerisTypeDescription
$creadPrec :: ReadPrec EphemerisTypeDescription
readList :: ReadS [EphemerisTypeDescription]
$creadList :: ReadS [EphemerisTypeDescription]
readsPrec :: Int -> ReadS EphemerisTypeDescription
$creadsPrec :: Int -> ReadS EphemerisTypeDescription
Prelude.Read, Int -> EphemerisTypeDescription -> ShowS
[EphemerisTypeDescription] -> ShowS
EphemerisTypeDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EphemerisTypeDescription] -> ShowS
$cshowList :: [EphemerisTypeDescription] -> ShowS
show :: EphemerisTypeDescription -> String
$cshow :: EphemerisTypeDescription -> String
showsPrec :: Int -> EphemerisTypeDescription -> ShowS
$cshowsPrec :: Int -> EphemerisTypeDescription -> ShowS
Prelude.Show, forall x.
Rep EphemerisTypeDescription x -> EphemerisTypeDescription
forall x.
EphemerisTypeDescription -> Rep EphemerisTypeDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EphemerisTypeDescription x -> EphemerisTypeDescription
$cfrom :: forall x.
EphemerisTypeDescription -> Rep EphemerisTypeDescription x
Prelude.Generic)

-- |
-- Create a value of 'EphemerisTypeDescription' 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:
--
-- 'oem', 'ephemerisTypeDescription_oem' - Undocumented member.
--
-- 'tle', 'ephemerisTypeDescription_tle' - Undocumented member.
newEphemerisTypeDescription ::
  EphemerisTypeDescription
newEphemerisTypeDescription :: EphemerisTypeDescription
newEphemerisTypeDescription =
  EphemerisTypeDescription'
    { $sel:oem:EphemerisTypeDescription' :: Maybe EphemerisDescription
oem = forall a. Maybe a
Prelude.Nothing,
      $sel:tle:EphemerisTypeDescription' :: Maybe EphemerisDescription
tle = forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
ephemerisTypeDescription_oem :: Lens.Lens' EphemerisTypeDescription (Prelude.Maybe EphemerisDescription)
ephemerisTypeDescription_oem :: Lens' EphemerisTypeDescription (Maybe EphemerisDescription)
ephemerisTypeDescription_oem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EphemerisTypeDescription' {Maybe EphemerisDescription
oem :: Maybe EphemerisDescription
$sel:oem:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
oem} -> Maybe EphemerisDescription
oem) (\s :: EphemerisTypeDescription
s@EphemerisTypeDescription' {} Maybe EphemerisDescription
a -> EphemerisTypeDescription
s {$sel:oem:EphemerisTypeDescription' :: Maybe EphemerisDescription
oem = Maybe EphemerisDescription
a} :: EphemerisTypeDescription)

-- | Undocumented member.
ephemerisTypeDescription_tle :: Lens.Lens' EphemerisTypeDescription (Prelude.Maybe EphemerisDescription)
ephemerisTypeDescription_tle :: Lens' EphemerisTypeDescription (Maybe EphemerisDescription)
ephemerisTypeDescription_tle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EphemerisTypeDescription' {Maybe EphemerisDescription
tle :: Maybe EphemerisDescription
$sel:tle:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
tle} -> Maybe EphemerisDescription
tle) (\s :: EphemerisTypeDescription
s@EphemerisTypeDescription' {} Maybe EphemerisDescription
a -> EphemerisTypeDescription
s {$sel:tle:EphemerisTypeDescription' :: Maybe EphemerisDescription
tle = Maybe EphemerisDescription
a} :: EphemerisTypeDescription)

instance Data.FromJSON EphemerisTypeDescription where
  parseJSON :: Value -> Parser EphemerisTypeDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EphemerisTypeDescription"
      ( \Object
x ->
          Maybe EphemerisDescription
-> Maybe EphemerisDescription -> EphemerisTypeDescription
EphemerisTypeDescription'
            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
"oem")
            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
"tle")
      )

instance Prelude.Hashable EphemerisTypeDescription where
  hashWithSalt :: Int -> EphemerisTypeDescription -> Int
hashWithSalt Int
_salt EphemerisTypeDescription' {Maybe EphemerisDescription
tle :: Maybe EphemerisDescription
oem :: Maybe EphemerisDescription
$sel:tle:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
$sel:oem:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EphemerisDescription
oem
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EphemerisDescription
tle

instance Prelude.NFData EphemerisTypeDescription where
  rnf :: EphemerisTypeDescription -> ()
rnf EphemerisTypeDescription' {Maybe EphemerisDescription
tle :: Maybe EphemerisDescription
oem :: Maybe EphemerisDescription
$sel:tle:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
$sel:oem:EphemerisTypeDescription' :: EphemerisTypeDescription -> Maybe EphemerisDescription
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EphemerisDescription
oem seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EphemerisDescription
tle