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