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

import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types.AntennaDemodDecodeDetails
import Amazonka.GroundStation.Types.EndpointDetails
import Amazonka.GroundStation.Types.S3RecordingDetails
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details for certain @Config@ object types in a contact.
--
-- /See:/ 'newConfigDetails' smart constructor.
data ConfigDetails = ConfigDetails'
  { -- | Details for antenna demod decode @Config@ in a contact.
    ConfigDetails -> Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails :: Prelude.Maybe AntennaDemodDecodeDetails,
    -- | Details for an S3 recording @Config@ in a contact.
    ConfigDetails -> Maybe S3RecordingDetails
s3RecordingDetails :: Prelude.Maybe S3RecordingDetails,
    ConfigDetails -> Maybe EndpointDetails
endpointDetails :: Prelude.Maybe EndpointDetails
  }
  deriving (ConfigDetails -> ConfigDetails -> Bool
(ConfigDetails -> ConfigDetails -> Bool)
-> (ConfigDetails -> ConfigDetails -> Bool) -> Eq ConfigDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigDetails -> ConfigDetails -> Bool
$c/= :: ConfigDetails -> ConfigDetails -> Bool
== :: ConfigDetails -> ConfigDetails -> Bool
$c== :: ConfigDetails -> ConfigDetails -> Bool
Prelude.Eq, ReadPrec [ConfigDetails]
ReadPrec ConfigDetails
Int -> ReadS ConfigDetails
ReadS [ConfigDetails]
(Int -> ReadS ConfigDetails)
-> ReadS [ConfigDetails]
-> ReadPrec ConfigDetails
-> ReadPrec [ConfigDetails]
-> Read ConfigDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigDetails]
$creadListPrec :: ReadPrec [ConfigDetails]
readPrec :: ReadPrec ConfigDetails
$creadPrec :: ReadPrec ConfigDetails
readList :: ReadS [ConfigDetails]
$creadList :: ReadS [ConfigDetails]
readsPrec :: Int -> ReadS ConfigDetails
$creadsPrec :: Int -> ReadS ConfigDetails
Prelude.Read, Int -> ConfigDetails -> ShowS
[ConfigDetails] -> ShowS
ConfigDetails -> String
(Int -> ConfigDetails -> ShowS)
-> (ConfigDetails -> String)
-> ([ConfigDetails] -> ShowS)
-> Show ConfigDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigDetails] -> ShowS
$cshowList :: [ConfigDetails] -> ShowS
show :: ConfigDetails -> String
$cshow :: ConfigDetails -> String
showsPrec :: Int -> ConfigDetails -> ShowS
$cshowsPrec :: Int -> ConfigDetails -> ShowS
Prelude.Show, (forall x. ConfigDetails -> Rep ConfigDetails x)
-> (forall x. Rep ConfigDetails x -> ConfigDetails)
-> Generic ConfigDetails
forall x. Rep ConfigDetails x -> ConfigDetails
forall x. ConfigDetails -> Rep ConfigDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigDetails x -> ConfigDetails
$cfrom :: forall x. ConfigDetails -> Rep ConfigDetails x
Prelude.Generic)

-- |
-- Create a value of 'ConfigDetails' 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:
--
-- 'antennaDemodDecodeDetails', 'configDetails_antennaDemodDecodeDetails' - Details for antenna demod decode @Config@ in a contact.
--
-- 's3RecordingDetails', 'configDetails_s3RecordingDetails' - Details for an S3 recording @Config@ in a contact.
--
-- 'endpointDetails', 'configDetails_endpointDetails' - Undocumented member.
newConfigDetails ::
  ConfigDetails
newConfigDetails :: ConfigDetails
newConfigDetails =
  ConfigDetails' :: Maybe AntennaDemodDecodeDetails
-> Maybe S3RecordingDetails
-> Maybe EndpointDetails
-> ConfigDetails
ConfigDetails'
    { $sel:antennaDemodDecodeDetails:ConfigDetails' :: Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails =
        Maybe AntennaDemodDecodeDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:s3RecordingDetails:ConfigDetails' :: Maybe S3RecordingDetails
s3RecordingDetails = Maybe S3RecordingDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointDetails:ConfigDetails' :: Maybe EndpointDetails
endpointDetails = Maybe EndpointDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | Details for antenna demod decode @Config@ in a contact.
configDetails_antennaDemodDecodeDetails :: Lens.Lens' ConfigDetails (Prelude.Maybe AntennaDemodDecodeDetails)
configDetails_antennaDemodDecodeDetails :: (Maybe AntennaDemodDecodeDetails
 -> f (Maybe AntennaDemodDecodeDetails))
-> ConfigDetails -> f ConfigDetails
configDetails_antennaDemodDecodeDetails = (ConfigDetails -> Maybe AntennaDemodDecodeDetails)
-> (ConfigDetails
    -> Maybe AntennaDemodDecodeDetails -> ConfigDetails)
-> Lens
     ConfigDetails
     ConfigDetails
     (Maybe AntennaDemodDecodeDetails)
     (Maybe AntennaDemodDecodeDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigDetails' {Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails :: Maybe AntennaDemodDecodeDetails
$sel:antennaDemodDecodeDetails:ConfigDetails' :: ConfigDetails -> Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails} -> Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails) (\s :: ConfigDetails
s@ConfigDetails' {} Maybe AntennaDemodDecodeDetails
a -> ConfigDetails
s {$sel:antennaDemodDecodeDetails:ConfigDetails' :: Maybe AntennaDemodDecodeDetails
antennaDemodDecodeDetails = Maybe AntennaDemodDecodeDetails
a} :: ConfigDetails)

-- | Details for an S3 recording @Config@ in a contact.
configDetails_s3RecordingDetails :: Lens.Lens' ConfigDetails (Prelude.Maybe S3RecordingDetails)
configDetails_s3RecordingDetails :: (Maybe S3RecordingDetails -> f (Maybe S3RecordingDetails))
-> ConfigDetails -> f ConfigDetails
configDetails_s3RecordingDetails = (ConfigDetails -> Maybe S3RecordingDetails)
-> (ConfigDetails -> Maybe S3RecordingDetails -> ConfigDetails)
-> Lens
     ConfigDetails
     ConfigDetails
     (Maybe S3RecordingDetails)
     (Maybe S3RecordingDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigDetails' {Maybe S3RecordingDetails
s3RecordingDetails :: Maybe S3RecordingDetails
$sel:s3RecordingDetails:ConfigDetails' :: ConfigDetails -> Maybe S3RecordingDetails
s3RecordingDetails} -> Maybe S3RecordingDetails
s3RecordingDetails) (\s :: ConfigDetails
s@ConfigDetails' {} Maybe S3RecordingDetails
a -> ConfigDetails
s {$sel:s3RecordingDetails:ConfigDetails' :: Maybe S3RecordingDetails
s3RecordingDetails = Maybe S3RecordingDetails
a} :: ConfigDetails)

-- | Undocumented member.
configDetails_endpointDetails :: Lens.Lens' ConfigDetails (Prelude.Maybe EndpointDetails)
configDetails_endpointDetails :: (Maybe EndpointDetails -> f (Maybe EndpointDetails))
-> ConfigDetails -> f ConfigDetails
configDetails_endpointDetails = (ConfigDetails -> Maybe EndpointDetails)
-> (ConfigDetails -> Maybe EndpointDetails -> ConfigDetails)
-> Lens
     ConfigDetails
     ConfigDetails
     (Maybe EndpointDetails)
     (Maybe EndpointDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigDetails' {Maybe EndpointDetails
endpointDetails :: Maybe EndpointDetails
$sel:endpointDetails:ConfigDetails' :: ConfigDetails -> Maybe EndpointDetails
endpointDetails} -> Maybe EndpointDetails
endpointDetails) (\s :: ConfigDetails
s@ConfigDetails' {} Maybe EndpointDetails
a -> ConfigDetails
s {$sel:endpointDetails:ConfigDetails' :: Maybe EndpointDetails
endpointDetails = Maybe EndpointDetails
a} :: ConfigDetails)

instance Core.FromJSON ConfigDetails where
  parseJSON :: Value -> Parser ConfigDetails
parseJSON =
    String
-> (Object -> Parser ConfigDetails)
-> Value
-> Parser ConfigDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigDetails"
      ( \Object
x ->
          Maybe AntennaDemodDecodeDetails
-> Maybe S3RecordingDetails
-> Maybe EndpointDetails
-> ConfigDetails
ConfigDetails'
            (Maybe AntennaDemodDecodeDetails
 -> Maybe S3RecordingDetails
 -> Maybe EndpointDetails
 -> ConfigDetails)
-> Parser (Maybe AntennaDemodDecodeDetails)
-> Parser
     (Maybe S3RecordingDetails
      -> Maybe EndpointDetails -> ConfigDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AntennaDemodDecodeDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"antennaDemodDecodeDetails")
            Parser
  (Maybe S3RecordingDetails
   -> Maybe EndpointDetails -> ConfigDetails)
-> Parser (Maybe S3RecordingDetails)
-> Parser (Maybe EndpointDetails -> ConfigDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3RecordingDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3RecordingDetails")
            Parser (Maybe EndpointDetails -> ConfigDetails)
-> Parser (Maybe EndpointDetails) -> Parser ConfigDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endpointDetails")
      )

instance Prelude.Hashable ConfigDetails

instance Prelude.NFData ConfigDetails