{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 Text
arn :: Prelude.Maybe Prelude.Text,
Queue -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
Queue -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Queue -> Maybe POSIX
lastUpdated :: Prelude.Maybe Data.POSIX,
Queue -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
Queue -> Maybe Int
progressingJobsCount :: Prelude.Maybe Prelude.Int,
Queue -> Maybe ReservationPlan
reservationPlan :: Prelude.Maybe ReservationPlan,
Queue -> Maybe QueueStatus
status :: Prelude.Maybe QueueStatus,
Queue -> Maybe Int
submittedJobsCount :: Prelude.Maybe Prelude.Int,
Queue -> Maybe Type
type' :: Prelude.Maybe Type,
Queue -> Text
name :: Prelude.Text
}
deriving (Queue -> Queue -> Bool
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]
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
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. 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'
{ $sel:arn:Queue' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Queue' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:description:Queue' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:Queue' :: Maybe POSIX
lastUpdated = forall a. Maybe a
Prelude.Nothing,
$sel:pricingPlan:Queue' :: Maybe PricingPlan
pricingPlan = forall a. Maybe a
Prelude.Nothing,
$sel:progressingJobsCount:Queue' :: Maybe Int
progressingJobsCount = forall a. Maybe a
Prelude.Nothing,
$sel:reservationPlan:Queue' :: Maybe ReservationPlan
reservationPlan = forall a. Maybe a
Prelude.Nothing,
$sel:status:Queue' :: Maybe QueueStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:submittedJobsCount:Queue' :: Maybe Int
submittedJobsCount = forall a. Maybe a
Prelude.Nothing,
$sel:type':Queue' :: Maybe Type
type' = forall a. Maybe a
Prelude.Nothing,
$sel:name:Queue' :: Text
name = Text
pName_
}
queue_arn :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_arn :: Lens' Queue (Maybe Text)
queue_arn = 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 :: Lens' Queue (Maybe UTCTime)
queue_createdAt = 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) 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
queue_description :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_description :: Lens' Queue (Maybe Text)
queue_description = 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_lastUpdated :: Lens.Lens' Queue (Prelude.Maybe Prelude.UTCTime)
queue_lastUpdated :: Lens' Queue (Maybe UTCTime)
queue_lastUpdated = 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) 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
queue_pricingPlan :: Lens.Lens' Queue (Prelude.Maybe PricingPlan)
queue_pricingPlan :: Lens' Queue (Maybe PricingPlan)
queue_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_progressingJobsCount :: Lens.Lens' Queue (Prelude.Maybe Prelude.Int)
queue_progressingJobsCount :: Lens' Queue (Maybe Int)
queue_progressingJobsCount = 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_reservationPlan :: Lens.Lens' Queue (Prelude.Maybe ReservationPlan)
queue_reservationPlan :: Lens' Queue (Maybe ReservationPlan)
queue_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_status :: Lens.Lens' Queue (Prelude.Maybe QueueStatus)
queue_status :: Lens' Queue (Maybe QueueStatus)
queue_status = 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_submittedJobsCount :: Lens.Lens' Queue (Prelude.Maybe Prelude.Int)
queue_submittedJobsCount :: Lens' Queue (Maybe Int)
queue_submittedJobsCount = 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_type :: Lens.Lens' Queue (Prelude.Maybe Type)
queue_type :: Lens' Queue (Maybe Type)
queue_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_name :: Lens.Lens' Queue Prelude.Text
queue_name :: Lens' Queue Text
queue_name = 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 Data.FromJSON Queue where
parseJSON :: Value -> Parser Queue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Queue"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe PricingPlan
-> Maybe Int
-> Maybe ReservationPlan
-> Maybe QueueStatus
-> Maybe Int
-> Maybe Type
-> Text
-> Queue
Queue'
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
"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
"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
"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
"pricingPlan")
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
"progressingJobsCount")
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
"reservationPlan")
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
"status")
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
"submittedJobsCount")
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
"name")
)
instance Prelude.Hashable Queue where
hashWithSalt :: Int -> Queue -> Int
hashWithSalt Int
_salt Queue' {Maybe Int
Maybe Text
Maybe POSIX
Maybe PricingPlan
Maybe QueueStatus
Maybe ReservationPlan
Maybe Type
Text
name :: Text
type' :: Maybe Type
submittedJobsCount :: Maybe Int
status :: Maybe QueueStatus
reservationPlan :: Maybe ReservationPlan
progressingJobsCount :: Maybe Int
pricingPlan :: Maybe PricingPlan
lastUpdated :: Maybe POSIX
description :: Maybe Text
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:name:Queue' :: Queue -> Text
$sel:type':Queue' :: Queue -> Maybe Type
$sel:submittedJobsCount:Queue' :: Queue -> Maybe Int
$sel:status:Queue' :: Queue -> Maybe QueueStatus
$sel:reservationPlan:Queue' :: Queue -> Maybe ReservationPlan
$sel:progressingJobsCount:Queue' :: Queue -> Maybe Int
$sel:pricingPlan:Queue' :: Queue -> Maybe PricingPlan
$sel:lastUpdated:Queue' :: Queue -> Maybe POSIX
$sel:description:Queue' :: Queue -> Maybe Text
$sel:createdAt:Queue' :: Queue -> Maybe POSIX
$sel:arn:Queue' :: Queue -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
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 POSIX
lastUpdated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PricingPlan
pricingPlan
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
progressingJobsCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationPlan
reservationPlan
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe QueueStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
submittedJobsCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Type
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData Queue where
rnf :: Queue -> ()
rnf Queue' {Maybe Int
Maybe Text
Maybe POSIX
Maybe PricingPlan
Maybe QueueStatus
Maybe ReservationPlan
Maybe Type
Text
name :: Text
type' :: Maybe Type
submittedJobsCount :: Maybe Int
status :: Maybe QueueStatus
reservationPlan :: Maybe ReservationPlan
progressingJobsCount :: Maybe Int
pricingPlan :: Maybe PricingPlan
lastUpdated :: Maybe POSIX
description :: Maybe Text
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:name:Queue' :: Queue -> Text
$sel:type':Queue' :: Queue -> Maybe Type
$sel:submittedJobsCount:Queue' :: Queue -> Maybe Int
$sel:status:Queue' :: Queue -> Maybe QueueStatus
$sel:reservationPlan:Queue' :: Queue -> Maybe ReservationPlan
$sel:progressingJobsCount:Queue' :: Queue -> Maybe Int
$sel:pricingPlan:Queue' :: Queue -> Maybe PricingPlan
$sel:lastUpdated:Queue' :: Queue -> Maybe POSIX
$sel:description:Queue' :: Queue -> Maybe Text
$sel:createdAt:Queue' :: Queue -> Maybe POSIX
$sel:arn:Queue' :: Queue -> Maybe Text
..} =
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 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 POSIX
lastUpdated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PricingPlan
pricingPlan
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
progressingJobsCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationPlan
reservationPlan
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe QueueStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
submittedJobsCount
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 Text
name