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

import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types.AntennaDownlinkConfig
import Amazonka.GroundStation.Types.AntennaDownlinkDemodDecodeConfig
import Amazonka.GroundStation.Types.AntennaUplinkConfig
import Amazonka.GroundStation.Types.DataflowEndpointConfig
import Amazonka.GroundStation.Types.S3RecordingConfig
import Amazonka.GroundStation.Types.TrackingConfig
import Amazonka.GroundStation.Types.UplinkEchoConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Object containing the parameters of a @Config@.
--
-- See the subtype definitions for what each type of @Config@ contains.
--
-- /See:/ 'newConfigTypeData' smart constructor.
data ConfigTypeData = ConfigTypeData'
  { -- | Information about how AWS Ground Station should configure an antenna for
    -- downlink demod decode during a contact.
    ConfigTypeData -> Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig :: Prelude.Maybe AntennaDownlinkDemodDecodeConfig,
    -- | Information about how AWS Ground Station should configure an antenna for
    -- downlink during a contact.
    ConfigTypeData -> Maybe AntennaDownlinkConfig
antennaDownlinkConfig :: Prelude.Maybe AntennaDownlinkConfig,
    -- | Information about how AWS Ground Station should configure an antenna for
    -- uplink during a contact.
    ConfigTypeData -> Maybe AntennaUplinkConfig
antennaUplinkConfig :: Prelude.Maybe AntennaUplinkConfig,
    -- | Information about an uplink echo @Config@.
    --
    -- Parameters from the @AntennaUplinkConfig@, corresponding to the
    -- specified @AntennaUplinkConfigArn@, are used when this
    -- @UplinkEchoConfig@ is used in a contact.
    ConfigTypeData -> Maybe UplinkEchoConfig
uplinkEchoConfig :: Prelude.Maybe UplinkEchoConfig,
    -- | Information about an S3 recording @Config@.
    ConfigTypeData -> Maybe S3RecordingConfig
s3RecordingConfig :: Prelude.Maybe S3RecordingConfig,
    -- | Object that determines whether tracking should be used during a contact
    -- executed with this @Config@ in the mission profile.
    ConfigTypeData -> Maybe TrackingConfig
trackingConfig :: Prelude.Maybe TrackingConfig,
    -- | Information about the dataflow endpoint @Config@.
    ConfigTypeData -> Maybe DataflowEndpointConfig
dataflowEndpointConfig :: Prelude.Maybe DataflowEndpointConfig
  }
  deriving (ConfigTypeData -> ConfigTypeData -> Bool
(ConfigTypeData -> ConfigTypeData -> Bool)
-> (ConfigTypeData -> ConfigTypeData -> Bool) -> Eq ConfigTypeData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigTypeData -> ConfigTypeData -> Bool
$c/= :: ConfigTypeData -> ConfigTypeData -> Bool
== :: ConfigTypeData -> ConfigTypeData -> Bool
$c== :: ConfigTypeData -> ConfigTypeData -> Bool
Prelude.Eq, ReadPrec [ConfigTypeData]
ReadPrec ConfigTypeData
Int -> ReadS ConfigTypeData
ReadS [ConfigTypeData]
(Int -> ReadS ConfigTypeData)
-> ReadS [ConfigTypeData]
-> ReadPrec ConfigTypeData
-> ReadPrec [ConfigTypeData]
-> Read ConfigTypeData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigTypeData]
$creadListPrec :: ReadPrec [ConfigTypeData]
readPrec :: ReadPrec ConfigTypeData
$creadPrec :: ReadPrec ConfigTypeData
readList :: ReadS [ConfigTypeData]
$creadList :: ReadS [ConfigTypeData]
readsPrec :: Int -> ReadS ConfigTypeData
$creadsPrec :: Int -> ReadS ConfigTypeData
Prelude.Read, Int -> ConfigTypeData -> ShowS
[ConfigTypeData] -> ShowS
ConfigTypeData -> String
(Int -> ConfigTypeData -> ShowS)
-> (ConfigTypeData -> String)
-> ([ConfigTypeData] -> ShowS)
-> Show ConfigTypeData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigTypeData] -> ShowS
$cshowList :: [ConfigTypeData] -> ShowS
show :: ConfigTypeData -> String
$cshow :: ConfigTypeData -> String
showsPrec :: Int -> ConfigTypeData -> ShowS
$cshowsPrec :: Int -> ConfigTypeData -> ShowS
Prelude.Show, (forall x. ConfigTypeData -> Rep ConfigTypeData x)
-> (forall x. Rep ConfigTypeData x -> ConfigTypeData)
-> Generic ConfigTypeData
forall x. Rep ConfigTypeData x -> ConfigTypeData
forall x. ConfigTypeData -> Rep ConfigTypeData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigTypeData x -> ConfigTypeData
$cfrom :: forall x. ConfigTypeData -> Rep ConfigTypeData x
Prelude.Generic)

-- |
-- Create a value of 'ConfigTypeData' 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:
--
-- 'antennaDownlinkDemodDecodeConfig', 'configTypeData_antennaDownlinkDemodDecodeConfig' - Information about how AWS Ground Station should configure an antenna for
-- downlink demod decode during a contact.
--
-- 'antennaDownlinkConfig', 'configTypeData_antennaDownlinkConfig' - Information about how AWS Ground Station should configure an antenna for
-- downlink during a contact.
--
-- 'antennaUplinkConfig', 'configTypeData_antennaUplinkConfig' - Information about how AWS Ground Station should configure an antenna for
-- uplink during a contact.
--
-- 'uplinkEchoConfig', 'configTypeData_uplinkEchoConfig' - Information about an uplink echo @Config@.
--
-- Parameters from the @AntennaUplinkConfig@, corresponding to the
-- specified @AntennaUplinkConfigArn@, are used when this
-- @UplinkEchoConfig@ is used in a contact.
--
-- 's3RecordingConfig', 'configTypeData_s3RecordingConfig' - Information about an S3 recording @Config@.
--
-- 'trackingConfig', 'configTypeData_trackingConfig' - Object that determines whether tracking should be used during a contact
-- executed with this @Config@ in the mission profile.
--
-- 'dataflowEndpointConfig', 'configTypeData_dataflowEndpointConfig' - Information about the dataflow endpoint @Config@.
newConfigTypeData ::
  ConfigTypeData
newConfigTypeData :: ConfigTypeData
newConfigTypeData =
  ConfigTypeData' :: Maybe AntennaDownlinkDemodDecodeConfig
-> Maybe AntennaDownlinkConfig
-> Maybe AntennaUplinkConfig
-> Maybe UplinkEchoConfig
-> Maybe S3RecordingConfig
-> Maybe TrackingConfig
-> Maybe DataflowEndpointConfig
-> ConfigTypeData
ConfigTypeData'
    { $sel:antennaDownlinkDemodDecodeConfig:ConfigTypeData' :: Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig =
        Maybe AntennaDownlinkDemodDecodeConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:antennaDownlinkConfig:ConfigTypeData' :: Maybe AntennaDownlinkConfig
antennaDownlinkConfig = Maybe AntennaDownlinkConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:antennaUplinkConfig:ConfigTypeData' :: Maybe AntennaUplinkConfig
antennaUplinkConfig = Maybe AntennaUplinkConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:uplinkEchoConfig:ConfigTypeData' :: Maybe UplinkEchoConfig
uplinkEchoConfig = Maybe UplinkEchoConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:s3RecordingConfig:ConfigTypeData' :: Maybe S3RecordingConfig
s3RecordingConfig = Maybe S3RecordingConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:trackingConfig:ConfigTypeData' :: Maybe TrackingConfig
trackingConfig = Maybe TrackingConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:dataflowEndpointConfig:ConfigTypeData' :: Maybe DataflowEndpointConfig
dataflowEndpointConfig = Maybe DataflowEndpointConfig
forall a. Maybe a
Prelude.Nothing
    }

-- | Information about how AWS Ground Station should configure an antenna for
-- downlink demod decode during a contact.
configTypeData_antennaDownlinkDemodDecodeConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe AntennaDownlinkDemodDecodeConfig)
configTypeData_antennaDownlinkDemodDecodeConfig :: (Maybe AntennaDownlinkDemodDecodeConfig
 -> f (Maybe AntennaDownlinkDemodDecodeConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_antennaDownlinkDemodDecodeConfig = (ConfigTypeData -> Maybe AntennaDownlinkDemodDecodeConfig)
-> (ConfigTypeData
    -> Maybe AntennaDownlinkDemodDecodeConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe AntennaDownlinkDemodDecodeConfig)
     (Maybe AntennaDownlinkDemodDecodeConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig :: Maybe AntennaDownlinkDemodDecodeConfig
$sel:antennaDownlinkDemodDecodeConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig} -> Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe AntennaDownlinkDemodDecodeConfig
a -> ConfigTypeData
s {$sel:antennaDownlinkDemodDecodeConfig:ConfigTypeData' :: Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig = Maybe AntennaDownlinkDemodDecodeConfig
a} :: ConfigTypeData)

-- | Information about how AWS Ground Station should configure an antenna for
-- downlink during a contact.
configTypeData_antennaDownlinkConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe AntennaDownlinkConfig)
configTypeData_antennaDownlinkConfig :: (Maybe AntennaDownlinkConfig -> f (Maybe AntennaDownlinkConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_antennaDownlinkConfig = (ConfigTypeData -> Maybe AntennaDownlinkConfig)
-> (ConfigTypeData
    -> Maybe AntennaDownlinkConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe AntennaDownlinkConfig)
     (Maybe AntennaDownlinkConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe AntennaDownlinkConfig
antennaDownlinkConfig :: Maybe AntennaDownlinkConfig
$sel:antennaDownlinkConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaDownlinkConfig
antennaDownlinkConfig} -> Maybe AntennaDownlinkConfig
antennaDownlinkConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe AntennaDownlinkConfig
a -> ConfigTypeData
s {$sel:antennaDownlinkConfig:ConfigTypeData' :: Maybe AntennaDownlinkConfig
antennaDownlinkConfig = Maybe AntennaDownlinkConfig
a} :: ConfigTypeData)

-- | Information about how AWS Ground Station should configure an antenna for
-- uplink during a contact.
configTypeData_antennaUplinkConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe AntennaUplinkConfig)
configTypeData_antennaUplinkConfig :: (Maybe AntennaUplinkConfig -> f (Maybe AntennaUplinkConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_antennaUplinkConfig = (ConfigTypeData -> Maybe AntennaUplinkConfig)
-> (ConfigTypeData -> Maybe AntennaUplinkConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe AntennaUplinkConfig)
     (Maybe AntennaUplinkConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe AntennaUplinkConfig
antennaUplinkConfig :: Maybe AntennaUplinkConfig
$sel:antennaUplinkConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaUplinkConfig
antennaUplinkConfig} -> Maybe AntennaUplinkConfig
antennaUplinkConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe AntennaUplinkConfig
a -> ConfigTypeData
s {$sel:antennaUplinkConfig:ConfigTypeData' :: Maybe AntennaUplinkConfig
antennaUplinkConfig = Maybe AntennaUplinkConfig
a} :: ConfigTypeData)

-- | Information about an uplink echo @Config@.
--
-- Parameters from the @AntennaUplinkConfig@, corresponding to the
-- specified @AntennaUplinkConfigArn@, are used when this
-- @UplinkEchoConfig@ is used in a contact.
configTypeData_uplinkEchoConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe UplinkEchoConfig)
configTypeData_uplinkEchoConfig :: (Maybe UplinkEchoConfig -> f (Maybe UplinkEchoConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_uplinkEchoConfig = (ConfigTypeData -> Maybe UplinkEchoConfig)
-> (ConfigTypeData -> Maybe UplinkEchoConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe UplinkEchoConfig)
     (Maybe UplinkEchoConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe UplinkEchoConfig
uplinkEchoConfig :: Maybe UplinkEchoConfig
$sel:uplinkEchoConfig:ConfigTypeData' :: ConfigTypeData -> Maybe UplinkEchoConfig
uplinkEchoConfig} -> Maybe UplinkEchoConfig
uplinkEchoConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe UplinkEchoConfig
a -> ConfigTypeData
s {$sel:uplinkEchoConfig:ConfigTypeData' :: Maybe UplinkEchoConfig
uplinkEchoConfig = Maybe UplinkEchoConfig
a} :: ConfigTypeData)

-- | Information about an S3 recording @Config@.
configTypeData_s3RecordingConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe S3RecordingConfig)
configTypeData_s3RecordingConfig :: (Maybe S3RecordingConfig -> f (Maybe S3RecordingConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_s3RecordingConfig = (ConfigTypeData -> Maybe S3RecordingConfig)
-> (ConfigTypeData -> Maybe S3RecordingConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe S3RecordingConfig)
     (Maybe S3RecordingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe S3RecordingConfig
s3RecordingConfig :: Maybe S3RecordingConfig
$sel:s3RecordingConfig:ConfigTypeData' :: ConfigTypeData -> Maybe S3RecordingConfig
s3RecordingConfig} -> Maybe S3RecordingConfig
s3RecordingConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe S3RecordingConfig
a -> ConfigTypeData
s {$sel:s3RecordingConfig:ConfigTypeData' :: Maybe S3RecordingConfig
s3RecordingConfig = Maybe S3RecordingConfig
a} :: ConfigTypeData)

-- | Object that determines whether tracking should be used during a contact
-- executed with this @Config@ in the mission profile.
configTypeData_trackingConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe TrackingConfig)
configTypeData_trackingConfig :: (Maybe TrackingConfig -> f (Maybe TrackingConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_trackingConfig = (ConfigTypeData -> Maybe TrackingConfig)
-> (ConfigTypeData -> Maybe TrackingConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe TrackingConfig)
     (Maybe TrackingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe TrackingConfig
trackingConfig :: Maybe TrackingConfig
$sel:trackingConfig:ConfigTypeData' :: ConfigTypeData -> Maybe TrackingConfig
trackingConfig} -> Maybe TrackingConfig
trackingConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe TrackingConfig
a -> ConfigTypeData
s {$sel:trackingConfig:ConfigTypeData' :: Maybe TrackingConfig
trackingConfig = Maybe TrackingConfig
a} :: ConfigTypeData)

-- | Information about the dataflow endpoint @Config@.
configTypeData_dataflowEndpointConfig :: Lens.Lens' ConfigTypeData (Prelude.Maybe DataflowEndpointConfig)
configTypeData_dataflowEndpointConfig :: (Maybe DataflowEndpointConfig -> f (Maybe DataflowEndpointConfig))
-> ConfigTypeData -> f ConfigTypeData
configTypeData_dataflowEndpointConfig = (ConfigTypeData -> Maybe DataflowEndpointConfig)
-> (ConfigTypeData
    -> Maybe DataflowEndpointConfig -> ConfigTypeData)
-> Lens
     ConfigTypeData
     ConfigTypeData
     (Maybe DataflowEndpointConfig)
     (Maybe DataflowEndpointConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigTypeData' {Maybe DataflowEndpointConfig
dataflowEndpointConfig :: Maybe DataflowEndpointConfig
$sel:dataflowEndpointConfig:ConfigTypeData' :: ConfigTypeData -> Maybe DataflowEndpointConfig
dataflowEndpointConfig} -> Maybe DataflowEndpointConfig
dataflowEndpointConfig) (\s :: ConfigTypeData
s@ConfigTypeData' {} Maybe DataflowEndpointConfig
a -> ConfigTypeData
s {$sel:dataflowEndpointConfig:ConfigTypeData' :: Maybe DataflowEndpointConfig
dataflowEndpointConfig = Maybe DataflowEndpointConfig
a} :: ConfigTypeData)

instance Core.FromJSON ConfigTypeData where
  parseJSON :: Value -> Parser ConfigTypeData
parseJSON =
    String
-> (Object -> Parser ConfigTypeData)
-> Value
-> Parser ConfigTypeData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigTypeData"
      ( \Object
x ->
          Maybe AntennaDownlinkDemodDecodeConfig
-> Maybe AntennaDownlinkConfig
-> Maybe AntennaUplinkConfig
-> Maybe UplinkEchoConfig
-> Maybe S3RecordingConfig
-> Maybe TrackingConfig
-> Maybe DataflowEndpointConfig
-> ConfigTypeData
ConfigTypeData'
            (Maybe AntennaDownlinkDemodDecodeConfig
 -> Maybe AntennaDownlinkConfig
 -> Maybe AntennaUplinkConfig
 -> Maybe UplinkEchoConfig
 -> Maybe S3RecordingConfig
 -> Maybe TrackingConfig
 -> Maybe DataflowEndpointConfig
 -> ConfigTypeData)
-> Parser (Maybe AntennaDownlinkDemodDecodeConfig)
-> Parser
     (Maybe AntennaDownlinkConfig
      -> Maybe AntennaUplinkConfig
      -> Maybe UplinkEchoConfig
      -> Maybe S3RecordingConfig
      -> Maybe TrackingConfig
      -> Maybe DataflowEndpointConfig
      -> ConfigTypeData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AntennaDownlinkDemodDecodeConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"antennaDownlinkDemodDecodeConfig")
            Parser
  (Maybe AntennaDownlinkConfig
   -> Maybe AntennaUplinkConfig
   -> Maybe UplinkEchoConfig
   -> Maybe S3RecordingConfig
   -> Maybe TrackingConfig
   -> Maybe DataflowEndpointConfig
   -> ConfigTypeData)
-> Parser (Maybe AntennaDownlinkConfig)
-> Parser
     (Maybe AntennaUplinkConfig
      -> Maybe UplinkEchoConfig
      -> Maybe S3RecordingConfig
      -> Maybe TrackingConfig
      -> Maybe DataflowEndpointConfig
      -> ConfigTypeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AntennaDownlinkConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"antennaDownlinkConfig")
            Parser
  (Maybe AntennaUplinkConfig
   -> Maybe UplinkEchoConfig
   -> Maybe S3RecordingConfig
   -> Maybe TrackingConfig
   -> Maybe DataflowEndpointConfig
   -> ConfigTypeData)
-> Parser (Maybe AntennaUplinkConfig)
-> Parser
     (Maybe UplinkEchoConfig
      -> Maybe S3RecordingConfig
      -> Maybe TrackingConfig
      -> Maybe DataflowEndpointConfig
      -> ConfigTypeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AntennaUplinkConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"antennaUplinkConfig")
            Parser
  (Maybe UplinkEchoConfig
   -> Maybe S3RecordingConfig
   -> Maybe TrackingConfig
   -> Maybe DataflowEndpointConfig
   -> ConfigTypeData)
-> Parser (Maybe UplinkEchoConfig)
-> Parser
     (Maybe S3RecordingConfig
      -> Maybe TrackingConfig
      -> Maybe DataflowEndpointConfig
      -> ConfigTypeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UplinkEchoConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"uplinkEchoConfig")
            Parser
  (Maybe S3RecordingConfig
   -> Maybe TrackingConfig
   -> Maybe DataflowEndpointConfig
   -> ConfigTypeData)
-> Parser (Maybe S3RecordingConfig)
-> Parser
     (Maybe TrackingConfig
      -> Maybe DataflowEndpointConfig -> ConfigTypeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3RecordingConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3RecordingConfig")
            Parser
  (Maybe TrackingConfig
   -> Maybe DataflowEndpointConfig -> ConfigTypeData)
-> Parser (Maybe TrackingConfig)
-> Parser (Maybe DataflowEndpointConfig -> ConfigTypeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrackingConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"trackingConfig")
            Parser (Maybe DataflowEndpointConfig -> ConfigTypeData)
-> Parser (Maybe DataflowEndpointConfig) -> Parser ConfigTypeData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataflowEndpointConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataflowEndpointConfig")
      )

instance Prelude.Hashable ConfigTypeData

instance Prelude.NFData ConfigTypeData

instance Core.ToJSON ConfigTypeData where
  toJSON :: ConfigTypeData -> Value
toJSON ConfigTypeData' {Maybe DataflowEndpointConfig
Maybe S3RecordingConfig
Maybe AntennaDownlinkDemodDecodeConfig
Maybe AntennaDownlinkConfig
Maybe TrackingConfig
Maybe UplinkEchoConfig
Maybe AntennaUplinkConfig
dataflowEndpointConfig :: Maybe DataflowEndpointConfig
trackingConfig :: Maybe TrackingConfig
s3RecordingConfig :: Maybe S3RecordingConfig
uplinkEchoConfig :: Maybe UplinkEchoConfig
antennaUplinkConfig :: Maybe AntennaUplinkConfig
antennaDownlinkConfig :: Maybe AntennaDownlinkConfig
antennaDownlinkDemodDecodeConfig :: Maybe AntennaDownlinkDemodDecodeConfig
$sel:dataflowEndpointConfig:ConfigTypeData' :: ConfigTypeData -> Maybe DataflowEndpointConfig
$sel:trackingConfig:ConfigTypeData' :: ConfigTypeData -> Maybe TrackingConfig
$sel:s3RecordingConfig:ConfigTypeData' :: ConfigTypeData -> Maybe S3RecordingConfig
$sel:uplinkEchoConfig:ConfigTypeData' :: ConfigTypeData -> Maybe UplinkEchoConfig
$sel:antennaUplinkConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaUplinkConfig
$sel:antennaDownlinkConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaDownlinkConfig
$sel:antennaDownlinkDemodDecodeConfig:ConfigTypeData' :: ConfigTypeData -> Maybe AntennaDownlinkDemodDecodeConfig
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"antennaDownlinkDemodDecodeConfig" Text -> AntennaDownlinkDemodDecodeConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AntennaDownlinkDemodDecodeConfig -> Pair)
-> Maybe AntennaDownlinkDemodDecodeConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AntennaDownlinkDemodDecodeConfig
antennaDownlinkDemodDecodeConfig,
            (Text
"antennaDownlinkConfig" Text -> AntennaDownlinkConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AntennaDownlinkConfig -> Pair)
-> Maybe AntennaDownlinkConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AntennaDownlinkConfig
antennaDownlinkConfig,
            (Text
"antennaUplinkConfig" Text -> AntennaUplinkConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AntennaUplinkConfig -> Pair)
-> Maybe AntennaUplinkConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AntennaUplinkConfig
antennaUplinkConfig,
            (Text
"uplinkEchoConfig" Text -> UplinkEchoConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UplinkEchoConfig -> Pair) -> Maybe UplinkEchoConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UplinkEchoConfig
uplinkEchoConfig,
            (Text
"s3RecordingConfig" Text -> S3RecordingConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (S3RecordingConfig -> Pair)
-> Maybe S3RecordingConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3RecordingConfig
s3RecordingConfig,
            (Text
"trackingConfig" Text -> TrackingConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TrackingConfig -> Pair) -> Maybe TrackingConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrackingConfig
trackingConfig,
            (Text
"dataflowEndpointConfig" Text -> DataflowEndpointConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DataflowEndpointConfig -> Pair)
-> Maybe DataflowEndpointConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataflowEndpointConfig
dataflowEndpointConfig
          ]
      )