{-# 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.EC2.Types.VerifiedAccessLogS3DestinationOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data VerifiedAccessLogS3DestinationOptions = VerifiedAccessLogS3DestinationOptions'
{
VerifiedAccessLogS3DestinationOptions -> Maybe Text
bucketName :: Prelude.Maybe Prelude.Text,
VerifiedAccessLogS3DestinationOptions -> Maybe Text
bucketOwner :: Prelude.Maybe Prelude.Text,
VerifiedAccessLogS3DestinationOptions -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
VerifiedAccessLogS3DestinationOptions -> Bool
enabled :: Prelude.Bool
}
deriving (VerifiedAccessLogS3DestinationOptions
-> VerifiedAccessLogS3DestinationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifiedAccessLogS3DestinationOptions
-> VerifiedAccessLogS3DestinationOptions -> Bool
$c/= :: VerifiedAccessLogS3DestinationOptions
-> VerifiedAccessLogS3DestinationOptions -> Bool
== :: VerifiedAccessLogS3DestinationOptions
-> VerifiedAccessLogS3DestinationOptions -> Bool
$c== :: VerifiedAccessLogS3DestinationOptions
-> VerifiedAccessLogS3DestinationOptions -> Bool
Prelude.Eq, ReadPrec [VerifiedAccessLogS3DestinationOptions]
ReadPrec VerifiedAccessLogS3DestinationOptions
Int -> ReadS VerifiedAccessLogS3DestinationOptions
ReadS [VerifiedAccessLogS3DestinationOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VerifiedAccessLogS3DestinationOptions]
$creadListPrec :: ReadPrec [VerifiedAccessLogS3DestinationOptions]
readPrec :: ReadPrec VerifiedAccessLogS3DestinationOptions
$creadPrec :: ReadPrec VerifiedAccessLogS3DestinationOptions
readList :: ReadS [VerifiedAccessLogS3DestinationOptions]
$creadList :: ReadS [VerifiedAccessLogS3DestinationOptions]
readsPrec :: Int -> ReadS VerifiedAccessLogS3DestinationOptions
$creadsPrec :: Int -> ReadS VerifiedAccessLogS3DestinationOptions
Prelude.Read, Int -> VerifiedAccessLogS3DestinationOptions -> ShowS
[VerifiedAccessLogS3DestinationOptions] -> ShowS
VerifiedAccessLogS3DestinationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerifiedAccessLogS3DestinationOptions] -> ShowS
$cshowList :: [VerifiedAccessLogS3DestinationOptions] -> ShowS
show :: VerifiedAccessLogS3DestinationOptions -> String
$cshow :: VerifiedAccessLogS3DestinationOptions -> String
showsPrec :: Int -> VerifiedAccessLogS3DestinationOptions -> ShowS
$cshowsPrec :: Int -> VerifiedAccessLogS3DestinationOptions -> ShowS
Prelude.Show, forall x.
Rep VerifiedAccessLogS3DestinationOptions x
-> VerifiedAccessLogS3DestinationOptions
forall x.
VerifiedAccessLogS3DestinationOptions
-> Rep VerifiedAccessLogS3DestinationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerifiedAccessLogS3DestinationOptions x
-> VerifiedAccessLogS3DestinationOptions
$cfrom :: forall x.
VerifiedAccessLogS3DestinationOptions
-> Rep VerifiedAccessLogS3DestinationOptions x
Prelude.Generic)
newVerifiedAccessLogS3DestinationOptions ::
Prelude.Bool ->
VerifiedAccessLogS3DestinationOptions
newVerifiedAccessLogS3DestinationOptions :: Bool -> VerifiedAccessLogS3DestinationOptions
newVerifiedAccessLogS3DestinationOptions Bool
pEnabled_ =
VerifiedAccessLogS3DestinationOptions'
{ $sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
bucketName =
forall a. Maybe a
Prelude.Nothing,
$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
bucketOwner = forall a. Maybe a
Prelude.Nothing,
$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: Bool
enabled = Bool
pEnabled_
}
verifiedAccessLogS3DestinationOptions_bucketName :: Lens.Lens' VerifiedAccessLogS3DestinationOptions (Prelude.Maybe Prelude.Text)
verifiedAccessLogS3DestinationOptions_bucketName :: Lens' VerifiedAccessLogS3DestinationOptions (Maybe Text)
verifiedAccessLogS3DestinationOptions_bucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogS3DestinationOptions' {Maybe Text
bucketName :: Maybe Text
$sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
bucketName} -> Maybe Text
bucketName) (\s :: VerifiedAccessLogS3DestinationOptions
s@VerifiedAccessLogS3DestinationOptions' {} Maybe Text
a -> VerifiedAccessLogS3DestinationOptions
s {$sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
bucketName = Maybe Text
a} :: VerifiedAccessLogS3DestinationOptions)
verifiedAccessLogS3DestinationOptions_bucketOwner :: Lens.Lens' VerifiedAccessLogS3DestinationOptions (Prelude.Maybe Prelude.Text)
verifiedAccessLogS3DestinationOptions_bucketOwner :: Lens' VerifiedAccessLogS3DestinationOptions (Maybe Text)
verifiedAccessLogS3DestinationOptions_bucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogS3DestinationOptions' {Maybe Text
bucketOwner :: Maybe Text
$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
bucketOwner} -> Maybe Text
bucketOwner) (\s :: VerifiedAccessLogS3DestinationOptions
s@VerifiedAccessLogS3DestinationOptions' {} Maybe Text
a -> VerifiedAccessLogS3DestinationOptions
s {$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
bucketOwner = Maybe Text
a} :: VerifiedAccessLogS3DestinationOptions)
verifiedAccessLogS3DestinationOptions_prefix :: Lens.Lens' VerifiedAccessLogS3DestinationOptions (Prelude.Maybe Prelude.Text)
verifiedAccessLogS3DestinationOptions_prefix :: Lens' VerifiedAccessLogS3DestinationOptions (Maybe Text)
verifiedAccessLogS3DestinationOptions_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogS3DestinationOptions' {Maybe Text
prefix :: Maybe Text
$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: VerifiedAccessLogS3DestinationOptions
s@VerifiedAccessLogS3DestinationOptions' {} Maybe Text
a -> VerifiedAccessLogS3DestinationOptions
s {$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: Maybe Text
prefix = Maybe Text
a} :: VerifiedAccessLogS3DestinationOptions)
verifiedAccessLogS3DestinationOptions_enabled :: Lens.Lens' VerifiedAccessLogS3DestinationOptions Prelude.Bool
verifiedAccessLogS3DestinationOptions_enabled :: Lens' VerifiedAccessLogS3DestinationOptions Bool
verifiedAccessLogS3DestinationOptions_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogS3DestinationOptions' {Bool
enabled :: Bool
$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Bool
enabled} -> Bool
enabled) (\s :: VerifiedAccessLogS3DestinationOptions
s@VerifiedAccessLogS3DestinationOptions' {} Bool
a -> VerifiedAccessLogS3DestinationOptions
s {$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: Bool
enabled = Bool
a} :: VerifiedAccessLogS3DestinationOptions)
instance
Prelude.Hashable
VerifiedAccessLogS3DestinationOptions
where
hashWithSalt :: Int -> VerifiedAccessLogS3DestinationOptions -> Int
hashWithSalt
Int
_salt
VerifiedAccessLogS3DestinationOptions' {Bool
Maybe Text
enabled :: Bool
prefix :: Maybe Text
bucketOwner :: Maybe Text
bucketName :: Maybe Text
$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Bool
$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bucketName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bucketOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
prefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
enabled
instance
Prelude.NFData
VerifiedAccessLogS3DestinationOptions
where
rnf :: VerifiedAccessLogS3DestinationOptions -> ()
rnf VerifiedAccessLogS3DestinationOptions' {Bool
Maybe Text
enabled :: Bool
prefix :: Maybe Text
bucketOwner :: Maybe Text
bucketName :: Maybe Text
$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Bool
$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bucketName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bucketOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
prefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
enabled
instance
Data.ToQuery
VerifiedAccessLogS3DestinationOptions
where
toQuery :: VerifiedAccessLogS3DestinationOptions -> QueryString
toQuery VerifiedAccessLogS3DestinationOptions' {Bool
Maybe Text
enabled :: Bool
prefix :: Maybe Text
bucketOwner :: Maybe Text
bucketName :: Maybe Text
$sel:enabled:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Bool
$sel:prefix:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketOwner:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
$sel:bucketName:VerifiedAccessLogS3DestinationOptions' :: VerifiedAccessLogS3DestinationOptions -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"BucketName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
bucketName,
ByteString
"BucketOwner" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
bucketOwner,
ByteString
"Prefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
prefix,
ByteString
"Enabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Bool
enabled
]