{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.S3.SelectObjectContent
(
SelectObjectContent (..),
newSelectObjectContent,
selectObjectContent_sSECustomerAlgorithm,
selectObjectContent_sSECustomerKey,
selectObjectContent_requestProgress,
selectObjectContent_sSECustomerKeyMD5,
selectObjectContent_scanRange,
selectObjectContent_expectedBucketOwner,
selectObjectContent_bucket,
selectObjectContent_key,
selectObjectContent_expression,
selectObjectContent_expressionType,
selectObjectContent_inputSerialization,
selectObjectContent_outputSerialization,
SelectObjectContentResponse (..),
newSelectObjectContentResponse,
selectObjectContentResponse_payload,
selectObjectContentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types
data SelectObjectContent = SelectObjectContent'
{
SelectObjectContent -> Maybe Text
sSECustomerAlgorithm :: Prelude.Maybe Prelude.Text,
SelectObjectContent -> Maybe (Sensitive Text)
sSECustomerKey :: Prelude.Maybe (Core.Sensitive Prelude.Text),
SelectObjectContent -> Maybe RequestProgress
requestProgress :: Prelude.Maybe RequestProgress,
SelectObjectContent -> Maybe Text
sSECustomerKeyMD5 :: Prelude.Maybe Prelude.Text,
SelectObjectContent -> Maybe ScanRange
scanRange :: Prelude.Maybe ScanRange,
SelectObjectContent -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
SelectObjectContent -> BucketName
bucket :: BucketName,
SelectObjectContent -> ObjectKey
key :: ObjectKey,
SelectObjectContent -> Text
expression :: Prelude.Text,
SelectObjectContent -> ExpressionType
expressionType :: ExpressionType,
SelectObjectContent -> InputSerialization
inputSerialization :: InputSerialization,
SelectObjectContent -> OutputSerialization
outputSerialization :: OutputSerialization
}
deriving (SelectObjectContent -> SelectObjectContent -> Bool
(SelectObjectContent -> SelectObjectContent -> Bool)
-> (SelectObjectContent -> SelectObjectContent -> Bool)
-> Eq SelectObjectContent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectObjectContent -> SelectObjectContent -> Bool
$c/= :: SelectObjectContent -> SelectObjectContent -> Bool
== :: SelectObjectContent -> SelectObjectContent -> Bool
$c== :: SelectObjectContent -> SelectObjectContent -> Bool
Prelude.Eq, Int -> SelectObjectContent -> ShowS
[SelectObjectContent] -> ShowS
SelectObjectContent -> String
(Int -> SelectObjectContent -> ShowS)
-> (SelectObjectContent -> String)
-> ([SelectObjectContent] -> ShowS)
-> Show SelectObjectContent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectObjectContent] -> ShowS
$cshowList :: [SelectObjectContent] -> ShowS
show :: SelectObjectContent -> String
$cshow :: SelectObjectContent -> String
showsPrec :: Int -> SelectObjectContent -> ShowS
$cshowsPrec :: Int -> SelectObjectContent -> ShowS
Prelude.Show, (forall x. SelectObjectContent -> Rep SelectObjectContent x)
-> (forall x. Rep SelectObjectContent x -> SelectObjectContent)
-> Generic SelectObjectContent
forall x. Rep SelectObjectContent x -> SelectObjectContent
forall x. SelectObjectContent -> Rep SelectObjectContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SelectObjectContent x -> SelectObjectContent
$cfrom :: forall x. SelectObjectContent -> Rep SelectObjectContent x
Prelude.Generic)
newSelectObjectContent ::
BucketName ->
ObjectKey ->
Prelude.Text ->
ExpressionType ->
InputSerialization ->
OutputSerialization ->
SelectObjectContent
newSelectObjectContent :: BucketName
-> ObjectKey
-> Text
-> ExpressionType
-> InputSerialization
-> OutputSerialization
-> SelectObjectContent
newSelectObjectContent
BucketName
pBucket_
ObjectKey
pKey_
Text
pExpression_
ExpressionType
pExpressionType_
InputSerialization
pInputSerialization_
OutputSerialization
pOutputSerialization_ =
SelectObjectContent' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RequestProgress
-> Maybe Text
-> Maybe ScanRange
-> Maybe Text
-> BucketName
-> ObjectKey
-> Text
-> ExpressionType
-> InputSerialization
-> OutputSerialization
-> SelectObjectContent
SelectObjectContent'
{ $sel:sSECustomerAlgorithm:SelectObjectContent' :: Maybe Text
sSECustomerAlgorithm =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sSECustomerKey:SelectObjectContent' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:requestProgress:SelectObjectContent' :: Maybe RequestProgress
requestProgress = Maybe RequestProgress
forall a. Maybe a
Prelude.Nothing,
$sel:sSECustomerKeyMD5:SelectObjectContent' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scanRange:SelectObjectContent' :: Maybe ScanRange
scanRange = Maybe ScanRange
forall a. Maybe a
Prelude.Nothing,
$sel:expectedBucketOwner:SelectObjectContent' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:SelectObjectContent' :: BucketName
bucket = BucketName
pBucket_,
$sel:key:SelectObjectContent' :: ObjectKey
key = ObjectKey
pKey_,
$sel:expression:SelectObjectContent' :: Text
expression = Text
pExpression_,
$sel:expressionType:SelectObjectContent' :: ExpressionType
expressionType = ExpressionType
pExpressionType_,
$sel:inputSerialization:SelectObjectContent' :: InputSerialization
inputSerialization = InputSerialization
pInputSerialization_,
$sel:outputSerialization:SelectObjectContent' :: OutputSerialization
outputSerialization = OutputSerialization
pOutputSerialization_
}
selectObjectContent_sSECustomerAlgorithm :: Lens.Lens' SelectObjectContent (Prelude.Maybe Prelude.Text)
selectObjectContent_sSECustomerAlgorithm :: (Maybe Text -> f (Maybe Text))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_sSECustomerAlgorithm = (SelectObjectContent -> Maybe Text)
-> (SelectObjectContent -> Maybe Text -> SelectObjectContent)
-> Lens
SelectObjectContent SelectObjectContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe Text
sSECustomerAlgorithm :: Maybe Text
$sel:sSECustomerAlgorithm:SelectObjectContent' :: SelectObjectContent -> Maybe Text
sSECustomerAlgorithm} -> Maybe Text
sSECustomerAlgorithm) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe Text
a -> SelectObjectContent
s {$sel:sSECustomerAlgorithm:SelectObjectContent' :: Maybe Text
sSECustomerAlgorithm = Maybe Text
a} :: SelectObjectContent)
selectObjectContent_sSECustomerKey :: Lens.Lens' SelectObjectContent (Prelude.Maybe Prelude.Text)
selectObjectContent_sSECustomerKey :: (Maybe Text -> f (Maybe Text))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_sSECustomerKey = (SelectObjectContent -> Maybe (Sensitive Text))
-> (SelectObjectContent
-> Maybe (Sensitive Text) -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe (Sensitive Text)
sSECustomerKey :: Maybe (Sensitive Text)
$sel:sSECustomerKey:SelectObjectContent' :: SelectObjectContent -> Maybe (Sensitive Text)
sSECustomerKey} -> Maybe (Sensitive Text)
sSECustomerKey) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe (Sensitive Text)
a -> SelectObjectContent
s {$sel:sSECustomerKey:SelectObjectContent' :: Maybe (Sensitive Text)
sSECustomerKey = Maybe (Sensitive Text)
a} :: SelectObjectContent) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SelectObjectContent -> f SelectObjectContent)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SelectObjectContent
-> f SelectObjectContent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
selectObjectContent_requestProgress :: Lens.Lens' SelectObjectContent (Prelude.Maybe RequestProgress)
selectObjectContent_requestProgress :: (Maybe RequestProgress -> f (Maybe RequestProgress))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_requestProgress = (SelectObjectContent -> Maybe RequestProgress)
-> (SelectObjectContent
-> Maybe RequestProgress -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
(Maybe RequestProgress)
(Maybe RequestProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe RequestProgress
requestProgress :: Maybe RequestProgress
$sel:requestProgress:SelectObjectContent' :: SelectObjectContent -> Maybe RequestProgress
requestProgress} -> Maybe RequestProgress
requestProgress) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe RequestProgress
a -> SelectObjectContent
s {$sel:requestProgress:SelectObjectContent' :: Maybe RequestProgress
requestProgress = Maybe RequestProgress
a} :: SelectObjectContent)
selectObjectContent_sSECustomerKeyMD5 :: Lens.Lens' SelectObjectContent (Prelude.Maybe Prelude.Text)
selectObjectContent_sSECustomerKeyMD5 :: (Maybe Text -> f (Maybe Text))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_sSECustomerKeyMD5 = (SelectObjectContent -> Maybe Text)
-> (SelectObjectContent -> Maybe Text -> SelectObjectContent)
-> Lens
SelectObjectContent SelectObjectContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe Text
sSECustomerKeyMD5 :: Maybe Text
$sel:sSECustomerKeyMD5:SelectObjectContent' :: SelectObjectContent -> Maybe Text
sSECustomerKeyMD5} -> Maybe Text
sSECustomerKeyMD5) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe Text
a -> SelectObjectContent
s {$sel:sSECustomerKeyMD5:SelectObjectContent' :: Maybe Text
sSECustomerKeyMD5 = Maybe Text
a} :: SelectObjectContent)
selectObjectContent_scanRange :: Lens.Lens' SelectObjectContent (Prelude.Maybe ScanRange)
selectObjectContent_scanRange :: (Maybe ScanRange -> f (Maybe ScanRange))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_scanRange = (SelectObjectContent -> Maybe ScanRange)
-> (SelectObjectContent -> Maybe ScanRange -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
(Maybe ScanRange)
(Maybe ScanRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe ScanRange
scanRange :: Maybe ScanRange
$sel:scanRange:SelectObjectContent' :: SelectObjectContent -> Maybe ScanRange
scanRange} -> Maybe ScanRange
scanRange) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe ScanRange
a -> SelectObjectContent
s {$sel:scanRange:SelectObjectContent' :: Maybe ScanRange
scanRange = Maybe ScanRange
a} :: SelectObjectContent)
selectObjectContent_expectedBucketOwner :: Lens.Lens' SelectObjectContent (Prelude.Maybe Prelude.Text)
selectObjectContent_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_expectedBucketOwner = (SelectObjectContent -> Maybe Text)
-> (SelectObjectContent -> Maybe Text -> SelectObjectContent)
-> Lens
SelectObjectContent SelectObjectContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:SelectObjectContent' :: SelectObjectContent -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: SelectObjectContent
s@SelectObjectContent' {} Maybe Text
a -> SelectObjectContent
s {$sel:expectedBucketOwner:SelectObjectContent' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: SelectObjectContent)
selectObjectContent_bucket :: Lens.Lens' SelectObjectContent BucketName
selectObjectContent_bucket :: (BucketName -> f BucketName)
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_bucket = (SelectObjectContent -> BucketName)
-> (SelectObjectContent -> BucketName -> SelectObjectContent)
-> Lens
SelectObjectContent SelectObjectContent BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {BucketName
bucket :: BucketName
$sel:bucket:SelectObjectContent' :: SelectObjectContent -> BucketName
bucket} -> BucketName
bucket) (\s :: SelectObjectContent
s@SelectObjectContent' {} BucketName
a -> SelectObjectContent
s {$sel:bucket:SelectObjectContent' :: BucketName
bucket = BucketName
a} :: SelectObjectContent)
selectObjectContent_key :: Lens.Lens' SelectObjectContent ObjectKey
selectObjectContent_key :: (ObjectKey -> f ObjectKey)
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_key = (SelectObjectContent -> ObjectKey)
-> (SelectObjectContent -> ObjectKey -> SelectObjectContent)
-> Lens SelectObjectContent SelectObjectContent ObjectKey ObjectKey
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {ObjectKey
key :: ObjectKey
$sel:key:SelectObjectContent' :: SelectObjectContent -> ObjectKey
key} -> ObjectKey
key) (\s :: SelectObjectContent
s@SelectObjectContent' {} ObjectKey
a -> SelectObjectContent
s {$sel:key:SelectObjectContent' :: ObjectKey
key = ObjectKey
a} :: SelectObjectContent)
selectObjectContent_expression :: Lens.Lens' SelectObjectContent Prelude.Text
selectObjectContent_expression :: (Text -> f Text) -> SelectObjectContent -> f SelectObjectContent
selectObjectContent_expression = (SelectObjectContent -> Text)
-> (SelectObjectContent -> Text -> SelectObjectContent)
-> Lens SelectObjectContent SelectObjectContent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {Text
expression :: Text
$sel:expression:SelectObjectContent' :: SelectObjectContent -> Text
expression} -> Text
expression) (\s :: SelectObjectContent
s@SelectObjectContent' {} Text
a -> SelectObjectContent
s {$sel:expression:SelectObjectContent' :: Text
expression = Text
a} :: SelectObjectContent)
selectObjectContent_expressionType :: Lens.Lens' SelectObjectContent ExpressionType
selectObjectContent_expressionType :: (ExpressionType -> f ExpressionType)
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_expressionType = (SelectObjectContent -> ExpressionType)
-> (SelectObjectContent -> ExpressionType -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
ExpressionType
ExpressionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {ExpressionType
expressionType :: ExpressionType
$sel:expressionType:SelectObjectContent' :: SelectObjectContent -> ExpressionType
expressionType} -> ExpressionType
expressionType) (\s :: SelectObjectContent
s@SelectObjectContent' {} ExpressionType
a -> SelectObjectContent
s {$sel:expressionType:SelectObjectContent' :: ExpressionType
expressionType = ExpressionType
a} :: SelectObjectContent)
selectObjectContent_inputSerialization :: Lens.Lens' SelectObjectContent InputSerialization
selectObjectContent_inputSerialization :: (InputSerialization -> f InputSerialization)
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_inputSerialization = (SelectObjectContent -> InputSerialization)
-> (SelectObjectContent
-> InputSerialization -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
InputSerialization
InputSerialization
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {InputSerialization
inputSerialization :: InputSerialization
$sel:inputSerialization:SelectObjectContent' :: SelectObjectContent -> InputSerialization
inputSerialization} -> InputSerialization
inputSerialization) (\s :: SelectObjectContent
s@SelectObjectContent' {} InputSerialization
a -> SelectObjectContent
s {$sel:inputSerialization:SelectObjectContent' :: InputSerialization
inputSerialization = InputSerialization
a} :: SelectObjectContent)
selectObjectContent_outputSerialization :: Lens.Lens' SelectObjectContent OutputSerialization
selectObjectContent_outputSerialization :: (OutputSerialization -> f OutputSerialization)
-> SelectObjectContent -> f SelectObjectContent
selectObjectContent_outputSerialization = (SelectObjectContent -> OutputSerialization)
-> (SelectObjectContent
-> OutputSerialization -> SelectObjectContent)
-> Lens
SelectObjectContent
SelectObjectContent
OutputSerialization
OutputSerialization
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContent' {OutputSerialization
outputSerialization :: OutputSerialization
$sel:outputSerialization:SelectObjectContent' :: SelectObjectContent -> OutputSerialization
outputSerialization} -> OutputSerialization
outputSerialization) (\s :: SelectObjectContent
s@SelectObjectContent' {} OutputSerialization
a -> SelectObjectContent
s {$sel:outputSerialization:SelectObjectContent' :: OutputSerialization
outputSerialization = OutputSerialization
a} :: SelectObjectContent)
instance Core.AWSRequest SelectObjectContent where
type
AWSResponse SelectObjectContent =
SelectObjectContentResponse
request :: SelectObjectContent -> Request SelectObjectContent
request =
Request SelectObjectContent -> Request SelectObjectContent
forall a. Request a -> Request a
Request.s3vhost
(Request SelectObjectContent -> Request SelectObjectContent)
-> (SelectObjectContent -> Request SelectObjectContent)
-> SelectObjectContent
-> Request SelectObjectContent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> SelectObjectContent -> Request SelectObjectContent
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
response :: Logger
-> Service
-> Proxy SelectObjectContent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SelectObjectContent)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SelectObjectContent))
-> Logger
-> Service
-> Proxy SelectObjectContent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SelectObjectContent)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe SelectObjectContentEventStream
-> Int -> SelectObjectContentResponse
SelectObjectContentResponse'
(Maybe SelectObjectContentEventStream
-> Int -> SelectObjectContentResponse)
-> Either String (Maybe SelectObjectContentEventStream)
-> Either String (Int -> SelectObjectContentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe SelectObjectContentEventStream)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
Either String (Int -> SelectObjectContentResponse)
-> Either String Int -> Either String SelectObjectContentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable SelectObjectContent
instance Prelude.NFData SelectObjectContent
instance Core.ToElement SelectObjectContent where
toElement :: SelectObjectContent -> Element
toElement =
Name -> SelectObjectContent -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{http://s3.amazonaws.com/doc/2006-03-01/}SelectObjectContentRequest"
instance Core.ToHeaders SelectObjectContent where
toHeaders :: SelectObjectContent -> ResponseHeaders
toHeaders SelectObjectContent' {Maybe Text
Maybe (Sensitive Text)
Maybe RequestProgress
Maybe ScanRange
Text
ObjectKey
BucketName
ExpressionType
InputSerialization
OutputSerialization
outputSerialization :: OutputSerialization
inputSerialization :: InputSerialization
expressionType :: ExpressionType
expression :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
scanRange :: Maybe ScanRange
sSECustomerKeyMD5 :: Maybe Text
requestProgress :: Maybe RequestProgress
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
$sel:outputSerialization:SelectObjectContent' :: SelectObjectContent -> OutputSerialization
$sel:inputSerialization:SelectObjectContent' :: SelectObjectContent -> InputSerialization
$sel:expressionType:SelectObjectContent' :: SelectObjectContent -> ExpressionType
$sel:expression:SelectObjectContent' :: SelectObjectContent -> Text
$sel:key:SelectObjectContent' :: SelectObjectContent -> ObjectKey
$sel:bucket:SelectObjectContent' :: SelectObjectContent -> BucketName
$sel:expectedBucketOwner:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:scanRange:SelectObjectContent' :: SelectObjectContent -> Maybe ScanRange
$sel:sSECustomerKeyMD5:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:requestProgress:SelectObjectContent' :: SelectObjectContent -> Maybe RequestProgress
$sel:sSECustomerKey:SelectObjectContent' :: SelectObjectContent -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:SelectObjectContent' :: SelectObjectContent -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-server-side-encryption-customer-algorithm"
HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerAlgorithm,
HeaderName
"x-amz-server-side-encryption-customer-key"
HeaderName -> Maybe (Sensitive Text) -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe (Sensitive Text)
sSECustomerKey,
HeaderName
"x-amz-server-side-encryption-customer-key-MD5"
HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
sSECustomerKeyMD5,
HeaderName
"x-amz-expected-bucket-owner"
HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
]
instance Core.ToPath SelectObjectContent where
toPath :: SelectObjectContent -> ByteString
toPath SelectObjectContent' {Maybe Text
Maybe (Sensitive Text)
Maybe RequestProgress
Maybe ScanRange
Text
ObjectKey
BucketName
ExpressionType
InputSerialization
OutputSerialization
outputSerialization :: OutputSerialization
inputSerialization :: InputSerialization
expressionType :: ExpressionType
expression :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
scanRange :: Maybe ScanRange
sSECustomerKeyMD5 :: Maybe Text
requestProgress :: Maybe RequestProgress
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
$sel:outputSerialization:SelectObjectContent' :: SelectObjectContent -> OutputSerialization
$sel:inputSerialization:SelectObjectContent' :: SelectObjectContent -> InputSerialization
$sel:expressionType:SelectObjectContent' :: SelectObjectContent -> ExpressionType
$sel:expression:SelectObjectContent' :: SelectObjectContent -> Text
$sel:key:SelectObjectContent' :: SelectObjectContent -> ObjectKey
$sel:bucket:SelectObjectContent' :: SelectObjectContent -> BucketName
$sel:expectedBucketOwner:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:scanRange:SelectObjectContent' :: SelectObjectContent -> Maybe ScanRange
$sel:sSECustomerKeyMD5:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:requestProgress:SelectObjectContent' :: SelectObjectContent -> Maybe RequestProgress
$sel:sSECustomerKey:SelectObjectContent' :: SelectObjectContent -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:SelectObjectContent' :: SelectObjectContent -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket, ByteString
"/", ObjectKey -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ObjectKey
key]
instance Core.ToQuery SelectObjectContent where
toQuery :: SelectObjectContent -> QueryString
toQuery =
QueryString -> SelectObjectContent -> QueryString
forall a b. a -> b -> a
Prelude.const
([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"select&select-type=2"])
instance Core.ToXML SelectObjectContent where
toXML :: SelectObjectContent -> XML
toXML SelectObjectContent' {Maybe Text
Maybe (Sensitive Text)
Maybe RequestProgress
Maybe ScanRange
Text
ObjectKey
BucketName
ExpressionType
InputSerialization
OutputSerialization
outputSerialization :: OutputSerialization
inputSerialization :: InputSerialization
expressionType :: ExpressionType
expression :: Text
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
scanRange :: Maybe ScanRange
sSECustomerKeyMD5 :: Maybe Text
requestProgress :: Maybe RequestProgress
sSECustomerKey :: Maybe (Sensitive Text)
sSECustomerAlgorithm :: Maybe Text
$sel:outputSerialization:SelectObjectContent' :: SelectObjectContent -> OutputSerialization
$sel:inputSerialization:SelectObjectContent' :: SelectObjectContent -> InputSerialization
$sel:expressionType:SelectObjectContent' :: SelectObjectContent -> ExpressionType
$sel:expression:SelectObjectContent' :: SelectObjectContent -> Text
$sel:key:SelectObjectContent' :: SelectObjectContent -> ObjectKey
$sel:bucket:SelectObjectContent' :: SelectObjectContent -> BucketName
$sel:expectedBucketOwner:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:scanRange:SelectObjectContent' :: SelectObjectContent -> Maybe ScanRange
$sel:sSECustomerKeyMD5:SelectObjectContent' :: SelectObjectContent -> Maybe Text
$sel:requestProgress:SelectObjectContent' :: SelectObjectContent -> Maybe RequestProgress
$sel:sSECustomerKey:SelectObjectContent' :: SelectObjectContent -> Maybe (Sensitive Text)
$sel:sSECustomerAlgorithm:SelectObjectContent' :: SelectObjectContent -> Maybe Text
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"RequestProgress" Name -> Maybe RequestProgress -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe RequestProgress
requestProgress,
Name
"ScanRange" Name -> Maybe ScanRange -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe ScanRange
scanRange,
Name
"Expression" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
expression,
Name
"ExpressionType" Name -> ExpressionType -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= ExpressionType
expressionType,
Name
"InputSerialization" Name -> InputSerialization -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= InputSerialization
inputSerialization,
Name
"OutputSerialization" Name -> OutputSerialization -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= OutputSerialization
outputSerialization
]
data SelectObjectContentResponse = SelectObjectContentResponse'
{
SelectObjectContentResponse -> Maybe SelectObjectContentEventStream
payload :: Prelude.Maybe SelectObjectContentEventStream,
SelectObjectContentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SelectObjectContentResponse -> SelectObjectContentResponse -> Bool
(SelectObjectContentResponse
-> SelectObjectContentResponse -> Bool)
-> (SelectObjectContentResponse
-> SelectObjectContentResponse -> Bool)
-> Eq SelectObjectContentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectObjectContentResponse -> SelectObjectContentResponse -> Bool
$c/= :: SelectObjectContentResponse -> SelectObjectContentResponse -> Bool
== :: SelectObjectContentResponse -> SelectObjectContentResponse -> Bool
$c== :: SelectObjectContentResponse -> SelectObjectContentResponse -> Bool
Prelude.Eq, ReadPrec [SelectObjectContentResponse]
ReadPrec SelectObjectContentResponse
Int -> ReadS SelectObjectContentResponse
ReadS [SelectObjectContentResponse]
(Int -> ReadS SelectObjectContentResponse)
-> ReadS [SelectObjectContentResponse]
-> ReadPrec SelectObjectContentResponse
-> ReadPrec [SelectObjectContentResponse]
-> Read SelectObjectContentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SelectObjectContentResponse]
$creadListPrec :: ReadPrec [SelectObjectContentResponse]
readPrec :: ReadPrec SelectObjectContentResponse
$creadPrec :: ReadPrec SelectObjectContentResponse
readList :: ReadS [SelectObjectContentResponse]
$creadList :: ReadS [SelectObjectContentResponse]
readsPrec :: Int -> ReadS SelectObjectContentResponse
$creadsPrec :: Int -> ReadS SelectObjectContentResponse
Prelude.Read, Int -> SelectObjectContentResponse -> ShowS
[SelectObjectContentResponse] -> ShowS
SelectObjectContentResponse -> String
(Int -> SelectObjectContentResponse -> ShowS)
-> (SelectObjectContentResponse -> String)
-> ([SelectObjectContentResponse] -> ShowS)
-> Show SelectObjectContentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectObjectContentResponse] -> ShowS
$cshowList :: [SelectObjectContentResponse] -> ShowS
show :: SelectObjectContentResponse -> String
$cshow :: SelectObjectContentResponse -> String
showsPrec :: Int -> SelectObjectContentResponse -> ShowS
$cshowsPrec :: Int -> SelectObjectContentResponse -> ShowS
Prelude.Show, (forall x.
SelectObjectContentResponse -> Rep SelectObjectContentResponse x)
-> (forall x.
Rep SelectObjectContentResponse x -> SelectObjectContentResponse)
-> Generic SelectObjectContentResponse
forall x.
Rep SelectObjectContentResponse x -> SelectObjectContentResponse
forall x.
SelectObjectContentResponse -> Rep SelectObjectContentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SelectObjectContentResponse x -> SelectObjectContentResponse
$cfrom :: forall x.
SelectObjectContentResponse -> Rep SelectObjectContentResponse x
Prelude.Generic)
newSelectObjectContentResponse ::
Prelude.Int ->
SelectObjectContentResponse
newSelectObjectContentResponse :: Int -> SelectObjectContentResponse
newSelectObjectContentResponse Int
pHttpStatus_ =
SelectObjectContentResponse' :: Maybe SelectObjectContentEventStream
-> Int -> SelectObjectContentResponse
SelectObjectContentResponse'
{ $sel:payload:SelectObjectContentResponse' :: Maybe SelectObjectContentEventStream
payload =
Maybe SelectObjectContentEventStream
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SelectObjectContentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
selectObjectContentResponse_payload :: Lens.Lens' SelectObjectContentResponse (Prelude.Maybe SelectObjectContentEventStream)
selectObjectContentResponse_payload :: (Maybe SelectObjectContentEventStream
-> f (Maybe SelectObjectContentEventStream))
-> SelectObjectContentResponse -> f SelectObjectContentResponse
selectObjectContentResponse_payload = (SelectObjectContentResponse
-> Maybe SelectObjectContentEventStream)
-> (SelectObjectContentResponse
-> Maybe SelectObjectContentEventStream
-> SelectObjectContentResponse)
-> Lens
SelectObjectContentResponse
SelectObjectContentResponse
(Maybe SelectObjectContentEventStream)
(Maybe SelectObjectContentEventStream)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContentResponse' {Maybe SelectObjectContentEventStream
payload :: Maybe SelectObjectContentEventStream
$sel:payload:SelectObjectContentResponse' :: SelectObjectContentResponse -> Maybe SelectObjectContentEventStream
payload} -> Maybe SelectObjectContentEventStream
payload) (\s :: SelectObjectContentResponse
s@SelectObjectContentResponse' {} Maybe SelectObjectContentEventStream
a -> SelectObjectContentResponse
s {$sel:payload:SelectObjectContentResponse' :: Maybe SelectObjectContentEventStream
payload = Maybe SelectObjectContentEventStream
a} :: SelectObjectContentResponse)
selectObjectContentResponse_httpStatus :: Lens.Lens' SelectObjectContentResponse Prelude.Int
selectObjectContentResponse_httpStatus :: (Int -> f Int)
-> SelectObjectContentResponse -> f SelectObjectContentResponse
selectObjectContentResponse_httpStatus = (SelectObjectContentResponse -> Int)
-> (SelectObjectContentResponse
-> Int -> SelectObjectContentResponse)
-> Lens
SelectObjectContentResponse SelectObjectContentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectObjectContentResponse' {Int
httpStatus :: Int
$sel:httpStatus:SelectObjectContentResponse' :: SelectObjectContentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SelectObjectContentResponse
s@SelectObjectContentResponse' {} Int
a -> SelectObjectContentResponse
s {$sel:httpStatus:SelectObjectContentResponse' :: Int
httpStatus = Int
a} :: SelectObjectContentResponse)
instance Prelude.NFData SelectObjectContentResponse