{-# 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.Rekognition.CreateStreamProcessor
(
CreateStreamProcessor (..),
newCreateStreamProcessor,
createStreamProcessor_dataSharingPreference,
createStreamProcessor_kmsKeyId,
createStreamProcessor_notificationChannel,
createStreamProcessor_regionsOfInterest,
createStreamProcessor_tags,
createStreamProcessor_input,
createStreamProcessor_output,
createStreamProcessor_name,
createStreamProcessor_settings,
createStreamProcessor_roleArn,
CreateStreamProcessorResponse (..),
newCreateStreamProcessorResponse,
createStreamProcessorResponse_streamProcessorArn,
createStreamProcessorResponse_httpStatus,
)
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
import Amazonka.Rekognition.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateStreamProcessor = CreateStreamProcessor'
{
CreateStreamProcessor -> Maybe StreamProcessorDataSharingPreference
dataSharingPreference :: Prelude.Maybe StreamProcessorDataSharingPreference,
CreateStreamProcessor -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
CreateStreamProcessor -> Maybe StreamProcessorNotificationChannel
notificationChannel :: Prelude.Maybe StreamProcessorNotificationChannel,
CreateStreamProcessor -> Maybe [RegionOfInterest]
regionsOfInterest :: Prelude.Maybe [RegionOfInterest],
CreateStreamProcessor -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateStreamProcessor -> StreamProcessorInput
input :: StreamProcessorInput,
CreateStreamProcessor -> StreamProcessorOutput
output :: StreamProcessorOutput,
CreateStreamProcessor -> Text
name :: Prelude.Text,
CreateStreamProcessor -> StreamProcessorSettings
settings :: StreamProcessorSettings,
CreateStreamProcessor -> Text
roleArn :: Prelude.Text
}
deriving (CreateStreamProcessor -> CreateStreamProcessor -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStreamProcessor -> CreateStreamProcessor -> Bool
$c/= :: CreateStreamProcessor -> CreateStreamProcessor -> Bool
== :: CreateStreamProcessor -> CreateStreamProcessor -> Bool
$c== :: CreateStreamProcessor -> CreateStreamProcessor -> Bool
Prelude.Eq, ReadPrec [CreateStreamProcessor]
ReadPrec CreateStreamProcessor
Int -> ReadS CreateStreamProcessor
ReadS [CreateStreamProcessor]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStreamProcessor]
$creadListPrec :: ReadPrec [CreateStreamProcessor]
readPrec :: ReadPrec CreateStreamProcessor
$creadPrec :: ReadPrec CreateStreamProcessor
readList :: ReadS [CreateStreamProcessor]
$creadList :: ReadS [CreateStreamProcessor]
readsPrec :: Int -> ReadS CreateStreamProcessor
$creadsPrec :: Int -> ReadS CreateStreamProcessor
Prelude.Read, Int -> CreateStreamProcessor -> ShowS
[CreateStreamProcessor] -> ShowS
CreateStreamProcessor -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStreamProcessor] -> ShowS
$cshowList :: [CreateStreamProcessor] -> ShowS
show :: CreateStreamProcessor -> String
$cshow :: CreateStreamProcessor -> String
showsPrec :: Int -> CreateStreamProcessor -> ShowS
$cshowsPrec :: Int -> CreateStreamProcessor -> ShowS
Prelude.Show, forall x. Rep CreateStreamProcessor x -> CreateStreamProcessor
forall x. CreateStreamProcessor -> Rep CreateStreamProcessor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStreamProcessor x -> CreateStreamProcessor
$cfrom :: forall x. CreateStreamProcessor -> Rep CreateStreamProcessor x
Prelude.Generic)
newCreateStreamProcessor ::
StreamProcessorInput ->
StreamProcessorOutput ->
Prelude.Text ->
StreamProcessorSettings ->
Prelude.Text ->
CreateStreamProcessor
newCreateStreamProcessor :: StreamProcessorInput
-> StreamProcessorOutput
-> Text
-> StreamProcessorSettings
-> Text
-> CreateStreamProcessor
newCreateStreamProcessor
StreamProcessorInput
pInput_
StreamProcessorOutput
pOutput_
Text
pName_
StreamProcessorSettings
pSettings_
Text
pRoleArn_ =
CreateStreamProcessor'
{ $sel:dataSharingPreference:CreateStreamProcessor' :: Maybe StreamProcessorDataSharingPreference
dataSharingPreference =
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:CreateStreamProcessor' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:notificationChannel:CreateStreamProcessor' :: Maybe StreamProcessorNotificationChannel
notificationChannel = forall a. Maybe a
Prelude.Nothing,
$sel:regionsOfInterest:CreateStreamProcessor' :: Maybe [RegionOfInterest]
regionsOfInterest = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStreamProcessor' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:input:CreateStreamProcessor' :: StreamProcessorInput
input = StreamProcessorInput
pInput_,
$sel:output:CreateStreamProcessor' :: StreamProcessorOutput
output = StreamProcessorOutput
pOutput_,
$sel:name:CreateStreamProcessor' :: Text
name = Text
pName_,
$sel:settings:CreateStreamProcessor' :: StreamProcessorSettings
settings = StreamProcessorSettings
pSettings_,
$sel:roleArn:CreateStreamProcessor' :: Text
roleArn = Text
pRoleArn_
}
createStreamProcessor_dataSharingPreference :: Lens.Lens' CreateStreamProcessor (Prelude.Maybe StreamProcessorDataSharingPreference)
createStreamProcessor_dataSharingPreference :: Lens'
CreateStreamProcessor (Maybe StreamProcessorDataSharingPreference)
createStreamProcessor_dataSharingPreference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Maybe StreamProcessorDataSharingPreference
dataSharingPreference :: Maybe StreamProcessorDataSharingPreference
$sel:dataSharingPreference:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorDataSharingPreference
dataSharingPreference} -> Maybe StreamProcessorDataSharingPreference
dataSharingPreference) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Maybe StreamProcessorDataSharingPreference
a -> CreateStreamProcessor
s {$sel:dataSharingPreference:CreateStreamProcessor' :: Maybe StreamProcessorDataSharingPreference
dataSharingPreference = Maybe StreamProcessorDataSharingPreference
a} :: CreateStreamProcessor)
createStreamProcessor_kmsKeyId :: Lens.Lens' CreateStreamProcessor (Prelude.Maybe Prelude.Text)
createStreamProcessor_kmsKeyId :: Lens' CreateStreamProcessor (Maybe Text)
createStreamProcessor_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Maybe Text
a -> CreateStreamProcessor
s {$sel:kmsKeyId:CreateStreamProcessor' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateStreamProcessor)
createStreamProcessor_notificationChannel :: Lens.Lens' CreateStreamProcessor (Prelude.Maybe StreamProcessorNotificationChannel)
createStreamProcessor_notificationChannel :: Lens'
CreateStreamProcessor (Maybe StreamProcessorNotificationChannel)
createStreamProcessor_notificationChannel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Maybe StreamProcessorNotificationChannel
notificationChannel :: Maybe StreamProcessorNotificationChannel
$sel:notificationChannel:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorNotificationChannel
notificationChannel} -> Maybe StreamProcessorNotificationChannel
notificationChannel) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Maybe StreamProcessorNotificationChannel
a -> CreateStreamProcessor
s {$sel:notificationChannel:CreateStreamProcessor' :: Maybe StreamProcessorNotificationChannel
notificationChannel = Maybe StreamProcessorNotificationChannel
a} :: CreateStreamProcessor)
createStreamProcessor_regionsOfInterest :: Lens.Lens' CreateStreamProcessor (Prelude.Maybe [RegionOfInterest])
createStreamProcessor_regionsOfInterest :: Lens' CreateStreamProcessor (Maybe [RegionOfInterest])
createStreamProcessor_regionsOfInterest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Maybe [RegionOfInterest]
regionsOfInterest :: Maybe [RegionOfInterest]
$sel:regionsOfInterest:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe [RegionOfInterest]
regionsOfInterest} -> Maybe [RegionOfInterest]
regionsOfInterest) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Maybe [RegionOfInterest]
a -> CreateStreamProcessor
s {$sel:regionsOfInterest:CreateStreamProcessor' :: Maybe [RegionOfInterest]
regionsOfInterest = Maybe [RegionOfInterest]
a} :: CreateStreamProcessor) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStreamProcessor_tags :: Lens.Lens' CreateStreamProcessor (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createStreamProcessor_tags :: Lens' CreateStreamProcessor (Maybe (HashMap Text Text))
createStreamProcessor_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Maybe (HashMap Text Text)
a -> CreateStreamProcessor
s {$sel:tags:CreateStreamProcessor' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateStreamProcessor) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStreamProcessor_input :: Lens.Lens' CreateStreamProcessor StreamProcessorInput
createStreamProcessor_input :: Lens' CreateStreamProcessor StreamProcessorInput
createStreamProcessor_input = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {StreamProcessorInput
input :: StreamProcessorInput
$sel:input:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorInput
input} -> StreamProcessorInput
input) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} StreamProcessorInput
a -> CreateStreamProcessor
s {$sel:input:CreateStreamProcessor' :: StreamProcessorInput
input = StreamProcessorInput
a} :: CreateStreamProcessor)
createStreamProcessor_output :: Lens.Lens' CreateStreamProcessor StreamProcessorOutput
createStreamProcessor_output :: Lens' CreateStreamProcessor StreamProcessorOutput
createStreamProcessor_output = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {StreamProcessorOutput
output :: StreamProcessorOutput
$sel:output:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorOutput
output} -> StreamProcessorOutput
output) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} StreamProcessorOutput
a -> CreateStreamProcessor
s {$sel:output:CreateStreamProcessor' :: StreamProcessorOutput
output = StreamProcessorOutput
a} :: CreateStreamProcessor)
createStreamProcessor_name :: Lens.Lens' CreateStreamProcessor Prelude.Text
createStreamProcessor_name :: Lens' CreateStreamProcessor Text
createStreamProcessor_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Text
name :: Text
$sel:name:CreateStreamProcessor' :: CreateStreamProcessor -> Text
name} -> Text
name) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Text
a -> CreateStreamProcessor
s {$sel:name:CreateStreamProcessor' :: Text
name = Text
a} :: CreateStreamProcessor)
createStreamProcessor_settings :: Lens.Lens' CreateStreamProcessor StreamProcessorSettings
createStreamProcessor_settings :: Lens' CreateStreamProcessor StreamProcessorSettings
createStreamProcessor_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {StreamProcessorSettings
settings :: StreamProcessorSettings
$sel:settings:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorSettings
settings} -> StreamProcessorSettings
settings) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} StreamProcessorSettings
a -> CreateStreamProcessor
s {$sel:settings:CreateStreamProcessor' :: StreamProcessorSettings
settings = StreamProcessorSettings
a} :: CreateStreamProcessor)
createStreamProcessor_roleArn :: Lens.Lens' CreateStreamProcessor Prelude.Text
createStreamProcessor_roleArn :: Lens' CreateStreamProcessor Text
createStreamProcessor_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessor' {Text
roleArn :: Text
$sel:roleArn:CreateStreamProcessor' :: CreateStreamProcessor -> Text
roleArn} -> Text
roleArn) (\s :: CreateStreamProcessor
s@CreateStreamProcessor' {} Text
a -> CreateStreamProcessor
s {$sel:roleArn:CreateStreamProcessor' :: Text
roleArn = Text
a} :: CreateStreamProcessor)
instance Core.AWSRequest CreateStreamProcessor where
type
AWSResponse CreateStreamProcessor =
CreateStreamProcessorResponse
request :: (Service -> Service)
-> CreateStreamProcessor -> Request CreateStreamProcessor
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateStreamProcessor
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateStreamProcessor)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateStreamProcessorResponse
CreateStreamProcessorResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"StreamProcessorArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateStreamProcessor where
hashWithSalt :: Int -> CreateStreamProcessor -> Int
hashWithSalt Int
_salt CreateStreamProcessor' {Maybe [RegionOfInterest]
Maybe Text
Maybe (HashMap Text Text)
Maybe StreamProcessorDataSharingPreference
Maybe StreamProcessorNotificationChannel
Text
StreamProcessorInput
StreamProcessorOutput
StreamProcessorSettings
roleArn :: Text
settings :: StreamProcessorSettings
name :: Text
output :: StreamProcessorOutput
input :: StreamProcessorInput
tags :: Maybe (HashMap Text Text)
regionsOfInterest :: Maybe [RegionOfInterest]
notificationChannel :: Maybe StreamProcessorNotificationChannel
kmsKeyId :: Maybe Text
dataSharingPreference :: Maybe StreamProcessorDataSharingPreference
$sel:roleArn:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:settings:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorSettings
$sel:name:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:output:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorOutput
$sel:input:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorInput
$sel:tags:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe (HashMap Text Text)
$sel:regionsOfInterest:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe [RegionOfInterest]
$sel:notificationChannel:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorNotificationChannel
$sel:kmsKeyId:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe Text
$sel:dataSharingPreference:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorDataSharingPreference
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamProcessorDataSharingPreference
dataSharingPreference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamProcessorNotificationChannel
notificationChannel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RegionOfInterest]
regionsOfInterest
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StreamProcessorInput
input
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StreamProcessorOutput
output
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StreamProcessorSettings
settings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
instance Prelude.NFData CreateStreamProcessor where
rnf :: CreateStreamProcessor -> ()
rnf CreateStreamProcessor' {Maybe [RegionOfInterest]
Maybe Text
Maybe (HashMap Text Text)
Maybe StreamProcessorDataSharingPreference
Maybe StreamProcessorNotificationChannel
Text
StreamProcessorInput
StreamProcessorOutput
StreamProcessorSettings
roleArn :: Text
settings :: StreamProcessorSettings
name :: Text
output :: StreamProcessorOutput
input :: StreamProcessorInput
tags :: Maybe (HashMap Text Text)
regionsOfInterest :: Maybe [RegionOfInterest]
notificationChannel :: Maybe StreamProcessorNotificationChannel
kmsKeyId :: Maybe Text
dataSharingPreference :: Maybe StreamProcessorDataSharingPreference
$sel:roleArn:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:settings:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorSettings
$sel:name:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:output:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorOutput
$sel:input:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorInput
$sel:tags:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe (HashMap Text Text)
$sel:regionsOfInterest:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe [RegionOfInterest]
$sel:notificationChannel:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorNotificationChannel
$sel:kmsKeyId:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe Text
$sel:dataSharingPreference:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorDataSharingPreference
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamProcessorDataSharingPreference
dataSharingPreference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamProcessorNotificationChannel
notificationChannel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RegionOfInterest]
regionsOfInterest
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StreamProcessorInput
input
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StreamProcessorOutput
output
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StreamProcessorSettings
settings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
instance Data.ToHeaders CreateStreamProcessor where
toHeaders :: CreateStreamProcessor -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"RekognitionService.CreateStreamProcessor" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateStreamProcessor where
toJSON :: CreateStreamProcessor -> Value
toJSON CreateStreamProcessor' {Maybe [RegionOfInterest]
Maybe Text
Maybe (HashMap Text Text)
Maybe StreamProcessorDataSharingPreference
Maybe StreamProcessorNotificationChannel
Text
StreamProcessorInput
StreamProcessorOutput
StreamProcessorSettings
roleArn :: Text
settings :: StreamProcessorSettings
name :: Text
output :: StreamProcessorOutput
input :: StreamProcessorInput
tags :: Maybe (HashMap Text Text)
regionsOfInterest :: Maybe [RegionOfInterest]
notificationChannel :: Maybe StreamProcessorNotificationChannel
kmsKeyId :: Maybe Text
dataSharingPreference :: Maybe StreamProcessorDataSharingPreference
$sel:roleArn:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:settings:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorSettings
$sel:name:CreateStreamProcessor' :: CreateStreamProcessor -> Text
$sel:output:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorOutput
$sel:input:CreateStreamProcessor' :: CreateStreamProcessor -> StreamProcessorInput
$sel:tags:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe (HashMap Text Text)
$sel:regionsOfInterest:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe [RegionOfInterest]
$sel:notificationChannel:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorNotificationChannel
$sel:kmsKeyId:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe Text
$sel:dataSharingPreference:CreateStreamProcessor' :: CreateStreamProcessor -> Maybe StreamProcessorDataSharingPreference
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DataSharingPreference" 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 StreamProcessorDataSharingPreference
dataSharingPreference,
(Key
"KmsKeyId" 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
kmsKeyId,
(Key
"NotificationChannel" 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 StreamProcessorNotificationChannel
notificationChannel,
(Key
"RegionsOfInterest" 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 [RegionOfInterest]
regionsOfInterest,
(Key
"Tags" 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 (HashMap Text Text)
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"Input" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= StreamProcessorInput
input),
forall a. a -> Maybe a
Prelude.Just (Key
"Output" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= StreamProcessorOutput
output),
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= StreamProcessorSettings
settings),
forall a. a -> Maybe a
Prelude.Just (Key
"RoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
]
)
instance Data.ToPath CreateStreamProcessor where
toPath :: CreateStreamProcessor -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateStreamProcessor where
toQuery :: CreateStreamProcessor -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateStreamProcessorResponse = CreateStreamProcessorResponse'
{
CreateStreamProcessorResponse -> Maybe Text
streamProcessorArn :: Prelude.Maybe Prelude.Text,
CreateStreamProcessorResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStreamProcessorResponse
-> CreateStreamProcessorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStreamProcessorResponse
-> CreateStreamProcessorResponse -> Bool
$c/= :: CreateStreamProcessorResponse
-> CreateStreamProcessorResponse -> Bool
== :: CreateStreamProcessorResponse
-> CreateStreamProcessorResponse -> Bool
$c== :: CreateStreamProcessorResponse
-> CreateStreamProcessorResponse -> Bool
Prelude.Eq, ReadPrec [CreateStreamProcessorResponse]
ReadPrec CreateStreamProcessorResponse
Int -> ReadS CreateStreamProcessorResponse
ReadS [CreateStreamProcessorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStreamProcessorResponse]
$creadListPrec :: ReadPrec [CreateStreamProcessorResponse]
readPrec :: ReadPrec CreateStreamProcessorResponse
$creadPrec :: ReadPrec CreateStreamProcessorResponse
readList :: ReadS [CreateStreamProcessorResponse]
$creadList :: ReadS [CreateStreamProcessorResponse]
readsPrec :: Int -> ReadS CreateStreamProcessorResponse
$creadsPrec :: Int -> ReadS CreateStreamProcessorResponse
Prelude.Read, Int -> CreateStreamProcessorResponse -> ShowS
[CreateStreamProcessorResponse] -> ShowS
CreateStreamProcessorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStreamProcessorResponse] -> ShowS
$cshowList :: [CreateStreamProcessorResponse] -> ShowS
show :: CreateStreamProcessorResponse -> String
$cshow :: CreateStreamProcessorResponse -> String
showsPrec :: Int -> CreateStreamProcessorResponse -> ShowS
$cshowsPrec :: Int -> CreateStreamProcessorResponse -> ShowS
Prelude.Show, forall x.
Rep CreateStreamProcessorResponse x
-> CreateStreamProcessorResponse
forall x.
CreateStreamProcessorResponse
-> Rep CreateStreamProcessorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateStreamProcessorResponse x
-> CreateStreamProcessorResponse
$cfrom :: forall x.
CreateStreamProcessorResponse
-> Rep CreateStreamProcessorResponse x
Prelude.Generic)
newCreateStreamProcessorResponse ::
Prelude.Int ->
CreateStreamProcessorResponse
newCreateStreamProcessorResponse :: Int -> CreateStreamProcessorResponse
newCreateStreamProcessorResponse Int
pHttpStatus_ =
CreateStreamProcessorResponse'
{ $sel:streamProcessorArn:CreateStreamProcessorResponse' :: Maybe Text
streamProcessorArn =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStreamProcessorResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStreamProcessorResponse_streamProcessorArn :: Lens.Lens' CreateStreamProcessorResponse (Prelude.Maybe Prelude.Text)
createStreamProcessorResponse_streamProcessorArn :: Lens' CreateStreamProcessorResponse (Maybe Text)
createStreamProcessorResponse_streamProcessorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessorResponse' {Maybe Text
streamProcessorArn :: Maybe Text
$sel:streamProcessorArn:CreateStreamProcessorResponse' :: CreateStreamProcessorResponse -> Maybe Text
streamProcessorArn} -> Maybe Text
streamProcessorArn) (\s :: CreateStreamProcessorResponse
s@CreateStreamProcessorResponse' {} Maybe Text
a -> CreateStreamProcessorResponse
s {$sel:streamProcessorArn:CreateStreamProcessorResponse' :: Maybe Text
streamProcessorArn = Maybe Text
a} :: CreateStreamProcessorResponse)
createStreamProcessorResponse_httpStatus :: Lens.Lens' CreateStreamProcessorResponse Prelude.Int
createStreamProcessorResponse_httpStatus :: Lens' CreateStreamProcessorResponse Int
createStreamProcessorResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStreamProcessorResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStreamProcessorResponse' :: CreateStreamProcessorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStreamProcessorResponse
s@CreateStreamProcessorResponse' {} Int
a -> CreateStreamProcessorResponse
s {$sel:httpStatus:CreateStreamProcessorResponse' :: Int
httpStatus = Int
a} :: CreateStreamProcessorResponse)
instance Prelude.NFData CreateStreamProcessorResponse where
rnf :: CreateStreamProcessorResponse -> ()
rnf CreateStreamProcessorResponse' {Int
Maybe Text
httpStatus :: Int
streamProcessorArn :: Maybe Text
$sel:httpStatus:CreateStreamProcessorResponse' :: CreateStreamProcessorResponse -> Int
$sel:streamProcessorArn:CreateStreamProcessorResponse' :: CreateStreamProcessorResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamProcessorArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus