{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.MediaConvert.Types.JobTemplate
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.JobTemplate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.AccelerationSettings
import Amazonka.MediaConvert.Types.HopDestination
import Amazonka.MediaConvert.Types.JobTemplateSettings
import Amazonka.MediaConvert.Types.StatusUpdateInterval
import Amazonka.MediaConvert.Types.Type
import qualified Amazonka.Prelude as Prelude

-- | A job template is a pre-made set of encoding instructions that you can
-- use to quickly create a job.
--
-- /See:/ 'newJobTemplate' smart constructor.
data JobTemplate = JobTemplate'
  { -- | Accelerated transcoding can significantly speed up jobs with long,
    -- visually complex content.
    JobTemplate -> Maybe AccelerationSettings
accelerationSettings :: Prelude.Maybe AccelerationSettings,
    -- | An identifier for this resource that is unique within all of AWS.
    JobTemplate -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | An optional category you create to organize your job templates.
    JobTemplate -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
    -- | The timestamp in epoch seconds for Job template creation.
    JobTemplate -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | An optional description you create for each job template.
    JobTemplate -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Optional list of hop destinations.
    JobTemplate -> Maybe [HopDestination]
hopDestinations :: Prelude.Maybe [HopDestination],
    -- | The timestamp in epoch seconds when the Job template was last updated.
    JobTemplate -> Maybe POSIX
lastUpdated :: Prelude.Maybe Data.POSIX,
    -- | Relative priority on the job.
    JobTemplate -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
    -- | Optional. The queue that jobs created from this template are assigned
    -- to. If you don\'t specify this, jobs will go to the default queue.
    JobTemplate -> Maybe Text
queue :: Prelude.Maybe Prelude.Text,
    -- | Specify how often MediaConvert sends STATUS_UPDATE events to Amazon
    -- CloudWatch Events. Set the interval, in seconds, between status updates.
    -- MediaConvert sends an update at this interval from the time the service
    -- begins processing your job to the time it completes the transcode or
    -- encounters an error.
    JobTemplate -> Maybe StatusUpdateInterval
statusUpdateInterval :: Prelude.Maybe StatusUpdateInterval,
    -- | A job template can be of two types: system or custom. System or built-in
    -- job templates can\'t be modified or deleted by the user.
    JobTemplate -> Maybe Type
type' :: Prelude.Maybe Type,
    -- | JobTemplateSettings contains all the transcode settings saved in the
    -- template that will be applied to jobs created from it.
    JobTemplate -> JobTemplateSettings
settings :: JobTemplateSettings,
    -- | A name you create for each job template. Each name must be unique within
    -- your account.
    JobTemplate -> Text
name :: Prelude.Text
  }
  deriving (JobTemplate -> JobTemplate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobTemplate -> JobTemplate -> Bool
$c/= :: JobTemplate -> JobTemplate -> Bool
== :: JobTemplate -> JobTemplate -> Bool
$c== :: JobTemplate -> JobTemplate -> Bool
Prelude.Eq, ReadPrec [JobTemplate]
ReadPrec JobTemplate
Int -> ReadS JobTemplate
ReadS [JobTemplate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobTemplate]
$creadListPrec :: ReadPrec [JobTemplate]
readPrec :: ReadPrec JobTemplate
$creadPrec :: ReadPrec JobTemplate
readList :: ReadS [JobTemplate]
$creadList :: ReadS [JobTemplate]
readsPrec :: Int -> ReadS JobTemplate
$creadsPrec :: Int -> ReadS JobTemplate
Prelude.Read, Int -> JobTemplate -> ShowS
[JobTemplate] -> ShowS
JobTemplate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobTemplate] -> ShowS
$cshowList :: [JobTemplate] -> ShowS
show :: JobTemplate -> String
$cshow :: JobTemplate -> String
showsPrec :: Int -> JobTemplate -> ShowS
$cshowsPrec :: Int -> JobTemplate -> ShowS
Prelude.Show, forall x. Rep JobTemplate x -> JobTemplate
forall x. JobTemplate -> Rep JobTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobTemplate x -> JobTemplate
$cfrom :: forall x. JobTemplate -> Rep JobTemplate x
Prelude.Generic)

-- |
-- Create a value of 'JobTemplate' 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:
--
-- 'accelerationSettings', 'jobTemplate_accelerationSettings' - Accelerated transcoding can significantly speed up jobs with long,
-- visually complex content.
--
-- 'arn', 'jobTemplate_arn' - An identifier for this resource that is unique within all of AWS.
--
-- 'category', 'jobTemplate_category' - An optional category you create to organize your job templates.
--
-- 'createdAt', 'jobTemplate_createdAt' - The timestamp in epoch seconds for Job template creation.
--
-- 'description', 'jobTemplate_description' - An optional description you create for each job template.
--
-- 'hopDestinations', 'jobTemplate_hopDestinations' - Optional list of hop destinations.
--
-- 'lastUpdated', 'jobTemplate_lastUpdated' - The timestamp in epoch seconds when the Job template was last updated.
--
-- 'priority', 'jobTemplate_priority' - Relative priority on the job.
--
-- 'queue', 'jobTemplate_queue' - Optional. The queue that jobs created from this template are assigned
-- to. If you don\'t specify this, jobs will go to the default queue.
--
-- 'statusUpdateInterval', 'jobTemplate_statusUpdateInterval' - Specify how often MediaConvert sends STATUS_UPDATE events to Amazon
-- CloudWatch Events. Set the interval, in seconds, between status updates.
-- MediaConvert sends an update at this interval from the time the service
-- begins processing your job to the time it completes the transcode or
-- encounters an error.
--
-- 'type'', 'jobTemplate_type' - A job template can be of two types: system or custom. System or built-in
-- job templates can\'t be modified or deleted by the user.
--
-- 'settings', 'jobTemplate_settings' - JobTemplateSettings contains all the transcode settings saved in the
-- template that will be applied to jobs created from it.
--
-- 'name', 'jobTemplate_name' - A name you create for each job template. Each name must be unique within
-- your account.
newJobTemplate ::
  -- | 'settings'
  JobTemplateSettings ->
  -- | 'name'
  Prelude.Text ->
  JobTemplate
newJobTemplate :: JobTemplateSettings -> Text -> JobTemplate
newJobTemplate JobTemplateSettings
pSettings_ Text
pName_ =
  JobTemplate'
    { $sel:accelerationSettings:JobTemplate' :: Maybe AccelerationSettings
accelerationSettings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:arn:JobTemplate' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:category:JobTemplate' :: Maybe Text
category = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:JobTemplate' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:description:JobTemplate' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:hopDestinations:JobTemplate' :: Maybe [HopDestination]
hopDestinations = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:JobTemplate' :: Maybe POSIX
lastUpdated = forall a. Maybe a
Prelude.Nothing,
      $sel:priority:JobTemplate' :: Maybe Int
priority = forall a. Maybe a
Prelude.Nothing,
      $sel:queue:JobTemplate' :: Maybe Text
queue = forall a. Maybe a
Prelude.Nothing,
      $sel:statusUpdateInterval:JobTemplate' :: Maybe StatusUpdateInterval
statusUpdateInterval = forall a. Maybe a
Prelude.Nothing,
      $sel:type':JobTemplate' :: Maybe Type
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:settings:JobTemplate' :: JobTemplateSettings
settings = JobTemplateSettings
pSettings_,
      $sel:name:JobTemplate' :: Text
name = Text
pName_
    }

-- | Accelerated transcoding can significantly speed up jobs with long,
-- visually complex content.
jobTemplate_accelerationSettings :: Lens.Lens' JobTemplate (Prelude.Maybe AccelerationSettings)
jobTemplate_accelerationSettings :: Lens' JobTemplate (Maybe AccelerationSettings)
jobTemplate_accelerationSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe AccelerationSettings
accelerationSettings :: Maybe AccelerationSettings
$sel:accelerationSettings:JobTemplate' :: JobTemplate -> Maybe AccelerationSettings
accelerationSettings} -> Maybe AccelerationSettings
accelerationSettings) (\s :: JobTemplate
s@JobTemplate' {} Maybe AccelerationSettings
a -> JobTemplate
s {$sel:accelerationSettings:JobTemplate' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
a} :: JobTemplate)

-- | An identifier for this resource that is unique within all of AWS.
jobTemplate_arn :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.Text)
jobTemplate_arn :: Lens' JobTemplate (Maybe Text)
jobTemplate_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Text
arn :: Maybe Text
$sel:arn:JobTemplate' :: JobTemplate -> Maybe Text
arn} -> Maybe Text
arn) (\s :: JobTemplate
s@JobTemplate' {} Maybe Text
a -> JobTemplate
s {$sel:arn:JobTemplate' :: Maybe Text
arn = Maybe Text
a} :: JobTemplate)

-- | An optional category you create to organize your job templates.
jobTemplate_category :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.Text)
jobTemplate_category :: Lens' JobTemplate (Maybe Text)
jobTemplate_category = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Text
category :: Maybe Text
$sel:category:JobTemplate' :: JobTemplate -> Maybe Text
category} -> Maybe Text
category) (\s :: JobTemplate
s@JobTemplate' {} Maybe Text
a -> JobTemplate
s {$sel:category:JobTemplate' :: Maybe Text
category = Maybe Text
a} :: JobTemplate)

-- | The timestamp in epoch seconds for Job template creation.
jobTemplate_createdAt :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.UTCTime)
jobTemplate_createdAt :: Lens' JobTemplate (Maybe UTCTime)
jobTemplate_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:JobTemplate' :: JobTemplate -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: JobTemplate
s@JobTemplate' {} Maybe POSIX
a -> JobTemplate
s {$sel:createdAt:JobTemplate' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: JobTemplate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | An optional description you create for each job template.
jobTemplate_description :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.Text)
jobTemplate_description :: Lens' JobTemplate (Maybe Text)
jobTemplate_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Text
description :: Maybe Text
$sel:description:JobTemplate' :: JobTemplate -> Maybe Text
description} -> Maybe Text
description) (\s :: JobTemplate
s@JobTemplate' {} Maybe Text
a -> JobTemplate
s {$sel:description:JobTemplate' :: Maybe Text
description = Maybe Text
a} :: JobTemplate)

-- | Optional list of hop destinations.
jobTemplate_hopDestinations :: Lens.Lens' JobTemplate (Prelude.Maybe [HopDestination])
jobTemplate_hopDestinations :: Lens' JobTemplate (Maybe [HopDestination])
jobTemplate_hopDestinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe [HopDestination]
hopDestinations :: Maybe [HopDestination]
$sel:hopDestinations:JobTemplate' :: JobTemplate -> Maybe [HopDestination]
hopDestinations} -> Maybe [HopDestination]
hopDestinations) (\s :: JobTemplate
s@JobTemplate' {} Maybe [HopDestination]
a -> JobTemplate
s {$sel:hopDestinations:JobTemplate' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
a} :: JobTemplate) 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

-- | The timestamp in epoch seconds when the Job template was last updated.
jobTemplate_lastUpdated :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.UTCTime)
jobTemplate_lastUpdated :: Lens' JobTemplate (Maybe UTCTime)
jobTemplate_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:JobTemplate' :: JobTemplate -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: JobTemplate
s@JobTemplate' {} Maybe POSIX
a -> JobTemplate
s {$sel:lastUpdated:JobTemplate' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: JobTemplate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Relative priority on the job.
jobTemplate_priority :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.Int)
jobTemplate_priority :: Lens' JobTemplate (Maybe Int)
jobTemplate_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Int
priority :: Maybe Int
$sel:priority:JobTemplate' :: JobTemplate -> Maybe Int
priority} -> Maybe Int
priority) (\s :: JobTemplate
s@JobTemplate' {} Maybe Int
a -> JobTemplate
s {$sel:priority:JobTemplate' :: Maybe Int
priority = Maybe Int
a} :: JobTemplate)

-- | Optional. The queue that jobs created from this template are assigned
-- to. If you don\'t specify this, jobs will go to the default queue.
jobTemplate_queue :: Lens.Lens' JobTemplate (Prelude.Maybe Prelude.Text)
jobTemplate_queue :: Lens' JobTemplate (Maybe Text)
jobTemplate_queue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Text
queue :: Maybe Text
$sel:queue:JobTemplate' :: JobTemplate -> Maybe Text
queue} -> Maybe Text
queue) (\s :: JobTemplate
s@JobTemplate' {} Maybe Text
a -> JobTemplate
s {$sel:queue:JobTemplate' :: Maybe Text
queue = Maybe Text
a} :: JobTemplate)

-- | Specify how often MediaConvert sends STATUS_UPDATE events to Amazon
-- CloudWatch Events. Set the interval, in seconds, between status updates.
-- MediaConvert sends an update at this interval from the time the service
-- begins processing your job to the time it completes the transcode or
-- encounters an error.
jobTemplate_statusUpdateInterval :: Lens.Lens' JobTemplate (Prelude.Maybe StatusUpdateInterval)
jobTemplate_statusUpdateInterval :: Lens' JobTemplate (Maybe StatusUpdateInterval)
jobTemplate_statusUpdateInterval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe StatusUpdateInterval
statusUpdateInterval :: Maybe StatusUpdateInterval
$sel:statusUpdateInterval:JobTemplate' :: JobTemplate -> Maybe StatusUpdateInterval
statusUpdateInterval} -> Maybe StatusUpdateInterval
statusUpdateInterval) (\s :: JobTemplate
s@JobTemplate' {} Maybe StatusUpdateInterval
a -> JobTemplate
s {$sel:statusUpdateInterval:JobTemplate' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
a} :: JobTemplate)

-- | A job template can be of two types: system or custom. System or built-in
-- job templates can\'t be modified or deleted by the user.
jobTemplate_type :: Lens.Lens' JobTemplate (Prelude.Maybe Type)
jobTemplate_type :: Lens' JobTemplate (Maybe Type)
jobTemplate_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Maybe Type
type' :: Maybe Type
$sel:type':JobTemplate' :: JobTemplate -> Maybe Type
type'} -> Maybe Type
type') (\s :: JobTemplate
s@JobTemplate' {} Maybe Type
a -> JobTemplate
s {$sel:type':JobTemplate' :: Maybe Type
type' = Maybe Type
a} :: JobTemplate)

-- | JobTemplateSettings contains all the transcode settings saved in the
-- template that will be applied to jobs created from it.
jobTemplate_settings :: Lens.Lens' JobTemplate JobTemplateSettings
jobTemplate_settings :: Lens' JobTemplate JobTemplateSettings
jobTemplate_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {JobTemplateSettings
settings :: JobTemplateSettings
$sel:settings:JobTemplate' :: JobTemplate -> JobTemplateSettings
settings} -> JobTemplateSettings
settings) (\s :: JobTemplate
s@JobTemplate' {} JobTemplateSettings
a -> JobTemplate
s {$sel:settings:JobTemplate' :: JobTemplateSettings
settings = JobTemplateSettings
a} :: JobTemplate)

-- | A name you create for each job template. Each name must be unique within
-- your account.
jobTemplate_name :: Lens.Lens' JobTemplate Prelude.Text
jobTemplate_name :: Lens' JobTemplate Text
jobTemplate_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplate' {Text
name :: Text
$sel:name:JobTemplate' :: JobTemplate -> Text
name} -> Text
name) (\s :: JobTemplate
s@JobTemplate' {} Text
a -> JobTemplate
s {$sel:name:JobTemplate' :: Text
name = Text
a} :: JobTemplate)

instance Data.FromJSON JobTemplate where
  parseJSON :: Value -> Parser JobTemplate
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JobTemplate"
      ( \Object
x ->
          Maybe AccelerationSettings
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [HopDestination]
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe StatusUpdateInterval
-> Maybe Type
-> JobTemplateSettings
-> Text
-> JobTemplate
JobTemplate'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"accelerationSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"category")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hopDestinations"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lastUpdated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"priority")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"queue")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusUpdateInterval")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
      )

instance Prelude.Hashable JobTemplate where
  hashWithSalt :: Int -> JobTemplate -> Int
hashWithSalt Int
_salt JobTemplate' {Maybe Int
Maybe [HopDestination]
Maybe Text
Maybe POSIX
Maybe AccelerationSettings
Maybe StatusUpdateInterval
Maybe Type
Text
JobTemplateSettings
name :: Text
settings :: JobTemplateSettings
type' :: Maybe Type
statusUpdateInterval :: Maybe StatusUpdateInterval
queue :: Maybe Text
priority :: Maybe Int
lastUpdated :: Maybe POSIX
hopDestinations :: Maybe [HopDestination]
description :: Maybe Text
createdAt :: Maybe POSIX
category :: Maybe Text
arn :: Maybe Text
accelerationSettings :: Maybe AccelerationSettings
$sel:name:JobTemplate' :: JobTemplate -> Text
$sel:settings:JobTemplate' :: JobTemplate -> JobTemplateSettings
$sel:type':JobTemplate' :: JobTemplate -> Maybe Type
$sel:statusUpdateInterval:JobTemplate' :: JobTemplate -> Maybe StatusUpdateInterval
$sel:queue:JobTemplate' :: JobTemplate -> Maybe Text
$sel:priority:JobTemplate' :: JobTemplate -> Maybe Int
$sel:lastUpdated:JobTemplate' :: JobTemplate -> Maybe POSIX
$sel:hopDestinations:JobTemplate' :: JobTemplate -> Maybe [HopDestination]
$sel:description:JobTemplate' :: JobTemplate -> Maybe Text
$sel:createdAt:JobTemplate' :: JobTemplate -> Maybe POSIX
$sel:category:JobTemplate' :: JobTemplate -> Maybe Text
$sel:arn:JobTemplate' :: JobTemplate -> Maybe Text
$sel:accelerationSettings:JobTemplate' :: JobTemplate -> Maybe AccelerationSettings
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccelerationSettings
accelerationSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
category
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [HopDestination]
hopDestinations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdated
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
priority
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
queue
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StatusUpdateInterval
statusUpdateInterval
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Type
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobTemplateSettings
settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData JobTemplate where
  rnf :: JobTemplate -> ()
rnf JobTemplate' {Maybe Int
Maybe [HopDestination]
Maybe Text
Maybe POSIX
Maybe AccelerationSettings
Maybe StatusUpdateInterval
Maybe Type
Text
JobTemplateSettings
name :: Text
settings :: JobTemplateSettings
type' :: Maybe Type
statusUpdateInterval :: Maybe StatusUpdateInterval
queue :: Maybe Text
priority :: Maybe Int
lastUpdated :: Maybe POSIX
hopDestinations :: Maybe [HopDestination]
description :: Maybe Text
createdAt :: Maybe POSIX
category :: Maybe Text
arn :: Maybe Text
accelerationSettings :: Maybe AccelerationSettings
$sel:name:JobTemplate' :: JobTemplate -> Text
$sel:settings:JobTemplate' :: JobTemplate -> JobTemplateSettings
$sel:type':JobTemplate' :: JobTemplate -> Maybe Type
$sel:statusUpdateInterval:JobTemplate' :: JobTemplate -> Maybe StatusUpdateInterval
$sel:queue:JobTemplate' :: JobTemplate -> Maybe Text
$sel:priority:JobTemplate' :: JobTemplate -> Maybe Int
$sel:lastUpdated:JobTemplate' :: JobTemplate -> Maybe POSIX
$sel:hopDestinations:JobTemplate' :: JobTemplate -> Maybe [HopDestination]
$sel:description:JobTemplate' :: JobTemplate -> Maybe Text
$sel:createdAt:JobTemplate' :: JobTemplate -> Maybe POSIX
$sel:category:JobTemplate' :: JobTemplate -> Maybe Text
$sel:arn:JobTemplate' :: JobTemplate -> Maybe Text
$sel:accelerationSettings:JobTemplate' :: JobTemplate -> Maybe AccelerationSettings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccelerationSettings
accelerationSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
category
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [HopDestination]
hopDestinations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
priority
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
queue
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StatusUpdateInterval
statusUpdateInterval
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Type
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobTemplateSettings
settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name