{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LookoutEquipment.UpdateInferenceScheduler
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an inference scheduler.
module Amazonka.LookoutEquipment.UpdateInferenceScheduler
  ( -- * Creating a Request
    UpdateInferenceScheduler (..),
    newUpdateInferenceScheduler,

    -- * Request Lenses
    updateInferenceScheduler_dataUploadFrequency,
    updateInferenceScheduler_dataDelayOffsetInMinutes,
    updateInferenceScheduler_dataOutputConfiguration,
    updateInferenceScheduler_dataInputConfiguration,
    updateInferenceScheduler_roleArn,
    updateInferenceScheduler_inferenceSchedulerName,

    -- * Destructuring the Response
    UpdateInferenceSchedulerResponse (..),
    newUpdateInferenceSchedulerResponse,
  )
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

-- | /See:/ 'newUpdateInferenceScheduler' smart constructor.
data UpdateInferenceScheduler = UpdateInferenceScheduler'
  { -- | How often data is uploaded to the source S3 bucket for the input data.
    -- The value chosen is the length of time between data uploads. For
    -- instance, if you select 5 minutes, Amazon Lookout for Equipment will
    -- upload the real-time data to the source bucket once every 5 minutes.
    -- This frequency also determines how often Amazon Lookout for Equipment
    -- starts a scheduled inference on your data. In this example, it starts
    -- once every 5 minutes.
    UpdateInferenceScheduler -> Maybe DataUploadFrequency
dataUploadFrequency :: Prelude.Maybe DataUploadFrequency,
    -- | A period of time (in minutes) by which inference on the data is delayed
    -- after the data starts. For instance, if you select an offset delay time
    -- of five minutes, inference will not begin on the data until the first
    -- data measurement after the five minute mark. For example, if five
    -- minutes is selected, the inference scheduler will wake up at the
    -- configured frequency with the additional five minute delay time to check
    -- the customer S3 bucket. The customer can upload data at the same
    -- frequency and they don\'t need to stop and restart the scheduler when
    -- uploading new data.
    UpdateInferenceScheduler -> Maybe Natural
dataDelayOffsetInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | Specifies information for the output results from the inference
    -- scheduler, including the output S3 location.
    UpdateInferenceScheduler -> Maybe InferenceOutputConfiguration
dataOutputConfiguration :: Prelude.Maybe InferenceOutputConfiguration,
    -- | Specifies information for the input data for the inference scheduler,
    -- including delimiter, format, and dataset location.
    UpdateInferenceScheduler -> Maybe InferenceInputConfiguration
dataInputConfiguration :: Prelude.Maybe InferenceInputConfiguration,
    -- | The Amazon Resource Name (ARN) of a role with permission to access the
    -- data source for the inference scheduler.
    UpdateInferenceScheduler -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the inference scheduler to be updated.
    UpdateInferenceScheduler -> Text
inferenceSchedulerName :: Prelude.Text
  }
  deriving (UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool
(UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool)
-> (UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool)
-> Eq UpdateInferenceScheduler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool
$c/= :: UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool
== :: UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool
$c== :: UpdateInferenceScheduler -> UpdateInferenceScheduler -> Bool
Prelude.Eq, ReadPrec [UpdateInferenceScheduler]
ReadPrec UpdateInferenceScheduler
Int -> ReadS UpdateInferenceScheduler
ReadS [UpdateInferenceScheduler]
(Int -> ReadS UpdateInferenceScheduler)
-> ReadS [UpdateInferenceScheduler]
-> ReadPrec UpdateInferenceScheduler
-> ReadPrec [UpdateInferenceScheduler]
-> Read UpdateInferenceScheduler
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInferenceScheduler]
$creadListPrec :: ReadPrec [UpdateInferenceScheduler]
readPrec :: ReadPrec UpdateInferenceScheduler
$creadPrec :: ReadPrec UpdateInferenceScheduler
readList :: ReadS [UpdateInferenceScheduler]
$creadList :: ReadS [UpdateInferenceScheduler]
readsPrec :: Int -> ReadS UpdateInferenceScheduler
$creadsPrec :: Int -> ReadS UpdateInferenceScheduler
Prelude.Read, Int -> UpdateInferenceScheduler -> ShowS
[UpdateInferenceScheduler] -> ShowS
UpdateInferenceScheduler -> String
(Int -> UpdateInferenceScheduler -> ShowS)
-> (UpdateInferenceScheduler -> String)
-> ([UpdateInferenceScheduler] -> ShowS)
-> Show UpdateInferenceScheduler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInferenceScheduler] -> ShowS
$cshowList :: [UpdateInferenceScheduler] -> ShowS
show :: UpdateInferenceScheduler -> String
$cshow :: UpdateInferenceScheduler -> String
showsPrec :: Int -> UpdateInferenceScheduler -> ShowS
$cshowsPrec :: Int -> UpdateInferenceScheduler -> ShowS
Prelude.Show, (forall x.
 UpdateInferenceScheduler -> Rep UpdateInferenceScheduler x)
-> (forall x.
    Rep UpdateInferenceScheduler x -> UpdateInferenceScheduler)
-> Generic UpdateInferenceScheduler
forall x.
Rep UpdateInferenceScheduler x -> UpdateInferenceScheduler
forall x.
UpdateInferenceScheduler -> Rep UpdateInferenceScheduler x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInferenceScheduler x -> UpdateInferenceScheduler
$cfrom :: forall x.
UpdateInferenceScheduler -> Rep UpdateInferenceScheduler x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInferenceScheduler' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dataUploadFrequency', 'updateInferenceScheduler_dataUploadFrequency' - How often data is uploaded to the source S3 bucket for the input data.
-- The value chosen is the length of time between data uploads. For
-- instance, if you select 5 minutes, Amazon Lookout for Equipment will
-- upload the real-time data to the source bucket once every 5 minutes.
-- This frequency also determines how often Amazon Lookout for Equipment
-- starts a scheduled inference on your data. In this example, it starts
-- once every 5 minutes.
--
-- 'dataDelayOffsetInMinutes', 'updateInferenceScheduler_dataDelayOffsetInMinutes' - A period of time (in minutes) by which inference on the data is delayed
-- after the data starts. For instance, if you select an offset delay time
-- of five minutes, inference will not begin on the data until the first
-- data measurement after the five minute mark. For example, if five
-- minutes is selected, the inference scheduler will wake up at the
-- configured frequency with the additional five minute delay time to check
-- the customer S3 bucket. The customer can upload data at the same
-- frequency and they don\'t need to stop and restart the scheduler when
-- uploading new data.
--
-- 'dataOutputConfiguration', 'updateInferenceScheduler_dataOutputConfiguration' - Specifies information for the output results from the inference
-- scheduler, including the output S3 location.
--
-- 'dataInputConfiguration', 'updateInferenceScheduler_dataInputConfiguration' - Specifies information for the input data for the inference scheduler,
-- including delimiter, format, and dataset location.
--
-- 'roleArn', 'updateInferenceScheduler_roleArn' - The Amazon Resource Name (ARN) of a role with permission to access the
-- data source for the inference scheduler.
--
-- 'inferenceSchedulerName', 'updateInferenceScheduler_inferenceSchedulerName' - The name of the inference scheduler to be updated.
newUpdateInferenceScheduler ::
  -- | 'inferenceSchedulerName'
  Prelude.Text ->
  UpdateInferenceScheduler
newUpdateInferenceScheduler :: Text -> UpdateInferenceScheduler
newUpdateInferenceScheduler Text
pInferenceSchedulerName_ =
  UpdateInferenceScheduler' :: Maybe DataUploadFrequency
-> Maybe Natural
-> Maybe InferenceOutputConfiguration
-> Maybe InferenceInputConfiguration
-> Maybe Text
-> Text
-> UpdateInferenceScheduler
UpdateInferenceScheduler'
    { $sel:dataUploadFrequency:UpdateInferenceScheduler' :: Maybe DataUploadFrequency
dataUploadFrequency =
        Maybe DataUploadFrequency
forall a. Maybe a
Prelude.Nothing,
      $sel:dataDelayOffsetInMinutes:UpdateInferenceScheduler' :: Maybe Natural
dataDelayOffsetInMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:dataOutputConfiguration:UpdateInferenceScheduler' :: Maybe InferenceOutputConfiguration
dataOutputConfiguration = Maybe InferenceOutputConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:dataInputConfiguration:UpdateInferenceScheduler' :: Maybe InferenceInputConfiguration
dataInputConfiguration = Maybe InferenceInputConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateInferenceScheduler' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inferenceSchedulerName:UpdateInferenceScheduler' :: Text
inferenceSchedulerName = Text
pInferenceSchedulerName_
    }

-- | How often data is uploaded to the source S3 bucket for the input data.
-- The value chosen is the length of time between data uploads. For
-- instance, if you select 5 minutes, Amazon Lookout for Equipment will
-- upload the real-time data to the source bucket once every 5 minutes.
-- This frequency also determines how often Amazon Lookout for Equipment
-- starts a scheduled inference on your data. In this example, it starts
-- once every 5 minutes.
updateInferenceScheduler_dataUploadFrequency :: Lens.Lens' UpdateInferenceScheduler (Prelude.Maybe DataUploadFrequency)
updateInferenceScheduler_dataUploadFrequency :: (Maybe DataUploadFrequency -> f (Maybe DataUploadFrequency))
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_dataUploadFrequency = (UpdateInferenceScheduler -> Maybe DataUploadFrequency)
-> (UpdateInferenceScheduler
    -> Maybe DataUploadFrequency -> UpdateInferenceScheduler)
-> Lens
     UpdateInferenceScheduler
     UpdateInferenceScheduler
     (Maybe DataUploadFrequency)
     (Maybe DataUploadFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Maybe DataUploadFrequency
dataUploadFrequency :: Maybe DataUploadFrequency
$sel:dataUploadFrequency:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe DataUploadFrequency
dataUploadFrequency} -> Maybe DataUploadFrequency
dataUploadFrequency) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Maybe DataUploadFrequency
a -> UpdateInferenceScheduler
s {$sel:dataUploadFrequency:UpdateInferenceScheduler' :: Maybe DataUploadFrequency
dataUploadFrequency = Maybe DataUploadFrequency
a} :: UpdateInferenceScheduler)

-- | A period of time (in minutes) by which inference on the data is delayed
-- after the data starts. For instance, if you select an offset delay time
-- of five minutes, inference will not begin on the data until the first
-- data measurement after the five minute mark. For example, if five
-- minutes is selected, the inference scheduler will wake up at the
-- configured frequency with the additional five minute delay time to check
-- the customer S3 bucket. The customer can upload data at the same
-- frequency and they don\'t need to stop and restart the scheduler when
-- uploading new data.
updateInferenceScheduler_dataDelayOffsetInMinutes :: Lens.Lens' UpdateInferenceScheduler (Prelude.Maybe Prelude.Natural)
updateInferenceScheduler_dataDelayOffsetInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_dataDelayOffsetInMinutes = (UpdateInferenceScheduler -> Maybe Natural)
-> (UpdateInferenceScheduler
    -> Maybe Natural -> UpdateInferenceScheduler)
-> Lens
     UpdateInferenceScheduler
     UpdateInferenceScheduler
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Maybe Natural
dataDelayOffsetInMinutes :: Maybe Natural
$sel:dataDelayOffsetInMinutes:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe Natural
dataDelayOffsetInMinutes} -> Maybe Natural
dataDelayOffsetInMinutes) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Maybe Natural
a -> UpdateInferenceScheduler
s {$sel:dataDelayOffsetInMinutes:UpdateInferenceScheduler' :: Maybe Natural
dataDelayOffsetInMinutes = Maybe Natural
a} :: UpdateInferenceScheduler)

-- | Specifies information for the output results from the inference
-- scheduler, including the output S3 location.
updateInferenceScheduler_dataOutputConfiguration :: Lens.Lens' UpdateInferenceScheduler (Prelude.Maybe InferenceOutputConfiguration)
updateInferenceScheduler_dataOutputConfiguration :: (Maybe InferenceOutputConfiguration
 -> f (Maybe InferenceOutputConfiguration))
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_dataOutputConfiguration = (UpdateInferenceScheduler -> Maybe InferenceOutputConfiguration)
-> (UpdateInferenceScheduler
    -> Maybe InferenceOutputConfiguration -> UpdateInferenceScheduler)
-> Lens
     UpdateInferenceScheduler
     UpdateInferenceScheduler
     (Maybe InferenceOutputConfiguration)
     (Maybe InferenceOutputConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Maybe InferenceOutputConfiguration
dataOutputConfiguration :: Maybe InferenceOutputConfiguration
$sel:dataOutputConfiguration:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe InferenceOutputConfiguration
dataOutputConfiguration} -> Maybe InferenceOutputConfiguration
dataOutputConfiguration) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Maybe InferenceOutputConfiguration
a -> UpdateInferenceScheduler
s {$sel:dataOutputConfiguration:UpdateInferenceScheduler' :: Maybe InferenceOutputConfiguration
dataOutputConfiguration = Maybe InferenceOutputConfiguration
a} :: UpdateInferenceScheduler)

-- | Specifies information for the input data for the inference scheduler,
-- including delimiter, format, and dataset location.
updateInferenceScheduler_dataInputConfiguration :: Lens.Lens' UpdateInferenceScheduler (Prelude.Maybe InferenceInputConfiguration)
updateInferenceScheduler_dataInputConfiguration :: (Maybe InferenceInputConfiguration
 -> f (Maybe InferenceInputConfiguration))
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_dataInputConfiguration = (UpdateInferenceScheduler -> Maybe InferenceInputConfiguration)
-> (UpdateInferenceScheduler
    -> Maybe InferenceInputConfiguration -> UpdateInferenceScheduler)
-> Lens
     UpdateInferenceScheduler
     UpdateInferenceScheduler
     (Maybe InferenceInputConfiguration)
     (Maybe InferenceInputConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Maybe InferenceInputConfiguration
dataInputConfiguration :: Maybe InferenceInputConfiguration
$sel:dataInputConfiguration:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe InferenceInputConfiguration
dataInputConfiguration} -> Maybe InferenceInputConfiguration
dataInputConfiguration) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Maybe InferenceInputConfiguration
a -> UpdateInferenceScheduler
s {$sel:dataInputConfiguration:UpdateInferenceScheduler' :: Maybe InferenceInputConfiguration
dataInputConfiguration = Maybe InferenceInputConfiguration
a} :: UpdateInferenceScheduler)

-- | The Amazon Resource Name (ARN) of a role with permission to access the
-- data source for the inference scheduler.
updateInferenceScheduler_roleArn :: Lens.Lens' UpdateInferenceScheduler (Prelude.Maybe Prelude.Text)
updateInferenceScheduler_roleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_roleArn = (UpdateInferenceScheduler -> Maybe Text)
-> (UpdateInferenceScheduler
    -> Maybe Text -> UpdateInferenceScheduler)
-> Lens
     UpdateInferenceScheduler
     UpdateInferenceScheduler
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Maybe Text
a -> UpdateInferenceScheduler
s {$sel:roleArn:UpdateInferenceScheduler' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateInferenceScheduler)

-- | The name of the inference scheduler to be updated.
updateInferenceScheduler_inferenceSchedulerName :: Lens.Lens' UpdateInferenceScheduler Prelude.Text
updateInferenceScheduler_inferenceSchedulerName :: (Text -> f Text)
-> UpdateInferenceScheduler -> f UpdateInferenceScheduler
updateInferenceScheduler_inferenceSchedulerName = (UpdateInferenceScheduler -> Text)
-> (UpdateInferenceScheduler -> Text -> UpdateInferenceScheduler)
-> Lens UpdateInferenceScheduler UpdateInferenceScheduler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInferenceScheduler' {Text
inferenceSchedulerName :: Text
$sel:inferenceSchedulerName:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Text
inferenceSchedulerName} -> Text
inferenceSchedulerName) (\s :: UpdateInferenceScheduler
s@UpdateInferenceScheduler' {} Text
a -> UpdateInferenceScheduler
s {$sel:inferenceSchedulerName:UpdateInferenceScheduler' :: Text
inferenceSchedulerName = Text
a} :: UpdateInferenceScheduler)

instance Core.AWSRequest UpdateInferenceScheduler where
  type
    AWSResponse UpdateInferenceScheduler =
      UpdateInferenceSchedulerResponse
  request :: UpdateInferenceScheduler -> Request UpdateInferenceScheduler
request = Service
-> UpdateInferenceScheduler -> Request UpdateInferenceScheduler
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateInferenceScheduler
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateInferenceScheduler)))
response =
    AWSResponse UpdateInferenceScheduler
-> Logger
-> Service
-> Proxy UpdateInferenceScheduler
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateInferenceScheduler)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse UpdateInferenceScheduler
UpdateInferenceSchedulerResponse
UpdateInferenceSchedulerResponse'

instance Prelude.Hashable UpdateInferenceScheduler

instance Prelude.NFData UpdateInferenceScheduler

instance Core.ToHeaders UpdateInferenceScheduler where
  toHeaders :: UpdateInferenceScheduler -> [Header]
toHeaders =
    [Header] -> UpdateInferenceScheduler -> [Header]
forall a b. a -> b -> a
Prelude.const
      ( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"AWSLookoutEquipmentFrontendService.UpdateInferenceScheduler" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateInferenceScheduler where
  toJSON :: UpdateInferenceScheduler -> Value
toJSON UpdateInferenceScheduler' {Maybe Natural
Maybe Text
Maybe DataUploadFrequency
Maybe InferenceInputConfiguration
Maybe InferenceOutputConfiguration
Text
inferenceSchedulerName :: Text
roleArn :: Maybe Text
dataInputConfiguration :: Maybe InferenceInputConfiguration
dataOutputConfiguration :: Maybe InferenceOutputConfiguration
dataDelayOffsetInMinutes :: Maybe Natural
dataUploadFrequency :: Maybe DataUploadFrequency
$sel:inferenceSchedulerName:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Text
$sel:roleArn:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe Text
$sel:dataInputConfiguration:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe InferenceInputConfiguration
$sel:dataOutputConfiguration:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe InferenceOutputConfiguration
$sel:dataDelayOffsetInMinutes:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe Natural
$sel:dataUploadFrequency:UpdateInferenceScheduler' :: UpdateInferenceScheduler -> Maybe DataUploadFrequency
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DataUploadFrequency" Text -> DataUploadFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DataUploadFrequency -> Pair)
-> Maybe DataUploadFrequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataUploadFrequency
dataUploadFrequency,
            (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
"DataOutputConfiguration" Text -> InferenceOutputConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InferenceOutputConfiguration -> Pair)
-> Maybe InferenceOutputConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InferenceOutputConfiguration
dataOutputConfiguration,
            (Text
"DataInputConfiguration" Text -> InferenceInputConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InferenceInputConfiguration -> Pair)
-> Maybe InferenceInputConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InferenceInputConfiguration
dataInputConfiguration,
            (Text
"RoleArn" 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
roleArn,
            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
              )
          ]
      )

instance Core.ToPath UpdateInferenceScheduler where
  toPath :: UpdateInferenceScheduler -> ByteString
toPath = ByteString -> UpdateInferenceScheduler -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateInferenceScheduler where
  toQuery :: UpdateInferenceScheduler -> QueryString
toQuery = QueryString -> UpdateInferenceScheduler -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateInferenceSchedulerResponse' smart constructor.
data UpdateInferenceSchedulerResponse = UpdateInferenceSchedulerResponse'
  {
  }
  deriving (UpdateInferenceSchedulerResponse
-> UpdateInferenceSchedulerResponse -> Bool
(UpdateInferenceSchedulerResponse
 -> UpdateInferenceSchedulerResponse -> Bool)
-> (UpdateInferenceSchedulerResponse
    -> UpdateInferenceSchedulerResponse -> Bool)
-> Eq UpdateInferenceSchedulerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInferenceSchedulerResponse
-> UpdateInferenceSchedulerResponse -> Bool
$c/= :: UpdateInferenceSchedulerResponse
-> UpdateInferenceSchedulerResponse -> Bool
== :: UpdateInferenceSchedulerResponse
-> UpdateInferenceSchedulerResponse -> Bool
$c== :: UpdateInferenceSchedulerResponse
-> UpdateInferenceSchedulerResponse -> Bool
Prelude.Eq, ReadPrec [UpdateInferenceSchedulerResponse]
ReadPrec UpdateInferenceSchedulerResponse
Int -> ReadS UpdateInferenceSchedulerResponse
ReadS [UpdateInferenceSchedulerResponse]
(Int -> ReadS UpdateInferenceSchedulerResponse)
-> ReadS [UpdateInferenceSchedulerResponse]
-> ReadPrec UpdateInferenceSchedulerResponse
-> ReadPrec [UpdateInferenceSchedulerResponse]
-> Read UpdateInferenceSchedulerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInferenceSchedulerResponse]
$creadListPrec :: ReadPrec [UpdateInferenceSchedulerResponse]
readPrec :: ReadPrec UpdateInferenceSchedulerResponse
$creadPrec :: ReadPrec UpdateInferenceSchedulerResponse
readList :: ReadS [UpdateInferenceSchedulerResponse]
$creadList :: ReadS [UpdateInferenceSchedulerResponse]
readsPrec :: Int -> ReadS UpdateInferenceSchedulerResponse
$creadsPrec :: Int -> ReadS UpdateInferenceSchedulerResponse
Prelude.Read, Int -> UpdateInferenceSchedulerResponse -> ShowS
[UpdateInferenceSchedulerResponse] -> ShowS
UpdateInferenceSchedulerResponse -> String
(Int -> UpdateInferenceSchedulerResponse -> ShowS)
-> (UpdateInferenceSchedulerResponse -> String)
-> ([UpdateInferenceSchedulerResponse] -> ShowS)
-> Show UpdateInferenceSchedulerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInferenceSchedulerResponse] -> ShowS
$cshowList :: [UpdateInferenceSchedulerResponse] -> ShowS
show :: UpdateInferenceSchedulerResponse -> String
$cshow :: UpdateInferenceSchedulerResponse -> String
showsPrec :: Int -> UpdateInferenceSchedulerResponse -> ShowS
$cshowsPrec :: Int -> UpdateInferenceSchedulerResponse -> ShowS
Prelude.Show, (forall x.
 UpdateInferenceSchedulerResponse
 -> Rep UpdateInferenceSchedulerResponse x)
-> (forall x.
    Rep UpdateInferenceSchedulerResponse x
    -> UpdateInferenceSchedulerResponse)
-> Generic UpdateInferenceSchedulerResponse
forall x.
Rep UpdateInferenceSchedulerResponse x
-> UpdateInferenceSchedulerResponse
forall x.
UpdateInferenceSchedulerResponse
-> Rep UpdateInferenceSchedulerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInferenceSchedulerResponse x
-> UpdateInferenceSchedulerResponse
$cfrom :: forall x.
UpdateInferenceSchedulerResponse
-> Rep UpdateInferenceSchedulerResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInferenceSchedulerResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newUpdateInferenceSchedulerResponse ::
  UpdateInferenceSchedulerResponse
newUpdateInferenceSchedulerResponse :: UpdateInferenceSchedulerResponse
newUpdateInferenceSchedulerResponse =
  UpdateInferenceSchedulerResponse
UpdateInferenceSchedulerResponse'

instance
  Prelude.NFData
    UpdateInferenceSchedulerResponse