{-# 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.ExportTaskS3LocationRequest 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 ExportTaskS3LocationRequest = ExportTaskS3LocationRequest'
{
ExportTaskS3LocationRequest -> Maybe Text
s3Prefix :: Prelude.Maybe Prelude.Text,
ExportTaskS3LocationRequest -> Text
s3Bucket :: Prelude.Text
}
deriving (ExportTaskS3LocationRequest -> ExportTaskS3LocationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportTaskS3LocationRequest -> ExportTaskS3LocationRequest -> Bool
$c/= :: ExportTaskS3LocationRequest -> ExportTaskS3LocationRequest -> Bool
== :: ExportTaskS3LocationRequest -> ExportTaskS3LocationRequest -> Bool
$c== :: ExportTaskS3LocationRequest -> ExportTaskS3LocationRequest -> Bool
Prelude.Eq, ReadPrec [ExportTaskS3LocationRequest]
ReadPrec ExportTaskS3LocationRequest
Int -> ReadS ExportTaskS3LocationRequest
ReadS [ExportTaskS3LocationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportTaskS3LocationRequest]
$creadListPrec :: ReadPrec [ExportTaskS3LocationRequest]
readPrec :: ReadPrec ExportTaskS3LocationRequest
$creadPrec :: ReadPrec ExportTaskS3LocationRequest
readList :: ReadS [ExportTaskS3LocationRequest]
$creadList :: ReadS [ExportTaskS3LocationRequest]
readsPrec :: Int -> ReadS ExportTaskS3LocationRequest
$creadsPrec :: Int -> ReadS ExportTaskS3LocationRequest
Prelude.Read, Int -> ExportTaskS3LocationRequest -> ShowS
[ExportTaskS3LocationRequest] -> ShowS
ExportTaskS3LocationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportTaskS3LocationRequest] -> ShowS
$cshowList :: [ExportTaskS3LocationRequest] -> ShowS
show :: ExportTaskS3LocationRequest -> String
$cshow :: ExportTaskS3LocationRequest -> String
showsPrec :: Int -> ExportTaskS3LocationRequest -> ShowS
$cshowsPrec :: Int -> ExportTaskS3LocationRequest -> ShowS
Prelude.Show, forall x.
Rep ExportTaskS3LocationRequest x -> ExportTaskS3LocationRequest
forall x.
ExportTaskS3LocationRequest -> Rep ExportTaskS3LocationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportTaskS3LocationRequest x -> ExportTaskS3LocationRequest
$cfrom :: forall x.
ExportTaskS3LocationRequest -> Rep ExportTaskS3LocationRequest x
Prelude.Generic)
newExportTaskS3LocationRequest ::
Prelude.Text ->
ExportTaskS3LocationRequest
newExportTaskS3LocationRequest :: Text -> ExportTaskS3LocationRequest
newExportTaskS3LocationRequest Text
pS3Bucket_ =
ExportTaskS3LocationRequest'
{ $sel:s3Prefix:ExportTaskS3LocationRequest' :: Maybe Text
s3Prefix =
forall a. Maybe a
Prelude.Nothing,
$sel:s3Bucket:ExportTaskS3LocationRequest' :: Text
s3Bucket = Text
pS3Bucket_
}
exportTaskS3LocationRequest_s3Prefix :: Lens.Lens' ExportTaskS3LocationRequest (Prelude.Maybe Prelude.Text)
exportTaskS3LocationRequest_s3Prefix :: Lens' ExportTaskS3LocationRequest (Maybe Text)
exportTaskS3LocationRequest_s3Prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportTaskS3LocationRequest' {Maybe Text
s3Prefix :: Maybe Text
$sel:s3Prefix:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Maybe Text
s3Prefix} -> Maybe Text
s3Prefix) (\s :: ExportTaskS3LocationRequest
s@ExportTaskS3LocationRequest' {} Maybe Text
a -> ExportTaskS3LocationRequest
s {$sel:s3Prefix:ExportTaskS3LocationRequest' :: Maybe Text
s3Prefix = Maybe Text
a} :: ExportTaskS3LocationRequest)
exportTaskS3LocationRequest_s3Bucket :: Lens.Lens' ExportTaskS3LocationRequest Prelude.Text
exportTaskS3LocationRequest_s3Bucket :: Lens' ExportTaskS3LocationRequest Text
exportTaskS3LocationRequest_s3Bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportTaskS3LocationRequest' {Text
s3Bucket :: Text
$sel:s3Bucket:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Text
s3Bucket} -> Text
s3Bucket) (\s :: ExportTaskS3LocationRequest
s@ExportTaskS3LocationRequest' {} Text
a -> ExportTaskS3LocationRequest
s {$sel:s3Bucket:ExportTaskS3LocationRequest' :: Text
s3Bucket = Text
a} :: ExportTaskS3LocationRequest)
instance Prelude.Hashable ExportTaskS3LocationRequest where
hashWithSalt :: Int -> ExportTaskS3LocationRequest -> Int
hashWithSalt Int
_salt ExportTaskS3LocationRequest' {Maybe Text
Text
s3Bucket :: Text
s3Prefix :: Maybe Text
$sel:s3Bucket:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Text
$sel:s3Prefix:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Prefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3Bucket
instance Prelude.NFData ExportTaskS3LocationRequest where
rnf :: ExportTaskS3LocationRequest -> ()
rnf ExportTaskS3LocationRequest' {Maybe Text
Text
s3Bucket :: Text
s3Prefix :: Maybe Text
$sel:s3Bucket:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Text
$sel:s3Prefix:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Prefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
s3Bucket
instance Data.ToQuery ExportTaskS3LocationRequest where
toQuery :: ExportTaskS3LocationRequest -> QueryString
toQuery ExportTaskS3LocationRequest' {Maybe Text
Text
s3Bucket :: Text
s3Prefix :: Maybe Text
$sel:s3Bucket:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Text
$sel:s3Prefix:ExportTaskS3LocationRequest' :: ExportTaskS3LocationRequest -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"S3Prefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
s3Prefix,
ByteString
"S3Bucket" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
s3Bucket
]