{-# 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.MediaLive.Types.FrameCaptureS3Settings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.S3CannedAcl
import qualified Amazonka.Prelude as Prelude
data FrameCaptureS3Settings = FrameCaptureS3Settings'
{
FrameCaptureS3Settings -> Maybe S3CannedAcl
cannedAcl :: Prelude.Maybe S3CannedAcl
}
deriving (FrameCaptureS3Settings -> FrameCaptureS3Settings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FrameCaptureS3Settings -> FrameCaptureS3Settings -> Bool
$c/= :: FrameCaptureS3Settings -> FrameCaptureS3Settings -> Bool
== :: FrameCaptureS3Settings -> FrameCaptureS3Settings -> Bool
$c== :: FrameCaptureS3Settings -> FrameCaptureS3Settings -> Bool
Prelude.Eq, ReadPrec [FrameCaptureS3Settings]
ReadPrec FrameCaptureS3Settings
Int -> ReadS FrameCaptureS3Settings
ReadS [FrameCaptureS3Settings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FrameCaptureS3Settings]
$creadListPrec :: ReadPrec [FrameCaptureS3Settings]
readPrec :: ReadPrec FrameCaptureS3Settings
$creadPrec :: ReadPrec FrameCaptureS3Settings
readList :: ReadS [FrameCaptureS3Settings]
$creadList :: ReadS [FrameCaptureS3Settings]
readsPrec :: Int -> ReadS FrameCaptureS3Settings
$creadsPrec :: Int -> ReadS FrameCaptureS3Settings
Prelude.Read, Int -> FrameCaptureS3Settings -> ShowS
[FrameCaptureS3Settings] -> ShowS
FrameCaptureS3Settings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FrameCaptureS3Settings] -> ShowS
$cshowList :: [FrameCaptureS3Settings] -> ShowS
show :: FrameCaptureS3Settings -> String
$cshow :: FrameCaptureS3Settings -> String
showsPrec :: Int -> FrameCaptureS3Settings -> ShowS
$cshowsPrec :: Int -> FrameCaptureS3Settings -> ShowS
Prelude.Show, forall x. Rep FrameCaptureS3Settings x -> FrameCaptureS3Settings
forall x. FrameCaptureS3Settings -> Rep FrameCaptureS3Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FrameCaptureS3Settings x -> FrameCaptureS3Settings
$cfrom :: forall x. FrameCaptureS3Settings -> Rep FrameCaptureS3Settings x
Prelude.Generic)
newFrameCaptureS3Settings ::
FrameCaptureS3Settings
newFrameCaptureS3Settings :: FrameCaptureS3Settings
newFrameCaptureS3Settings =
FrameCaptureS3Settings'
{ $sel:cannedAcl:FrameCaptureS3Settings' :: Maybe S3CannedAcl
cannedAcl =
forall a. Maybe a
Prelude.Nothing
}
frameCaptureS3Settings_cannedAcl :: Lens.Lens' FrameCaptureS3Settings (Prelude.Maybe S3CannedAcl)
frameCaptureS3Settings_cannedAcl :: Lens' FrameCaptureS3Settings (Maybe S3CannedAcl)
frameCaptureS3Settings_cannedAcl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FrameCaptureS3Settings' {Maybe S3CannedAcl
cannedAcl :: Maybe S3CannedAcl
$sel:cannedAcl:FrameCaptureS3Settings' :: FrameCaptureS3Settings -> Maybe S3CannedAcl
cannedAcl} -> Maybe S3CannedAcl
cannedAcl) (\s :: FrameCaptureS3Settings
s@FrameCaptureS3Settings' {} Maybe S3CannedAcl
a -> FrameCaptureS3Settings
s {$sel:cannedAcl:FrameCaptureS3Settings' :: Maybe S3CannedAcl
cannedAcl = Maybe S3CannedAcl
a} :: FrameCaptureS3Settings)
instance Data.FromJSON FrameCaptureS3Settings where
parseJSON :: Value -> Parser FrameCaptureS3Settings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FrameCaptureS3Settings"
( \Object
x ->
Maybe S3CannedAcl -> FrameCaptureS3Settings
FrameCaptureS3Settings'
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
"cannedAcl")
)
instance Prelude.Hashable FrameCaptureS3Settings where
hashWithSalt :: Int -> FrameCaptureS3Settings -> Int
hashWithSalt Int
_salt FrameCaptureS3Settings' {Maybe S3CannedAcl
cannedAcl :: Maybe S3CannedAcl
$sel:cannedAcl:FrameCaptureS3Settings' :: FrameCaptureS3Settings -> Maybe S3CannedAcl
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3CannedAcl
cannedAcl
instance Prelude.NFData FrameCaptureS3Settings where
rnf :: FrameCaptureS3Settings -> ()
rnf FrameCaptureS3Settings' {Maybe S3CannedAcl
cannedAcl :: Maybe S3CannedAcl
$sel:cannedAcl:FrameCaptureS3Settings' :: FrameCaptureS3Settings -> Maybe S3CannedAcl
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe S3CannedAcl
cannedAcl
instance Data.ToJSON FrameCaptureS3Settings where
toJSON :: FrameCaptureS3Settings -> Value
toJSON FrameCaptureS3Settings' {Maybe S3CannedAcl
cannedAcl :: Maybe S3CannedAcl
$sel:cannedAcl:FrameCaptureS3Settings' :: FrameCaptureS3Settings -> Maybe S3CannedAcl
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"cannedAcl" 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 S3CannedAcl
cannedAcl]
)