{-# 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 #-}
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
data Queue = Queue'
{
Queue -> Maybe QueueStatus
status :: Prelude.Maybe QueueStatus,
Queue -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
Queue -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Queue -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Queue -> Maybe ReservationPlan
reservationPlan :: Prelude.Maybe ReservationPlan,
Queue -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
Queue -> Maybe Int
submittedJobsCount :: Prelude.Maybe Prelude.Int,
Queue -> Maybe Int
progressingJobsCount :: Prelude.Maybe Prelude.Int,
Queue -> Maybe Type
type' :: Prelude.Maybe Type,
Queue -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
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)
newQueue ::
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_
}
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)
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
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)
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
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)
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)
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)
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)
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)
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)
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