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