{-# 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.Queue
-- 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)
module Amazonka.MediaConvert.Types.Queue where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.PricingPlan
import Amazonka.MediaConvert.Types.QueueStatus
import Amazonka.MediaConvert.Types.ReservationPlan
import Amazonka.MediaConvert.Types.Type
import qualified Amazonka.Prelude as Prelude

-- | You can use queues to manage the resources that are available to your
-- AWS account for running multiple transcoding jobs at the same time. If
-- you don\'t specify a queue, the service sends all jobs through the
-- default queue. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-queues.html.
--
-- /See:/ 'newQueue' smart constructor.
data Queue = Queue'
  { -- | Queues can be ACTIVE or PAUSED. If you pause a queue, the service won\'t
    -- begin processing jobs in that queue. Jobs that are running when you
    -- pause the queue continue to run until they finish or result in an error.
    Queue -> Maybe QueueStatus
status :: Prelude.Maybe QueueStatus,
    -- | The timestamp in epoch seconds for when you most recently updated the
    -- queue.
    Queue -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | An identifier for this resource that is unique within all of AWS.
    Queue -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp in epoch seconds for when you created the queue.
    Queue -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | Details about the pricing plan for your reserved queue. Required for
    -- reserved queues and not applicable to on-demand queues.
    Queue -> Maybe ReservationPlan
reservationPlan :: Prelude.Maybe ReservationPlan,
    -- | Specifies whether the pricing plan for the queue is on-demand or
    -- reserved. For on-demand, you pay per minute, billed in increments of .01
    -- minute. For reserved, you pay for the transcoding capacity of the entire
    -- queue, regardless of how much or how little you use it. Reserved pricing
    -- requires a 12-month commitment.
    Queue -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | The estimated number of jobs with a SUBMITTED status.
    Queue -> Maybe Int
submittedJobsCount :: Prelude.Maybe Prelude.Int,
    -- | The estimated number of jobs with a PROGRESSING status.
    Queue -> Maybe Int
progressingJobsCount :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether this on-demand queue is system or custom. System
    -- queues are built in. You can\'t modify or delete system queues. You can
    -- create and modify custom queues.
    Queue -> Maybe Type
type' :: Prelude.Maybe Type,
    -- | An optional description that you create for each queue.
    Queue -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A name that you create for each queue. Each name must be unique within
    -- your account.
    Queue -> Text
name :: Prelude.Text
  }
  deriving (Queue -> Queue -> Bool
(Queue -> Queue -> Bool) -> (Queue -> Queue -> Bool) -> Eq Queue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Queue -> Queue -> Bool
$c/= :: Queue -> Queue -> Bool
== :: Queue -> Queue -> Bool
$c== :: Queue -> Queue -> Bool
Prelude.Eq, ReadPrec [Queue]
ReadPrec Queue
Int -> ReadS Queue
ReadS [Queue]
(Int -> ReadS Queue)
-> ReadS [Queue]
-> ReadPrec Queue
-> ReadPrec [Queue]
-> Read Queue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Queue]
$creadListPrec :: ReadPrec [Queue]
readPrec :: ReadPrec Queue
$creadPrec :: ReadPrec Queue
readList :: ReadS [Queue]
$creadList :: ReadS [Queue]
readsPrec :: Int -> ReadS Queue
$creadsPrec :: Int -> ReadS Queue
Prelude.Read, Int -> Queue -> ShowS
[Queue] -> ShowS
Queue -> String
(Int -> Queue -> ShowS)
-> (Queue -> String) -> ([Queue] -> ShowS) -> Show Queue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Queue] -> ShowS
$cshowList :: [Queue] -> ShowS
show :: Queue -> String
$cshow :: Queue -> String
showsPrec :: Int -> Queue -> ShowS
$cshowsPrec :: Int -> Queue -> ShowS
Prelude.Show, (forall x. Queue -> Rep Queue x)
-> (forall x. Rep Queue x -> Queue) -> Generic Queue
forall x. Rep Queue x -> Queue
forall x. Queue -> Rep Queue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Queue x -> Queue
$cfrom :: forall x. Queue -> Rep Queue x
Prelude.Generic)

-- |
-- Create a value of 'Queue' 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:
--
-- 'status', 'queue_status' - Queues can be ACTIVE or PAUSED. If you pause a queue, the service won\'t
-- begin processing jobs in that queue. Jobs that are running when you
-- pause the queue continue to run until they finish or result in an error.
--
-- 'lastUpdated', 'queue_lastUpdated' - The timestamp in epoch seconds for when you most recently updated the
-- queue.
--
-- 'arn', 'queue_arn' - An identifier for this resource that is unique within all of AWS.
--
-- 'createdAt', 'queue_createdAt' - The timestamp in epoch seconds for when you created the queue.
--
-- 'reservationPlan', 'queue_reservationPlan' - Details about the pricing plan for your reserved queue. Required for
-- reserved queues and not applicable to on-demand queues.
--
-- 'pricingPlan', 'queue_pricingPlan' - Specifies whether the pricing plan for the queue is on-demand or
-- reserved. For on-demand, you pay per minute, billed in increments of .01
-- minute. For reserved, you pay for the transcoding capacity of the entire
-- queue, regardless of how much or how little you use it. Reserved pricing
-- requires a 12-month commitment.
--
-- 'submittedJobsCount', 'queue_submittedJobsCount' - The estimated number of jobs with a SUBMITTED status.
--
-- 'progressingJobsCount', 'queue_progressingJobsCount' - The estimated number of jobs with a PROGRESSING status.
--
-- 'type'', 'queue_type' - Specifies whether this on-demand queue is system or custom. System
-- queues are built in. You can\'t modify or delete system queues. You can
-- create and modify custom queues.
--
-- 'description', 'queue_description' - An optional description that you create for each queue.
--
-- 'name', 'queue_name' - A name that you create for each queue. Each name must be unique within
-- your account.
newQueue ::
  -- | 'name'
  Prelude.Text ->
  Queue
newQueue :: Text -> Queue
newQueue Text
pName_ =
  Queue' :: Maybe QueueStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe ReservationPlan
-> Maybe PricingPlan
-> Maybe Int
-> Maybe Int
-> Maybe Type
-> Maybe Text
-> Text
-> Queue
Queue'
    { $sel:status:Queue' :: Maybe QueueStatus
status = Maybe QueueStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:Queue' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Queue' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Queue' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:reservationPlan:Queue' :: Maybe ReservationPlan
reservationPlan = Maybe ReservationPlan
forall a. Maybe a
Prelude.Nothing,
      $sel:pricingPlan:Queue' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
forall a. Maybe a
Prelude.Nothing,
      $sel:submittedJobsCount:Queue' :: Maybe Int
submittedJobsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:progressingJobsCount:Queue' :: Maybe Int
progressingJobsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Queue' :: Maybe Type
type' = Maybe Type
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Queue' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Queue' :: Text
name = Text
pName_
    }

-- | Queues can be ACTIVE or PAUSED. If you pause a queue, the service won\'t
-- begin processing jobs in that queue. Jobs that are running when you
-- pause the queue continue to run until they finish or result in an error.
queue_status :: Lens.Lens' Queue (Prelude.Maybe QueueStatus)
queue_status :: (Maybe QueueStatus -> f (Maybe QueueStatus)) -> Queue -> f Queue
queue_status = (Queue -> Maybe QueueStatus)
-> (Queue -> Maybe QueueStatus -> Queue)
-> Lens Queue Queue (Maybe QueueStatus) (Maybe QueueStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe QueueStatus
status :: Maybe QueueStatus
$sel:status:Queue' :: Queue -> Maybe QueueStatus
status} -> Maybe QueueStatus
status) (\s :: Queue
s@Queue' {} Maybe QueueStatus
a -> Queue
s {$sel:status:Queue' :: Maybe QueueStatus
status = Maybe QueueStatus
a} :: Queue)

-- | The timestamp in epoch seconds for when you most recently updated the
-- queue.
queue_lastUpdated :: Lens.Lens' Queue (Prelude.Maybe Prelude.UTCTime)
queue_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Queue -> f Queue
queue_lastUpdated = (Queue -> Maybe POSIX)
-> (Queue -> Maybe POSIX -> Queue)
-> Lens Queue Queue (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:Queue' :: Queue -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: Queue
s@Queue' {} Maybe POSIX
a -> Queue
s {$sel:lastUpdated:Queue' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: Queue) ((Maybe POSIX -> f (Maybe POSIX)) -> Queue -> f Queue)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Queue
-> f Queue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | The timestamp in epoch seconds for when you created the queue.
queue_createdAt :: Lens.Lens' Queue (Prelude.Maybe Prelude.UTCTime)
queue_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Queue -> f Queue
queue_createdAt = (Queue -> Maybe POSIX)
-> (Queue -> Maybe POSIX -> Queue)
-> Lens Queue Queue (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Queue' :: Queue -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Queue
s@Queue' {} Maybe POSIX
a -> Queue
s {$sel:createdAt:Queue' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Queue) ((Maybe POSIX -> f (Maybe POSIX)) -> Queue -> f Queue)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Queue
-> f Queue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Details about the pricing plan for your reserved queue. Required for
-- reserved queues and not applicable to on-demand queues.
queue_reservationPlan :: Lens.Lens' Queue (Prelude.Maybe ReservationPlan)
queue_reservationPlan :: (Maybe ReservationPlan -> f (Maybe ReservationPlan))
-> Queue -> f Queue
queue_reservationPlan = (Queue -> Maybe ReservationPlan)
-> (Queue -> Maybe ReservationPlan -> Queue)
-> Lens Queue Queue (Maybe ReservationPlan) (Maybe ReservationPlan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe ReservationPlan
reservationPlan :: Maybe ReservationPlan
$sel:reservationPlan:Queue' :: Queue -> Maybe ReservationPlan
reservationPlan} -> Maybe ReservationPlan
reservationPlan) (\s :: Queue
s@Queue' {} Maybe ReservationPlan
a -> Queue
s {$sel:reservationPlan:Queue' :: Maybe ReservationPlan
reservationPlan = Maybe ReservationPlan
a} :: Queue)

-- | Specifies whether the pricing plan for the queue is on-demand or
-- reserved. For on-demand, you pay per minute, billed in increments of .01
-- minute. For reserved, you pay for the transcoding capacity of the entire
-- queue, regardless of how much or how little you use it. Reserved pricing
-- requires a 12-month commitment.
queue_pricingPlan :: Lens.Lens' Queue (Prelude.Maybe PricingPlan)
queue_pricingPlan :: (Maybe PricingPlan -> f (Maybe PricingPlan)) -> Queue -> f Queue
queue_pricingPlan = (Queue -> Maybe PricingPlan)
-> (Queue -> Maybe PricingPlan -> Queue)
-> Lens Queue Queue (Maybe PricingPlan) (Maybe PricingPlan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:Queue' :: Queue -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: Queue
s@Queue' {} Maybe PricingPlan
a -> Queue
s {$sel:pricingPlan:Queue' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: Queue)

-- | The estimated number of jobs with a SUBMITTED status.
queue_submittedJobsCount :: Lens.Lens' Queue (Prelude.Maybe Prelude.Int)
queue_submittedJobsCount :: (Maybe Int -> f (Maybe Int)) -> Queue -> f Queue
queue_submittedJobsCount = (Queue -> Maybe Int)
-> (Queue -> Maybe Int -> Queue)
-> Lens Queue Queue (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Int
submittedJobsCount :: Maybe Int
$sel:submittedJobsCount:Queue' :: Queue -> Maybe Int
submittedJobsCount} -> Maybe Int
submittedJobsCount) (\s :: Queue
s@Queue' {} Maybe Int
a -> Queue
s {$sel:submittedJobsCount:Queue' :: Maybe Int
submittedJobsCount = Maybe Int
a} :: Queue)

-- | The estimated number of jobs with a PROGRESSING status.
queue_progressingJobsCount :: Lens.Lens' Queue (Prelude.Maybe Prelude.Int)
queue_progressingJobsCount :: (Maybe Int -> f (Maybe Int)) -> Queue -> f Queue
queue_progressingJobsCount = (Queue -> Maybe Int)
-> (Queue -> Maybe Int -> Queue)
-> Lens Queue Queue (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Int
progressingJobsCount :: Maybe Int
$sel:progressingJobsCount:Queue' :: Queue -> Maybe Int
progressingJobsCount} -> Maybe Int
progressingJobsCount) (\s :: Queue
s@Queue' {} Maybe Int
a -> Queue
s {$sel:progressingJobsCount:Queue' :: Maybe Int
progressingJobsCount = Maybe Int
a} :: Queue)

-- | Specifies whether this on-demand queue is system or custom. System
-- queues are built in. You can\'t modify or delete system queues. You can
-- create and modify custom queues.
queue_type :: Lens.Lens' Queue (Prelude.Maybe Type)
queue_type :: (Maybe Type -> f (Maybe Type)) -> Queue -> f Queue
queue_type = (Queue -> Maybe Type)
-> (Queue -> Maybe Type -> Queue)
-> Lens Queue Queue (Maybe Type) (Maybe Type)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Type
type' :: Maybe Type
$sel:type':Queue' :: Queue -> Maybe Type
type'} -> Maybe Type
type') (\s :: Queue
s@Queue' {} Maybe Type
a -> Queue
s {$sel:type':Queue' :: Maybe Type
type' = Maybe Type
a} :: Queue)

-- | An optional description that you create for each queue.
queue_description :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_description :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_description = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
description :: Maybe Text
$sel:description:Queue' :: Queue -> Maybe Text
description} -> Maybe Text
description) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:description:Queue' :: Maybe Text
description = Maybe Text
a} :: Queue)

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

instance Core.FromJSON Queue where
  parseJSON :: Value -> Parser Queue
parseJSON =
    String -> (Object -> Parser Queue) -> Value -> Parser Queue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Queue"
      ( \Object
x ->
          Maybe QueueStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe ReservationPlan
-> Maybe PricingPlan
-> Maybe Int
-> Maybe Int
-> Maybe Type
-> Maybe Text
-> Text
-> Queue
Queue'
            (Maybe QueueStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ReservationPlan
 -> Maybe PricingPlan
 -> Maybe Int
 -> Maybe Int
 -> Maybe Type
 -> Maybe Text
 -> Text
 -> Queue)
-> Parser (Maybe QueueStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ReservationPlan
      -> Maybe PricingPlan
      -> Maybe Int
      -> Maybe Int
      -> Maybe Type
      -> Maybe Text
      -> Text
      -> Queue)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe QueueStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ReservationPlan
   -> Maybe PricingPlan
   -> Maybe Int
   -> Maybe Int
   -> Maybe Type
   -> Maybe Text
   -> Text
   -> Queue)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ReservationPlan
      -> Maybe PricingPlan
      -> Maybe Int
      -> Maybe Int
      -> Maybe Type
      -> Maybe Text
      -> Text
      -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdated")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ReservationPlan
   -> Maybe PricingPlan
   -> Maybe Int
   -> Maybe Int
   -> Maybe Type
   -> Maybe Text
   -> Text
   -> Queue)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ReservationPlan
      -> Maybe PricingPlan
      -> Maybe Int
      -> Maybe Int
      -> Maybe Type
      -> Maybe Text
      -> Text
      -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe ReservationPlan
   -> Maybe PricingPlan
   -> Maybe Int
   -> Maybe Int
   -> Maybe Type
   -> Maybe Text
   -> Text
   -> Queue)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ReservationPlan
      -> Maybe PricingPlan
      -> Maybe Int
      -> Maybe Int
      -> Maybe Type
      -> Maybe Text
      -> Text
      -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe ReservationPlan
   -> Maybe PricingPlan
   -> Maybe Int
   -> Maybe Int
   -> Maybe Type
   -> Maybe Text
   -> Text
   -> Queue)
-> Parser (Maybe ReservationPlan)
-> Parser
     (Maybe PricingPlan
      -> Maybe Int
      -> Maybe Int
      -> Maybe Type
      -> Maybe Text
      -> Text
      -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationPlan)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"reservationPlan")
            Parser
  (Maybe PricingPlan
   -> Maybe Int
   -> Maybe Int
   -> Maybe Type
   -> Maybe Text
   -> Text
   -> Queue)
-> Parser (Maybe PricingPlan)
-> Parser
     (Maybe Int
      -> Maybe Int -> Maybe Type -> Maybe Text -> Text -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PricingPlan)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pricingPlan")
            Parser
  (Maybe Int
   -> Maybe Int -> Maybe Type -> Maybe Text -> Text -> Queue)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Type -> Maybe Text -> Text -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"submittedJobsCount")
            Parser (Maybe Int -> Maybe Type -> Maybe Text -> Text -> Queue)
-> Parser (Maybe Int)
-> Parser (Maybe Type -> Maybe Text -> Text -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"progressingJobsCount")
            Parser (Maybe Type -> Maybe Text -> Text -> Queue)
-> Parser (Maybe Type) -> Parser (Maybe Text -> Text -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Type)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser (Maybe Text -> Text -> Queue)
-> Parser (Maybe Text) -> Parser (Text -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser (Text -> Queue) -> Parser Text -> Parser Queue
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
      )

instance Prelude.Hashable Queue

instance Prelude.NFData Queue