{-# 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.EMRContainers.Types.S3MonitoringConfiguration 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 S3MonitoringConfiguration = S3MonitoringConfiguration'
{
S3MonitoringConfiguration -> Text
logUri :: Prelude.Text
}
deriving (S3MonitoringConfiguration -> S3MonitoringConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3MonitoringConfiguration -> S3MonitoringConfiguration -> Bool
$c/= :: S3MonitoringConfiguration -> S3MonitoringConfiguration -> Bool
== :: S3MonitoringConfiguration -> S3MonitoringConfiguration -> Bool
$c== :: S3MonitoringConfiguration -> S3MonitoringConfiguration -> Bool
Prelude.Eq, ReadPrec [S3MonitoringConfiguration]
ReadPrec S3MonitoringConfiguration
Int -> ReadS S3MonitoringConfiguration
ReadS [S3MonitoringConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3MonitoringConfiguration]
$creadListPrec :: ReadPrec [S3MonitoringConfiguration]
readPrec :: ReadPrec S3MonitoringConfiguration
$creadPrec :: ReadPrec S3MonitoringConfiguration
readList :: ReadS [S3MonitoringConfiguration]
$creadList :: ReadS [S3MonitoringConfiguration]
readsPrec :: Int -> ReadS S3MonitoringConfiguration
$creadsPrec :: Int -> ReadS S3MonitoringConfiguration
Prelude.Read, Int -> S3MonitoringConfiguration -> ShowS
[S3MonitoringConfiguration] -> ShowS
S3MonitoringConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3MonitoringConfiguration] -> ShowS
$cshowList :: [S3MonitoringConfiguration] -> ShowS
show :: S3MonitoringConfiguration -> String
$cshow :: S3MonitoringConfiguration -> String
showsPrec :: Int -> S3MonitoringConfiguration -> ShowS
$cshowsPrec :: Int -> S3MonitoringConfiguration -> ShowS
Prelude.Show, forall x.
Rep S3MonitoringConfiguration x -> S3MonitoringConfiguration
forall x.
S3MonitoringConfiguration -> Rep S3MonitoringConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep S3MonitoringConfiguration x -> S3MonitoringConfiguration
$cfrom :: forall x.
S3MonitoringConfiguration -> Rep S3MonitoringConfiguration x
Prelude.Generic)
newS3MonitoringConfiguration ::
Prelude.Text ->
S3MonitoringConfiguration
newS3MonitoringConfiguration :: Text -> S3MonitoringConfiguration
newS3MonitoringConfiguration Text
pLogUri_ =
S3MonitoringConfiguration' {$sel:logUri:S3MonitoringConfiguration' :: Text
logUri = Text
pLogUri_}
s3MonitoringConfiguration_logUri :: Lens.Lens' S3MonitoringConfiguration Prelude.Text
s3MonitoringConfiguration_logUri :: Lens' S3MonitoringConfiguration Text
s3MonitoringConfiguration_logUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3MonitoringConfiguration' {Text
logUri :: Text
$sel:logUri:S3MonitoringConfiguration' :: S3MonitoringConfiguration -> Text
logUri} -> Text
logUri) (\s :: S3MonitoringConfiguration
s@S3MonitoringConfiguration' {} Text
a -> S3MonitoringConfiguration
s {$sel:logUri:S3MonitoringConfiguration' :: Text
logUri = Text
a} :: S3MonitoringConfiguration)
instance Data.FromJSON S3MonitoringConfiguration where
parseJSON :: Value -> Parser S3MonitoringConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"S3MonitoringConfiguration"
( \Object
x ->
Text -> S3MonitoringConfiguration
S3MonitoringConfiguration'
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
"logUri")
)
instance Prelude.Hashable S3MonitoringConfiguration where
hashWithSalt :: Int -> S3MonitoringConfiguration -> Int
hashWithSalt Int
_salt S3MonitoringConfiguration' {Text
logUri :: Text
$sel:logUri:S3MonitoringConfiguration' :: S3MonitoringConfiguration -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logUri
instance Prelude.NFData S3MonitoringConfiguration where
rnf :: S3MonitoringConfiguration -> ()
rnf S3MonitoringConfiguration' {Text
logUri :: Text
$sel:logUri:S3MonitoringConfiguration' :: S3MonitoringConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
logUri
instance Data.ToJSON S3MonitoringConfiguration where
toJSON :: S3MonitoringConfiguration -> Value
toJSON S3MonitoringConfiguration' {Text
logUri :: Text
$sel:logUri:S3MonitoringConfiguration' :: S3MonitoringConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"logUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
logUri)]
)