{-# 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.MediaTailor.Types.LogConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LogConfiguration = LogConfiguration'
{
LogConfiguration -> Int
percentEnabled :: Prelude.Int
}
deriving (LogConfiguration -> LogConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogConfiguration -> LogConfiguration -> Bool
$c/= :: LogConfiguration -> LogConfiguration -> Bool
== :: LogConfiguration -> LogConfiguration -> Bool
$c== :: LogConfiguration -> LogConfiguration -> Bool
Prelude.Eq, ReadPrec [LogConfiguration]
ReadPrec LogConfiguration
Int -> ReadS LogConfiguration
ReadS [LogConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogConfiguration]
$creadListPrec :: ReadPrec [LogConfiguration]
readPrec :: ReadPrec LogConfiguration
$creadPrec :: ReadPrec LogConfiguration
readList :: ReadS [LogConfiguration]
$creadList :: ReadS [LogConfiguration]
readsPrec :: Int -> ReadS LogConfiguration
$creadsPrec :: Int -> ReadS LogConfiguration
Prelude.Read, Int -> LogConfiguration -> ShowS
[LogConfiguration] -> ShowS
LogConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogConfiguration] -> ShowS
$cshowList :: [LogConfiguration] -> ShowS
show :: LogConfiguration -> String
$cshow :: LogConfiguration -> String
showsPrec :: Int -> LogConfiguration -> ShowS
$cshowsPrec :: Int -> LogConfiguration -> ShowS
Prelude.Show, forall x. Rep LogConfiguration x -> LogConfiguration
forall x. LogConfiguration -> Rep LogConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogConfiguration x -> LogConfiguration
$cfrom :: forall x. LogConfiguration -> Rep LogConfiguration x
Prelude.Generic)
newLogConfiguration ::
Prelude.Int ->
LogConfiguration
newLogConfiguration :: Int -> LogConfiguration
newLogConfiguration Int
pPercentEnabled_ =
LogConfiguration'
{ $sel:percentEnabled:LogConfiguration' :: Int
percentEnabled =
Int
pPercentEnabled_
}
logConfiguration_percentEnabled :: Lens.Lens' LogConfiguration Prelude.Int
logConfiguration_percentEnabled :: Lens' LogConfiguration Int
logConfiguration_percentEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogConfiguration' {Int
percentEnabled :: Int
$sel:percentEnabled:LogConfiguration' :: LogConfiguration -> Int
percentEnabled} -> Int
percentEnabled) (\s :: LogConfiguration
s@LogConfiguration' {} Int
a -> LogConfiguration
s {$sel:percentEnabled:LogConfiguration' :: Int
percentEnabled = Int
a} :: LogConfiguration)
instance Data.FromJSON LogConfiguration where
parseJSON :: Value -> Parser LogConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LogConfiguration"
( \Object
x ->
Int -> LogConfiguration
LogConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"PercentEnabled")
)
instance Prelude.Hashable LogConfiguration where
hashWithSalt :: Int -> LogConfiguration -> Int
hashWithSalt Int
_salt LogConfiguration' {Int
percentEnabled :: Int
$sel:percentEnabled:LogConfiguration' :: LogConfiguration -> Int
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
percentEnabled
instance Prelude.NFData LogConfiguration where
rnf :: LogConfiguration -> ()
rnf LogConfiguration' {Int
percentEnabled :: Int
$sel:percentEnabled:LogConfiguration' :: LogConfiguration -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
percentEnabled