{-# 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.Batch.Types.JobQueueDetail where
import Amazonka.Batch.Types.ComputeEnvironmentOrder
import Amazonka.Batch.Types.JQState
import Amazonka.Batch.Types.JQStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobQueueDetail = JobQueueDetail'
{
JobQueueDetail -> Maybe JQStatus
status :: Prelude.Maybe JQStatus,
JobQueueDetail -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
JobQueueDetail -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
JobQueueDetail -> Text
jobQueueName :: Prelude.Text,
JobQueueDetail -> Text
jobQueueArn :: Prelude.Text,
JobQueueDetail -> JQState
state :: JQState,
JobQueueDetail -> Int
priority :: Prelude.Int,
JobQueueDetail -> [ComputeEnvironmentOrder]
computeEnvironmentOrder :: [ComputeEnvironmentOrder]
}
deriving (JobQueueDetail -> JobQueueDetail -> Bool
(JobQueueDetail -> JobQueueDetail -> Bool)
-> (JobQueueDetail -> JobQueueDetail -> Bool) -> Eq JobQueueDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobQueueDetail -> JobQueueDetail -> Bool
$c/= :: JobQueueDetail -> JobQueueDetail -> Bool
== :: JobQueueDetail -> JobQueueDetail -> Bool
$c== :: JobQueueDetail -> JobQueueDetail -> Bool
Prelude.Eq, ReadPrec [JobQueueDetail]
ReadPrec JobQueueDetail
Int -> ReadS JobQueueDetail
ReadS [JobQueueDetail]
(Int -> ReadS JobQueueDetail)
-> ReadS [JobQueueDetail]
-> ReadPrec JobQueueDetail
-> ReadPrec [JobQueueDetail]
-> Read JobQueueDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobQueueDetail]
$creadListPrec :: ReadPrec [JobQueueDetail]
readPrec :: ReadPrec JobQueueDetail
$creadPrec :: ReadPrec JobQueueDetail
readList :: ReadS [JobQueueDetail]
$creadList :: ReadS [JobQueueDetail]
readsPrec :: Int -> ReadS JobQueueDetail
$creadsPrec :: Int -> ReadS JobQueueDetail
Prelude.Read, Int -> JobQueueDetail -> ShowS
[JobQueueDetail] -> ShowS
JobQueueDetail -> String
(Int -> JobQueueDetail -> ShowS)
-> (JobQueueDetail -> String)
-> ([JobQueueDetail] -> ShowS)
-> Show JobQueueDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobQueueDetail] -> ShowS
$cshowList :: [JobQueueDetail] -> ShowS
show :: JobQueueDetail -> String
$cshow :: JobQueueDetail -> String
showsPrec :: Int -> JobQueueDetail -> ShowS
$cshowsPrec :: Int -> JobQueueDetail -> ShowS
Prelude.Show, (forall x. JobQueueDetail -> Rep JobQueueDetail x)
-> (forall x. Rep JobQueueDetail x -> JobQueueDetail)
-> Generic JobQueueDetail
forall x. Rep JobQueueDetail x -> JobQueueDetail
forall x. JobQueueDetail -> Rep JobQueueDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobQueueDetail x -> JobQueueDetail
$cfrom :: forall x. JobQueueDetail -> Rep JobQueueDetail x
Prelude.Generic)
newJobQueueDetail ::
Prelude.Text ->
Prelude.Text ->
JQState ->
Prelude.Int ->
JobQueueDetail
newJobQueueDetail :: Text -> Text -> JQState -> Int -> JobQueueDetail
newJobQueueDetail
Text
pJobQueueName_
Text
pJobQueueArn_
JQState
pState_
Int
pPriority_ =
JobQueueDetail' :: Maybe JQStatus
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail
JobQueueDetail'
{ $sel:status:JobQueueDetail' :: Maybe JQStatus
status = Maybe JQStatus
forall a. Maybe a
Prelude.Nothing,
$sel:statusReason:JobQueueDetail' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:JobQueueDetail' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:jobQueueName:JobQueueDetail' :: Text
jobQueueName = Text
pJobQueueName_,
$sel:jobQueueArn:JobQueueDetail' :: Text
jobQueueArn = Text
pJobQueueArn_,
$sel:state:JobQueueDetail' :: JQState
state = JQState
pState_,
$sel:priority:JobQueueDetail' :: Int
priority = Int
pPriority_,
$sel:computeEnvironmentOrder:JobQueueDetail' :: [ComputeEnvironmentOrder]
computeEnvironmentOrder = [ComputeEnvironmentOrder]
forall a. Monoid a => a
Prelude.mempty
}
jobQueueDetail_status :: Lens.Lens' JobQueueDetail (Prelude.Maybe JQStatus)
jobQueueDetail_status :: (Maybe JQStatus -> f (Maybe JQStatus))
-> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_status = (JobQueueDetail -> Maybe JQStatus)
-> (JobQueueDetail -> Maybe JQStatus -> JobQueueDetail)
-> Lens
JobQueueDetail JobQueueDetail (Maybe JQStatus) (Maybe JQStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Maybe JQStatus
status :: Maybe JQStatus
$sel:status:JobQueueDetail' :: JobQueueDetail -> Maybe JQStatus
status} -> Maybe JQStatus
status) (\s :: JobQueueDetail
s@JobQueueDetail' {} Maybe JQStatus
a -> JobQueueDetail
s {$sel:status:JobQueueDetail' :: Maybe JQStatus
status = Maybe JQStatus
a} :: JobQueueDetail)
jobQueueDetail_statusReason :: Lens.Lens' JobQueueDetail (Prelude.Maybe Prelude.Text)
jobQueueDetail_statusReason :: (Maybe Text -> f (Maybe Text))
-> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_statusReason = (JobQueueDetail -> Maybe Text)
-> (JobQueueDetail -> Maybe Text -> JobQueueDetail)
-> Lens JobQueueDetail JobQueueDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:JobQueueDetail' :: JobQueueDetail -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: JobQueueDetail
s@JobQueueDetail' {} Maybe Text
a -> JobQueueDetail
s {$sel:statusReason:JobQueueDetail' :: Maybe Text
statusReason = Maybe Text
a} :: JobQueueDetail)
jobQueueDetail_tags :: Lens.Lens' JobQueueDetail (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
jobQueueDetail_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_tags = (JobQueueDetail -> Maybe (HashMap Text Text))
-> (JobQueueDetail -> Maybe (HashMap Text Text) -> JobQueueDetail)
-> Lens
JobQueueDetail
JobQueueDetail
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:JobQueueDetail' :: JobQueueDetail -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: JobQueueDetail
s@JobQueueDetail' {} Maybe (HashMap Text Text)
a -> JobQueueDetail
s {$sel:tags:JobQueueDetail' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: JobQueueDetail) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobQueueDetail -> f JobQueueDetail)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobQueueDetail
-> f JobQueueDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
jobQueueDetail_jobQueueName :: Lens.Lens' JobQueueDetail Prelude.Text
jobQueueDetail_jobQueueName :: (Text -> f Text) -> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_jobQueueName = (JobQueueDetail -> Text)
-> (JobQueueDetail -> Text -> JobQueueDetail)
-> Lens JobQueueDetail JobQueueDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Text
jobQueueName :: Text
$sel:jobQueueName:JobQueueDetail' :: JobQueueDetail -> Text
jobQueueName} -> Text
jobQueueName) (\s :: JobQueueDetail
s@JobQueueDetail' {} Text
a -> JobQueueDetail
s {$sel:jobQueueName:JobQueueDetail' :: Text
jobQueueName = Text
a} :: JobQueueDetail)
jobQueueDetail_jobQueueArn :: Lens.Lens' JobQueueDetail Prelude.Text
jobQueueDetail_jobQueueArn :: (Text -> f Text) -> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_jobQueueArn = (JobQueueDetail -> Text)
-> (JobQueueDetail -> Text -> JobQueueDetail)
-> Lens JobQueueDetail JobQueueDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Text
jobQueueArn :: Text
$sel:jobQueueArn:JobQueueDetail' :: JobQueueDetail -> Text
jobQueueArn} -> Text
jobQueueArn) (\s :: JobQueueDetail
s@JobQueueDetail' {} Text
a -> JobQueueDetail
s {$sel:jobQueueArn:JobQueueDetail' :: Text
jobQueueArn = Text
a} :: JobQueueDetail)
jobQueueDetail_state :: Lens.Lens' JobQueueDetail JQState
jobQueueDetail_state :: (JQState -> f JQState) -> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_state = (JobQueueDetail -> JQState)
-> (JobQueueDetail -> JQState -> JobQueueDetail)
-> Lens JobQueueDetail JobQueueDetail JQState JQState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {JQState
state :: JQState
$sel:state:JobQueueDetail' :: JobQueueDetail -> JQState
state} -> JQState
state) (\s :: JobQueueDetail
s@JobQueueDetail' {} JQState
a -> JobQueueDetail
s {$sel:state:JobQueueDetail' :: JQState
state = JQState
a} :: JobQueueDetail)
jobQueueDetail_priority :: Lens.Lens' JobQueueDetail Prelude.Int
jobQueueDetail_priority :: (Int -> f Int) -> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_priority = (JobQueueDetail -> Int)
-> (JobQueueDetail -> Int -> JobQueueDetail)
-> Lens JobQueueDetail JobQueueDetail Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {Int
priority :: Int
$sel:priority:JobQueueDetail' :: JobQueueDetail -> Int
priority} -> Int
priority) (\s :: JobQueueDetail
s@JobQueueDetail' {} Int
a -> JobQueueDetail
s {$sel:priority:JobQueueDetail' :: Int
priority = Int
a} :: JobQueueDetail)
jobQueueDetail_computeEnvironmentOrder :: Lens.Lens' JobQueueDetail [ComputeEnvironmentOrder]
jobQueueDetail_computeEnvironmentOrder :: ([ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> JobQueueDetail -> f JobQueueDetail
jobQueueDetail_computeEnvironmentOrder = (JobQueueDetail -> [ComputeEnvironmentOrder])
-> (JobQueueDetail -> [ComputeEnvironmentOrder] -> JobQueueDetail)
-> Lens
JobQueueDetail
JobQueueDetail
[ComputeEnvironmentOrder]
[ComputeEnvironmentOrder]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobQueueDetail' {[ComputeEnvironmentOrder]
computeEnvironmentOrder :: [ComputeEnvironmentOrder]
$sel:computeEnvironmentOrder:JobQueueDetail' :: JobQueueDetail -> [ComputeEnvironmentOrder]
computeEnvironmentOrder} -> [ComputeEnvironmentOrder]
computeEnvironmentOrder) (\s :: JobQueueDetail
s@JobQueueDetail' {} [ComputeEnvironmentOrder]
a -> JobQueueDetail
s {$sel:computeEnvironmentOrder:JobQueueDetail' :: [ComputeEnvironmentOrder]
computeEnvironmentOrder = [ComputeEnvironmentOrder]
a} :: JobQueueDetail) (([ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> JobQueueDetail -> f JobQueueDetail)
-> (([ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> [ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> ([ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> JobQueueDetail
-> f JobQueueDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder])
-> [ComputeEnvironmentOrder] -> f [ComputeEnvironmentOrder]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON JobQueueDetail where
parseJSON :: Value -> Parser JobQueueDetail
parseJSON =
String
-> (Object -> Parser JobQueueDetail)
-> Value
-> Parser JobQueueDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobQueueDetail"
( \Object
x ->
Maybe JQStatus
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail
JobQueueDetail'
(Maybe JQStatus
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
-> Parser (Maybe JQStatus)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe JQStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
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
"statusReason")
Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text
-> Text
-> JQState
-> Int
-> [ComputeEnvironmentOrder]
-> JobQueueDetail)
-> Parser Text
-> Parser
(Text
-> JQState -> Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
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
"jobQueueName")
Parser
(Text
-> JQState -> Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
-> Parser Text
-> Parser
(JQState -> Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
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
"jobQueueArn")
Parser
(JQState -> Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
-> Parser JQState
-> Parser (Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser JQState
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"state")
Parser (Int -> [ComputeEnvironmentOrder] -> JobQueueDetail)
-> Parser Int
-> Parser ([ComputeEnvironmentOrder] -> JobQueueDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"priority")
Parser ([ComputeEnvironmentOrder] -> JobQueueDetail)
-> Parser [ComputeEnvironmentOrder] -> Parser JobQueueDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [ComputeEnvironmentOrder])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"computeEnvironmentOrder"
Parser (Maybe [ComputeEnvironmentOrder])
-> [ComputeEnvironmentOrder] -> Parser [ComputeEnvironmentOrder]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [ComputeEnvironmentOrder]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable JobQueueDetail
instance Prelude.NFData JobQueueDetail