{-# 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.LookoutEquipment.CreateInferenceScheduler
(
CreateInferenceScheduler (..),
newCreateInferenceScheduler,
createInferenceScheduler_dataDelayOffsetInMinutes,
createInferenceScheduler_tags,
createInferenceScheduler_serverSideKmsKeyId,
createInferenceScheduler_modelName,
createInferenceScheduler_inferenceSchedulerName,
createInferenceScheduler_dataUploadFrequency,
createInferenceScheduler_dataInputConfiguration,
createInferenceScheduler_dataOutputConfiguration,
createInferenceScheduler_roleArn,
createInferenceScheduler_clientToken,
CreateInferenceSchedulerResponse (..),
newCreateInferenceSchedulerResponse,
createInferenceSchedulerResponse_status,
createInferenceSchedulerResponse_inferenceSchedulerArn,
createInferenceSchedulerResponse_inferenceSchedulerName,
createInferenceSchedulerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutEquipment.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateInferenceScheduler = CreateInferenceScheduler'
{
CreateInferenceScheduler -> Maybe Natural
dataDelayOffsetInMinutes :: Prelude.Maybe Prelude.Natural,
CreateInferenceScheduler -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateInferenceScheduler -> Maybe Text
serverSideKmsKeyId :: Prelude.Maybe Prelude.Text,
CreateInferenceScheduler -> Text
modelName :: Prelude.Text,
CreateInferenceScheduler -> Text
inferenceSchedulerName :: Prelude.Text,
CreateInferenceScheduler -> DataUploadFrequency
dataUploadFrequency :: DataUploadFrequency,
CreateInferenceScheduler -> InferenceInputConfiguration
dataInputConfiguration :: InferenceInputConfiguration,
CreateInferenceScheduler -> InferenceOutputConfiguration
dataOutputConfiguration :: InferenceOutputConfiguration,
CreateInferenceScheduler -> Text
roleArn :: Prelude.Text,
CreateInferenceScheduler -> Text
clientToken :: Prelude.Text
}
deriving (CreateInferenceScheduler -> CreateInferenceScheduler -> Bool
(CreateInferenceScheduler -> CreateInferenceScheduler -> Bool)
-> (CreateInferenceScheduler -> CreateInferenceScheduler -> Bool)
-> Eq CreateInferenceScheduler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInferenceScheduler -> CreateInferenceScheduler -> Bool
$c/= :: CreateInferenceScheduler -> CreateInferenceScheduler -> Bool
== :: CreateInferenceScheduler -> CreateInferenceScheduler -> Bool
$c== :: CreateInferenceScheduler -> CreateInferenceScheduler -> Bool
Prelude.Eq, ReadPrec [CreateInferenceScheduler]
ReadPrec CreateInferenceScheduler
Int -> ReadS CreateInferenceScheduler
ReadS [CreateInferenceScheduler]
(Int -> ReadS CreateInferenceScheduler)
-> ReadS [CreateInferenceScheduler]
-> ReadPrec CreateInferenceScheduler
-> ReadPrec [CreateInferenceScheduler]
-> Read CreateInferenceScheduler
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInferenceScheduler]
$creadListPrec :: ReadPrec [CreateInferenceScheduler]
readPrec :: ReadPrec CreateInferenceScheduler
$creadPrec :: ReadPrec CreateInferenceScheduler
readList :: ReadS [CreateInferenceScheduler]
$creadList :: ReadS [CreateInferenceScheduler]
readsPrec :: Int -> ReadS CreateInferenceScheduler
$creadsPrec :: Int -> ReadS CreateInferenceScheduler
Prelude.Read, Int -> CreateInferenceScheduler -> ShowS
[CreateInferenceScheduler] -> ShowS
CreateInferenceScheduler -> String
(Int -> CreateInferenceScheduler -> ShowS)
-> (CreateInferenceScheduler -> String)
-> ([CreateInferenceScheduler] -> ShowS)
-> Show CreateInferenceScheduler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInferenceScheduler] -> ShowS
$cshowList :: [CreateInferenceScheduler] -> ShowS
show :: CreateInferenceScheduler -> String
$cshow :: CreateInferenceScheduler -> String
showsPrec :: Int -> CreateInferenceScheduler -> ShowS
$cshowsPrec :: Int -> CreateInferenceScheduler -> ShowS
Prelude.Show, (forall x.
CreateInferenceScheduler -> Rep CreateInferenceScheduler x)
-> (forall x.
Rep CreateInferenceScheduler x -> CreateInferenceScheduler)
-> Generic CreateInferenceScheduler
forall x.
Rep CreateInferenceScheduler x -> CreateInferenceScheduler
forall x.
CreateInferenceScheduler -> Rep CreateInferenceScheduler x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateInferenceScheduler x -> CreateInferenceScheduler
$cfrom :: forall x.
CreateInferenceScheduler -> Rep CreateInferenceScheduler x
Prelude.Generic)
newCreateInferenceScheduler ::
Prelude.Text ->
Prelude.Text ->
DataUploadFrequency ->
InferenceInputConfiguration ->
InferenceOutputConfiguration ->
Prelude.Text ->
Prelude.Text ->
CreateInferenceScheduler
newCreateInferenceScheduler :: Text
-> Text
-> DataUploadFrequency
-> InferenceInputConfiguration
-> InferenceOutputConfiguration
-> Text
-> Text
-> CreateInferenceScheduler
newCreateInferenceScheduler
Text
pModelName_
Text
pInferenceSchedulerName_
DataUploadFrequency
pDataUploadFrequency_
InferenceInputConfiguration
pDataInputConfiguration_
InferenceOutputConfiguration
pDataOutputConfiguration_
Text
pRoleArn_
Text
pClientToken_ =
CreateInferenceScheduler' :: Maybe Natural
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> DataUploadFrequency
-> InferenceInputConfiguration
-> InferenceOutputConfiguration
-> Text
-> Text
-> CreateInferenceScheduler
CreateInferenceScheduler'
{ $sel:dataDelayOffsetInMinutes:CreateInferenceScheduler' :: Maybe Natural
dataDelayOffsetInMinutes =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateInferenceScheduler' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:serverSideKmsKeyId:CreateInferenceScheduler' :: Maybe Text
serverSideKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelName:CreateInferenceScheduler' :: Text
modelName = Text
pModelName_,
$sel:inferenceSchedulerName:CreateInferenceScheduler' :: Text
inferenceSchedulerName = Text
pInferenceSchedulerName_,
$sel:dataUploadFrequency:CreateInferenceScheduler' :: DataUploadFrequency
dataUploadFrequency = DataUploadFrequency
pDataUploadFrequency_,
$sel:dataInputConfiguration:CreateInferenceScheduler' :: InferenceInputConfiguration
dataInputConfiguration = InferenceInputConfiguration
pDataInputConfiguration_,
$sel:dataOutputConfiguration:CreateInferenceScheduler' :: InferenceOutputConfiguration
dataOutputConfiguration =
InferenceOutputConfiguration
pDataOutputConfiguration_,
$sel:roleArn:CreateInferenceScheduler' :: Text
roleArn = Text
pRoleArn_,
$sel:clientToken:CreateInferenceScheduler' :: Text
clientToken = Text
pClientToken_
}
createInferenceScheduler_dataDelayOffsetInMinutes :: Lens.Lens' CreateInferenceScheduler (Prelude.Maybe Prelude.Natural)
createInferenceScheduler_dataDelayOffsetInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_dataDelayOffsetInMinutes = (CreateInferenceScheduler -> Maybe Natural)
-> (CreateInferenceScheduler
-> Maybe Natural -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Maybe Natural
dataDelayOffsetInMinutes :: Maybe Natural
$sel:dataDelayOffsetInMinutes:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe Natural
dataDelayOffsetInMinutes} -> Maybe Natural
dataDelayOffsetInMinutes) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Maybe Natural
a -> CreateInferenceScheduler
s {$sel:dataDelayOffsetInMinutes:CreateInferenceScheduler' :: Maybe Natural
dataDelayOffsetInMinutes = Maybe Natural
a} :: CreateInferenceScheduler)
createInferenceScheduler_tags :: Lens.Lens' CreateInferenceScheduler (Prelude.Maybe [Tag])
createInferenceScheduler_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_tags = (CreateInferenceScheduler -> Maybe [Tag])
-> (CreateInferenceScheduler
-> Maybe [Tag] -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Maybe [Tag]
a -> CreateInferenceScheduler
s {$sel:tags:CreateInferenceScheduler' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateInferenceScheduler) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInferenceScheduler -> f CreateInferenceScheduler)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInferenceScheduler
-> f CreateInferenceScheduler
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInferenceScheduler_serverSideKmsKeyId :: Lens.Lens' CreateInferenceScheduler (Prelude.Maybe Prelude.Text)
createInferenceScheduler_serverSideKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_serverSideKmsKeyId = (CreateInferenceScheduler -> Maybe Text)
-> (CreateInferenceScheduler
-> Maybe Text -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Maybe Text
serverSideKmsKeyId :: Maybe Text
$sel:serverSideKmsKeyId:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe Text
serverSideKmsKeyId} -> Maybe Text
serverSideKmsKeyId) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Maybe Text
a -> CreateInferenceScheduler
s {$sel:serverSideKmsKeyId:CreateInferenceScheduler' :: Maybe Text
serverSideKmsKeyId = Maybe Text
a} :: CreateInferenceScheduler)
createInferenceScheduler_modelName :: Lens.Lens' CreateInferenceScheduler Prelude.Text
createInferenceScheduler_modelName :: (Text -> f Text)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_modelName = (CreateInferenceScheduler -> Text)
-> (CreateInferenceScheduler -> Text -> CreateInferenceScheduler)
-> Lens CreateInferenceScheduler CreateInferenceScheduler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Text
modelName :: Text
$sel:modelName:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
modelName} -> Text
modelName) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Text
a -> CreateInferenceScheduler
s {$sel:modelName:CreateInferenceScheduler' :: Text
modelName = Text
a} :: CreateInferenceScheduler)
createInferenceScheduler_inferenceSchedulerName :: Lens.Lens' CreateInferenceScheduler Prelude.Text
createInferenceScheduler_inferenceSchedulerName :: (Text -> f Text)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_inferenceSchedulerName = (CreateInferenceScheduler -> Text)
-> (CreateInferenceScheduler -> Text -> CreateInferenceScheduler)
-> Lens CreateInferenceScheduler CreateInferenceScheduler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Text
inferenceSchedulerName :: Text
$sel:inferenceSchedulerName:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
inferenceSchedulerName} -> Text
inferenceSchedulerName) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Text
a -> CreateInferenceScheduler
s {$sel:inferenceSchedulerName:CreateInferenceScheduler' :: Text
inferenceSchedulerName = Text
a} :: CreateInferenceScheduler)
createInferenceScheduler_dataUploadFrequency :: Lens.Lens' CreateInferenceScheduler DataUploadFrequency
createInferenceScheduler_dataUploadFrequency :: (DataUploadFrequency -> f DataUploadFrequency)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_dataUploadFrequency = (CreateInferenceScheduler -> DataUploadFrequency)
-> (CreateInferenceScheduler
-> DataUploadFrequency -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
DataUploadFrequency
DataUploadFrequency
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {DataUploadFrequency
dataUploadFrequency :: DataUploadFrequency
$sel:dataUploadFrequency:CreateInferenceScheduler' :: CreateInferenceScheduler -> DataUploadFrequency
dataUploadFrequency} -> DataUploadFrequency
dataUploadFrequency) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} DataUploadFrequency
a -> CreateInferenceScheduler
s {$sel:dataUploadFrequency:CreateInferenceScheduler' :: DataUploadFrequency
dataUploadFrequency = DataUploadFrequency
a} :: CreateInferenceScheduler)
createInferenceScheduler_dataInputConfiguration :: Lens.Lens' CreateInferenceScheduler InferenceInputConfiguration
createInferenceScheduler_dataInputConfiguration :: (InferenceInputConfiguration -> f InferenceInputConfiguration)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_dataInputConfiguration = (CreateInferenceScheduler -> InferenceInputConfiguration)
-> (CreateInferenceScheduler
-> InferenceInputConfiguration -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
InferenceInputConfiguration
InferenceInputConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {InferenceInputConfiguration
dataInputConfiguration :: InferenceInputConfiguration
$sel:dataInputConfiguration:CreateInferenceScheduler' :: CreateInferenceScheduler -> InferenceInputConfiguration
dataInputConfiguration} -> InferenceInputConfiguration
dataInputConfiguration) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} InferenceInputConfiguration
a -> CreateInferenceScheduler
s {$sel:dataInputConfiguration:CreateInferenceScheduler' :: InferenceInputConfiguration
dataInputConfiguration = InferenceInputConfiguration
a} :: CreateInferenceScheduler)
createInferenceScheduler_dataOutputConfiguration :: Lens.Lens' CreateInferenceScheduler InferenceOutputConfiguration
createInferenceScheduler_dataOutputConfiguration :: (InferenceOutputConfiguration -> f InferenceOutputConfiguration)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_dataOutputConfiguration = (CreateInferenceScheduler -> InferenceOutputConfiguration)
-> (CreateInferenceScheduler
-> InferenceOutputConfiguration -> CreateInferenceScheduler)
-> Lens
CreateInferenceScheduler
CreateInferenceScheduler
InferenceOutputConfiguration
InferenceOutputConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {InferenceOutputConfiguration
dataOutputConfiguration :: InferenceOutputConfiguration
$sel:dataOutputConfiguration:CreateInferenceScheduler' :: CreateInferenceScheduler -> InferenceOutputConfiguration
dataOutputConfiguration} -> InferenceOutputConfiguration
dataOutputConfiguration) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} InferenceOutputConfiguration
a -> CreateInferenceScheduler
s {$sel:dataOutputConfiguration:CreateInferenceScheduler' :: InferenceOutputConfiguration
dataOutputConfiguration = InferenceOutputConfiguration
a} :: CreateInferenceScheduler)
createInferenceScheduler_roleArn :: Lens.Lens' CreateInferenceScheduler Prelude.Text
createInferenceScheduler_roleArn :: (Text -> f Text)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_roleArn = (CreateInferenceScheduler -> Text)
-> (CreateInferenceScheduler -> Text -> CreateInferenceScheduler)
-> Lens CreateInferenceScheduler CreateInferenceScheduler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Text
roleArn :: Text
$sel:roleArn:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
roleArn} -> Text
roleArn) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Text
a -> CreateInferenceScheduler
s {$sel:roleArn:CreateInferenceScheduler' :: Text
roleArn = Text
a} :: CreateInferenceScheduler)
createInferenceScheduler_clientToken :: Lens.Lens' CreateInferenceScheduler Prelude.Text
createInferenceScheduler_clientToken :: (Text -> f Text)
-> CreateInferenceScheduler -> f CreateInferenceScheduler
createInferenceScheduler_clientToken = (CreateInferenceScheduler -> Text)
-> (CreateInferenceScheduler -> Text -> CreateInferenceScheduler)
-> Lens CreateInferenceScheduler CreateInferenceScheduler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceScheduler' {Text
clientToken :: Text
$sel:clientToken:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
clientToken} -> Text
clientToken) (\s :: CreateInferenceScheduler
s@CreateInferenceScheduler' {} Text
a -> CreateInferenceScheduler
s {$sel:clientToken:CreateInferenceScheduler' :: Text
clientToken = Text
a} :: CreateInferenceScheduler)
instance Core.AWSRequest CreateInferenceScheduler where
type
AWSResponse CreateInferenceScheduler =
CreateInferenceSchedulerResponse
request :: CreateInferenceScheduler -> Request CreateInferenceScheduler
request = Service
-> CreateInferenceScheduler -> Request CreateInferenceScheduler
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateInferenceScheduler
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateInferenceScheduler)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateInferenceScheduler))
-> Logger
-> Service
-> Proxy CreateInferenceScheduler
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateInferenceScheduler)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe InferenceSchedulerStatus
-> Maybe Text
-> Maybe Text
-> Int
-> CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse'
(Maybe InferenceSchedulerStatus
-> Maybe Text
-> Maybe Text
-> Int
-> CreateInferenceSchedulerResponse)
-> Either String (Maybe InferenceSchedulerStatus)
-> Either
String
(Maybe Text
-> Maybe Text -> Int -> CreateInferenceSchedulerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe InferenceSchedulerStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either
String
(Maybe Text
-> Maybe Text -> Int -> CreateInferenceSchedulerResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> CreateInferenceSchedulerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InferenceSchedulerArn")
Either
String (Maybe Text -> Int -> CreateInferenceSchedulerResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateInferenceSchedulerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InferenceSchedulerName")
Either String (Int -> CreateInferenceSchedulerResponse)
-> Either String Int
-> Either String CreateInferenceSchedulerResponse
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 CreateInferenceScheduler
instance Prelude.NFData CreateInferenceScheduler
instance Core.ToHeaders CreateInferenceScheduler where
toHeaders :: CreateInferenceScheduler -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateInferenceScheduler -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSLookoutEquipmentFrontendService.CreateInferenceScheduler" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateInferenceScheduler where
toJSON :: CreateInferenceScheduler -> Value
toJSON CreateInferenceScheduler' {Maybe Natural
Maybe [Tag]
Maybe Text
Text
DataUploadFrequency
InferenceInputConfiguration
InferenceOutputConfiguration
clientToken :: Text
roleArn :: Text
dataOutputConfiguration :: InferenceOutputConfiguration
dataInputConfiguration :: InferenceInputConfiguration
dataUploadFrequency :: DataUploadFrequency
inferenceSchedulerName :: Text
modelName :: Text
serverSideKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
dataDelayOffsetInMinutes :: Maybe Natural
$sel:clientToken:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
$sel:roleArn:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
$sel:dataOutputConfiguration:CreateInferenceScheduler' :: CreateInferenceScheduler -> InferenceOutputConfiguration
$sel:dataInputConfiguration:CreateInferenceScheduler' :: CreateInferenceScheduler -> InferenceInputConfiguration
$sel:dataUploadFrequency:CreateInferenceScheduler' :: CreateInferenceScheduler -> DataUploadFrequency
$sel:inferenceSchedulerName:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
$sel:modelName:CreateInferenceScheduler' :: CreateInferenceScheduler -> Text
$sel:serverSideKmsKeyId:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe Text
$sel:tags:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe [Tag]
$sel:dataDelayOffsetInMinutes:CreateInferenceScheduler' :: CreateInferenceScheduler -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DataDelayOffsetInMinutes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
dataDelayOffsetInMinutes,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"ServerSideKmsKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverSideKmsKeyId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"InferenceSchedulerName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
inferenceSchedulerName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DataUploadFrequency" Text -> DataUploadFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DataUploadFrequency
dataUploadFrequency),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DataInputConfiguration"
Text -> InferenceInputConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InferenceInputConfiguration
dataInputConfiguration
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DataOutputConfiguration"
Text -> InferenceOutputConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InferenceOutputConfiguration
dataOutputConfiguration
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
]
)
instance Core.ToPath CreateInferenceScheduler where
toPath :: CreateInferenceScheduler -> ByteString
toPath = ByteString -> CreateInferenceScheduler -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateInferenceScheduler where
toQuery :: CreateInferenceScheduler -> QueryString
toQuery = QueryString -> CreateInferenceScheduler -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateInferenceSchedulerResponse = CreateInferenceSchedulerResponse'
{
CreateInferenceSchedulerResponse -> Maybe InferenceSchedulerStatus
status :: Prelude.Maybe InferenceSchedulerStatus,
CreateInferenceSchedulerResponse -> Maybe Text
inferenceSchedulerArn :: Prelude.Maybe Prelude.Text,
CreateInferenceSchedulerResponse -> Maybe Text
inferenceSchedulerName :: Prelude.Maybe Prelude.Text,
CreateInferenceSchedulerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool
(CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool)
-> (CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool)
-> Eq CreateInferenceSchedulerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool
$c/= :: CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool
== :: CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool
$c== :: CreateInferenceSchedulerResponse
-> CreateInferenceSchedulerResponse -> Bool
Prelude.Eq, ReadPrec [CreateInferenceSchedulerResponse]
ReadPrec CreateInferenceSchedulerResponse
Int -> ReadS CreateInferenceSchedulerResponse
ReadS [CreateInferenceSchedulerResponse]
(Int -> ReadS CreateInferenceSchedulerResponse)
-> ReadS [CreateInferenceSchedulerResponse]
-> ReadPrec CreateInferenceSchedulerResponse
-> ReadPrec [CreateInferenceSchedulerResponse]
-> Read CreateInferenceSchedulerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInferenceSchedulerResponse]
$creadListPrec :: ReadPrec [CreateInferenceSchedulerResponse]
readPrec :: ReadPrec CreateInferenceSchedulerResponse
$creadPrec :: ReadPrec CreateInferenceSchedulerResponse
readList :: ReadS [CreateInferenceSchedulerResponse]
$creadList :: ReadS [CreateInferenceSchedulerResponse]
readsPrec :: Int -> ReadS CreateInferenceSchedulerResponse
$creadsPrec :: Int -> ReadS CreateInferenceSchedulerResponse
Prelude.Read, Int -> CreateInferenceSchedulerResponse -> ShowS
[CreateInferenceSchedulerResponse] -> ShowS
CreateInferenceSchedulerResponse -> String
(Int -> CreateInferenceSchedulerResponse -> ShowS)
-> (CreateInferenceSchedulerResponse -> String)
-> ([CreateInferenceSchedulerResponse] -> ShowS)
-> Show CreateInferenceSchedulerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInferenceSchedulerResponse] -> ShowS
$cshowList :: [CreateInferenceSchedulerResponse] -> ShowS
show :: CreateInferenceSchedulerResponse -> String
$cshow :: CreateInferenceSchedulerResponse -> String
showsPrec :: Int -> CreateInferenceSchedulerResponse -> ShowS
$cshowsPrec :: Int -> CreateInferenceSchedulerResponse -> ShowS
Prelude.Show, (forall x.
CreateInferenceSchedulerResponse
-> Rep CreateInferenceSchedulerResponse x)
-> (forall x.
Rep CreateInferenceSchedulerResponse x
-> CreateInferenceSchedulerResponse)
-> Generic CreateInferenceSchedulerResponse
forall x.
Rep CreateInferenceSchedulerResponse x
-> CreateInferenceSchedulerResponse
forall x.
CreateInferenceSchedulerResponse
-> Rep CreateInferenceSchedulerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateInferenceSchedulerResponse x
-> CreateInferenceSchedulerResponse
$cfrom :: forall x.
CreateInferenceSchedulerResponse
-> Rep CreateInferenceSchedulerResponse x
Prelude.Generic)
newCreateInferenceSchedulerResponse ::
Prelude.Int ->
CreateInferenceSchedulerResponse
newCreateInferenceSchedulerResponse :: Int -> CreateInferenceSchedulerResponse
newCreateInferenceSchedulerResponse Int
pHttpStatus_ =
CreateInferenceSchedulerResponse' :: Maybe InferenceSchedulerStatus
-> Maybe Text
-> Maybe Text
-> Int
-> CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse'
{ $sel:status:CreateInferenceSchedulerResponse' :: Maybe InferenceSchedulerStatus
status =
Maybe InferenceSchedulerStatus
forall a. Maybe a
Prelude.Nothing,
$sel:inferenceSchedulerArn:CreateInferenceSchedulerResponse' :: Maybe Text
inferenceSchedulerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inferenceSchedulerName:CreateInferenceSchedulerResponse' :: Maybe Text
inferenceSchedulerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateInferenceSchedulerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createInferenceSchedulerResponse_status :: Lens.Lens' CreateInferenceSchedulerResponse (Prelude.Maybe InferenceSchedulerStatus)
createInferenceSchedulerResponse_status :: (Maybe InferenceSchedulerStatus
-> f (Maybe InferenceSchedulerStatus))
-> CreateInferenceSchedulerResponse
-> f CreateInferenceSchedulerResponse
createInferenceSchedulerResponse_status = (CreateInferenceSchedulerResponse
-> Maybe InferenceSchedulerStatus)
-> (CreateInferenceSchedulerResponse
-> Maybe InferenceSchedulerStatus
-> CreateInferenceSchedulerResponse)
-> Lens
CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse
(Maybe InferenceSchedulerStatus)
(Maybe InferenceSchedulerStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceSchedulerResponse' {Maybe InferenceSchedulerStatus
status :: Maybe InferenceSchedulerStatus
$sel:status:CreateInferenceSchedulerResponse' :: CreateInferenceSchedulerResponse -> Maybe InferenceSchedulerStatus
status} -> Maybe InferenceSchedulerStatus
status) (\s :: CreateInferenceSchedulerResponse
s@CreateInferenceSchedulerResponse' {} Maybe InferenceSchedulerStatus
a -> CreateInferenceSchedulerResponse
s {$sel:status:CreateInferenceSchedulerResponse' :: Maybe InferenceSchedulerStatus
status = Maybe InferenceSchedulerStatus
a} :: CreateInferenceSchedulerResponse)
createInferenceSchedulerResponse_inferenceSchedulerArn :: Lens.Lens' CreateInferenceSchedulerResponse (Prelude.Maybe Prelude.Text)
createInferenceSchedulerResponse_inferenceSchedulerArn :: (Maybe Text -> f (Maybe Text))
-> CreateInferenceSchedulerResponse
-> f CreateInferenceSchedulerResponse
createInferenceSchedulerResponse_inferenceSchedulerArn = (CreateInferenceSchedulerResponse -> Maybe Text)
-> (CreateInferenceSchedulerResponse
-> Maybe Text -> CreateInferenceSchedulerResponse)
-> Lens
CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceSchedulerResponse' {Maybe Text
inferenceSchedulerArn :: Maybe Text
$sel:inferenceSchedulerArn:CreateInferenceSchedulerResponse' :: CreateInferenceSchedulerResponse -> Maybe Text
inferenceSchedulerArn} -> Maybe Text
inferenceSchedulerArn) (\s :: CreateInferenceSchedulerResponse
s@CreateInferenceSchedulerResponse' {} Maybe Text
a -> CreateInferenceSchedulerResponse
s {$sel:inferenceSchedulerArn:CreateInferenceSchedulerResponse' :: Maybe Text
inferenceSchedulerArn = Maybe Text
a} :: CreateInferenceSchedulerResponse)
createInferenceSchedulerResponse_inferenceSchedulerName :: Lens.Lens' CreateInferenceSchedulerResponse (Prelude.Maybe Prelude.Text)
createInferenceSchedulerResponse_inferenceSchedulerName :: (Maybe Text -> f (Maybe Text))
-> CreateInferenceSchedulerResponse
-> f CreateInferenceSchedulerResponse
createInferenceSchedulerResponse_inferenceSchedulerName = (CreateInferenceSchedulerResponse -> Maybe Text)
-> (CreateInferenceSchedulerResponse
-> Maybe Text -> CreateInferenceSchedulerResponse)
-> Lens
CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceSchedulerResponse' {Maybe Text
inferenceSchedulerName :: Maybe Text
$sel:inferenceSchedulerName:CreateInferenceSchedulerResponse' :: CreateInferenceSchedulerResponse -> Maybe Text
inferenceSchedulerName} -> Maybe Text
inferenceSchedulerName) (\s :: CreateInferenceSchedulerResponse
s@CreateInferenceSchedulerResponse' {} Maybe Text
a -> CreateInferenceSchedulerResponse
s {$sel:inferenceSchedulerName:CreateInferenceSchedulerResponse' :: Maybe Text
inferenceSchedulerName = Maybe Text
a} :: CreateInferenceSchedulerResponse)
createInferenceSchedulerResponse_httpStatus :: Lens.Lens' CreateInferenceSchedulerResponse Prelude.Int
createInferenceSchedulerResponse_httpStatus :: (Int -> f Int)
-> CreateInferenceSchedulerResponse
-> f CreateInferenceSchedulerResponse
createInferenceSchedulerResponse_httpStatus = (CreateInferenceSchedulerResponse -> Int)
-> (CreateInferenceSchedulerResponse
-> Int -> CreateInferenceSchedulerResponse)
-> Lens
CreateInferenceSchedulerResponse
CreateInferenceSchedulerResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInferenceSchedulerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateInferenceSchedulerResponse' :: CreateInferenceSchedulerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateInferenceSchedulerResponse
s@CreateInferenceSchedulerResponse' {} Int
a -> CreateInferenceSchedulerResponse
s {$sel:httpStatus:CreateInferenceSchedulerResponse' :: Int
httpStatus = Int
a} :: CreateInferenceSchedulerResponse)
instance
Prelude.NFData
CreateInferenceSchedulerResponse