{-# 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 #-}
module Amazonka.Greengrass.Types.RuntimeConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.Greengrass.Types.TelemetryConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RuntimeConfiguration = RuntimeConfiguration'
{
RuntimeConfiguration -> Maybe TelemetryConfiguration
telemetryConfiguration :: Prelude.Maybe TelemetryConfiguration
}
deriving (RuntimeConfiguration -> RuntimeConfiguration -> Bool
(RuntimeConfiguration -> RuntimeConfiguration -> Bool)
-> (RuntimeConfiguration -> RuntimeConfiguration -> Bool)
-> Eq RuntimeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuntimeConfiguration -> RuntimeConfiguration -> Bool
$c/= :: RuntimeConfiguration -> RuntimeConfiguration -> Bool
== :: RuntimeConfiguration -> RuntimeConfiguration -> Bool
$c== :: RuntimeConfiguration -> RuntimeConfiguration -> Bool
Prelude.Eq, ReadPrec [RuntimeConfiguration]
ReadPrec RuntimeConfiguration
Int -> ReadS RuntimeConfiguration
ReadS [RuntimeConfiguration]
(Int -> ReadS RuntimeConfiguration)
-> ReadS [RuntimeConfiguration]
-> ReadPrec RuntimeConfiguration
-> ReadPrec [RuntimeConfiguration]
-> Read RuntimeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RuntimeConfiguration]
$creadListPrec :: ReadPrec [RuntimeConfiguration]
readPrec :: ReadPrec RuntimeConfiguration
$creadPrec :: ReadPrec RuntimeConfiguration
readList :: ReadS [RuntimeConfiguration]
$creadList :: ReadS [RuntimeConfiguration]
readsPrec :: Int -> ReadS RuntimeConfiguration
$creadsPrec :: Int -> ReadS RuntimeConfiguration
Prelude.Read, Int -> RuntimeConfiguration -> ShowS
[RuntimeConfiguration] -> ShowS
RuntimeConfiguration -> String
(Int -> RuntimeConfiguration -> ShowS)
-> (RuntimeConfiguration -> String)
-> ([RuntimeConfiguration] -> ShowS)
-> Show RuntimeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuntimeConfiguration] -> ShowS
$cshowList :: [RuntimeConfiguration] -> ShowS
show :: RuntimeConfiguration -> String
$cshow :: RuntimeConfiguration -> String
showsPrec :: Int -> RuntimeConfiguration -> ShowS
$cshowsPrec :: Int -> RuntimeConfiguration -> ShowS
Prelude.Show, (forall x. RuntimeConfiguration -> Rep RuntimeConfiguration x)
-> (forall x. Rep RuntimeConfiguration x -> RuntimeConfiguration)
-> Generic RuntimeConfiguration
forall x. Rep RuntimeConfiguration x -> RuntimeConfiguration
forall x. RuntimeConfiguration -> Rep RuntimeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RuntimeConfiguration x -> RuntimeConfiguration
$cfrom :: forall x. RuntimeConfiguration -> Rep RuntimeConfiguration x
Prelude.Generic)
newRuntimeConfiguration ::
RuntimeConfiguration
newRuntimeConfiguration :: RuntimeConfiguration
newRuntimeConfiguration =
RuntimeConfiguration' :: Maybe TelemetryConfiguration -> RuntimeConfiguration
RuntimeConfiguration'
{ $sel:telemetryConfiguration:RuntimeConfiguration' :: Maybe TelemetryConfiguration
telemetryConfiguration =
Maybe TelemetryConfiguration
forall a. Maybe a
Prelude.Nothing
}
runtimeConfiguration_telemetryConfiguration :: Lens.Lens' RuntimeConfiguration (Prelude.Maybe TelemetryConfiguration)
runtimeConfiguration_telemetryConfiguration :: (Maybe TelemetryConfiguration -> f (Maybe TelemetryConfiguration))
-> RuntimeConfiguration -> f RuntimeConfiguration
runtimeConfiguration_telemetryConfiguration = (RuntimeConfiguration -> Maybe TelemetryConfiguration)
-> (RuntimeConfiguration
-> Maybe TelemetryConfiguration -> RuntimeConfiguration)
-> Lens
RuntimeConfiguration
RuntimeConfiguration
(Maybe TelemetryConfiguration)
(Maybe TelemetryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuntimeConfiguration' {Maybe TelemetryConfiguration
telemetryConfiguration :: Maybe TelemetryConfiguration
$sel:telemetryConfiguration:RuntimeConfiguration' :: RuntimeConfiguration -> Maybe TelemetryConfiguration
telemetryConfiguration} -> Maybe TelemetryConfiguration
telemetryConfiguration) (\s :: RuntimeConfiguration
s@RuntimeConfiguration' {} Maybe TelemetryConfiguration
a -> RuntimeConfiguration
s {$sel:telemetryConfiguration:RuntimeConfiguration' :: Maybe TelemetryConfiguration
telemetryConfiguration = Maybe TelemetryConfiguration
a} :: RuntimeConfiguration)
instance Core.FromJSON RuntimeConfiguration where
parseJSON :: Value -> Parser RuntimeConfiguration
parseJSON =
String
-> (Object -> Parser RuntimeConfiguration)
-> Value
-> Parser RuntimeConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RuntimeConfiguration"
( \Object
x ->
Maybe TelemetryConfiguration -> RuntimeConfiguration
RuntimeConfiguration'
(Maybe TelemetryConfiguration -> RuntimeConfiguration)
-> Parser (Maybe TelemetryConfiguration)
-> Parser RuntimeConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TelemetryConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TelemetryConfiguration")
)
instance Prelude.Hashable RuntimeConfiguration
instance Prelude.NFData RuntimeConfiguration