{-# 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.TelemetryConfigurationUpdate where
import qualified Amazonka.Core as Core
import Amazonka.Greengrass.Types.Telemetry
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TelemetryConfigurationUpdate = TelemetryConfigurationUpdate'
{
TelemetryConfigurationUpdate -> Telemetry
telemetry :: Telemetry
}
deriving (TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool
(TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool)
-> (TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool)
-> Eq TelemetryConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool
$c/= :: TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool
== :: TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool
$c== :: TelemetryConfigurationUpdate
-> TelemetryConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [TelemetryConfigurationUpdate]
ReadPrec TelemetryConfigurationUpdate
Int -> ReadS TelemetryConfigurationUpdate
ReadS [TelemetryConfigurationUpdate]
(Int -> ReadS TelemetryConfigurationUpdate)
-> ReadS [TelemetryConfigurationUpdate]
-> ReadPrec TelemetryConfigurationUpdate
-> ReadPrec [TelemetryConfigurationUpdate]
-> Read TelemetryConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TelemetryConfigurationUpdate]
$creadListPrec :: ReadPrec [TelemetryConfigurationUpdate]
readPrec :: ReadPrec TelemetryConfigurationUpdate
$creadPrec :: ReadPrec TelemetryConfigurationUpdate
readList :: ReadS [TelemetryConfigurationUpdate]
$creadList :: ReadS [TelemetryConfigurationUpdate]
readsPrec :: Int -> ReadS TelemetryConfigurationUpdate
$creadsPrec :: Int -> ReadS TelemetryConfigurationUpdate
Prelude.Read, Int -> TelemetryConfigurationUpdate -> ShowS
[TelemetryConfigurationUpdate] -> ShowS
TelemetryConfigurationUpdate -> String
(Int -> TelemetryConfigurationUpdate -> ShowS)
-> (TelemetryConfigurationUpdate -> String)
-> ([TelemetryConfigurationUpdate] -> ShowS)
-> Show TelemetryConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TelemetryConfigurationUpdate] -> ShowS
$cshowList :: [TelemetryConfigurationUpdate] -> ShowS
show :: TelemetryConfigurationUpdate -> String
$cshow :: TelemetryConfigurationUpdate -> String
showsPrec :: Int -> TelemetryConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> TelemetryConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
TelemetryConfigurationUpdate -> Rep TelemetryConfigurationUpdate x)
-> (forall x.
Rep TelemetryConfigurationUpdate x -> TelemetryConfigurationUpdate)
-> Generic TelemetryConfigurationUpdate
forall x.
Rep TelemetryConfigurationUpdate x -> TelemetryConfigurationUpdate
forall x.
TelemetryConfigurationUpdate -> Rep TelemetryConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TelemetryConfigurationUpdate x -> TelemetryConfigurationUpdate
$cfrom :: forall x.
TelemetryConfigurationUpdate -> Rep TelemetryConfigurationUpdate x
Prelude.Generic)
newTelemetryConfigurationUpdate ::
Telemetry ->
TelemetryConfigurationUpdate
newTelemetryConfigurationUpdate :: Telemetry -> TelemetryConfigurationUpdate
newTelemetryConfigurationUpdate Telemetry
pTelemetry_ =
TelemetryConfigurationUpdate' :: Telemetry -> TelemetryConfigurationUpdate
TelemetryConfigurationUpdate'
{ $sel:telemetry:TelemetryConfigurationUpdate' :: Telemetry
telemetry =
Telemetry
pTelemetry_
}
telemetryConfigurationUpdate_telemetry :: Lens.Lens' TelemetryConfigurationUpdate Telemetry
telemetryConfigurationUpdate_telemetry :: (Telemetry -> f Telemetry)
-> TelemetryConfigurationUpdate -> f TelemetryConfigurationUpdate
telemetryConfigurationUpdate_telemetry = (TelemetryConfigurationUpdate -> Telemetry)
-> (TelemetryConfigurationUpdate
-> Telemetry -> TelemetryConfigurationUpdate)
-> Lens
TelemetryConfigurationUpdate
TelemetryConfigurationUpdate
Telemetry
Telemetry
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TelemetryConfigurationUpdate' {Telemetry
telemetry :: Telemetry
$sel:telemetry:TelemetryConfigurationUpdate' :: TelemetryConfigurationUpdate -> Telemetry
telemetry} -> Telemetry
telemetry) (\s :: TelemetryConfigurationUpdate
s@TelemetryConfigurationUpdate' {} Telemetry
a -> TelemetryConfigurationUpdate
s {$sel:telemetry:TelemetryConfigurationUpdate' :: Telemetry
telemetry = Telemetry
a} :: TelemetryConfigurationUpdate)
instance
Prelude.Hashable
TelemetryConfigurationUpdate
instance Prelude.NFData TelemetryConfigurationUpdate
instance Core.ToJSON TelemetryConfigurationUpdate where
toJSON :: TelemetryConfigurationUpdate -> Value
toJSON TelemetryConfigurationUpdate' {Telemetry
telemetry :: Telemetry
$sel:telemetry:TelemetryConfigurationUpdate' :: TelemetryConfigurationUpdate -> Telemetry
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Telemetry" Text -> Telemetry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Telemetry
telemetry)]
)