{-# 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.Batch.Types.JobQueueDetail
-- 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.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

-- | An object representing the details of an Batch job queue.
--
-- /See:/ 'newJobQueueDetail' smart constructor.
data JobQueueDetail = JobQueueDetail'
  { -- | The status of the job queue (for example, @CREATING@ or @VALID@).
    JobQueueDetail -> Maybe JQStatus
status :: Prelude.Maybe JQStatus,
    -- | A short, human-readable string to provide additional details about the
    -- current status of the job queue.
    JobQueueDetail -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
    -- | The tags applied to the job queue. For more information, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html Tagging your Batch resources>
    -- in /Batch User Guide/.
    JobQueueDetail -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the job queue.
    JobQueueDetail -> Text
jobQueueName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the job queue.
    JobQueueDetail -> Text
jobQueueArn :: Prelude.Text,
    -- | Describes the ability of the queue to accept new jobs. If the job queue
    -- state is @ENABLED@, it\'s able to accept jobs. If the job queue state is
    -- @DISABLED@, new jobs can\'t be added to the queue, but jobs already in
    -- the queue can finish.
    JobQueueDetail -> JQState
state :: JQState,
    -- | The priority of the job queue. Job queues with a higher priority (or a
    -- higher integer value for the @priority@ parameter) are evaluated first
    -- when associated with the same compute environment. Priority is
    -- determined in descending order, for example, a job queue with a priority
    -- value of @10@ is given scheduling preference over a job queue with a
    -- priority value of @1@. All of the compute environments must be either
    -- EC2 (@EC2@ or @SPOT@) or Fargate (@FARGATE@ or @FARGATE_SPOT@); EC2 and
    -- Fargate compute environments can\'t be mixed.
    JobQueueDetail -> Int
priority :: Prelude.Int,
    -- | The compute environments that are attached to the job queue and the
    -- order that job placement is preferred. Compute environments are selected
    -- for job placement in ascending order.
    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)

-- |
-- Create a value of 'JobQueueDetail' 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', 'jobQueueDetail_status' - The status of the job queue (for example, @CREATING@ or @VALID@).
--
-- 'statusReason', 'jobQueueDetail_statusReason' - A short, human-readable string to provide additional details about the
-- current status of the job queue.
--
-- 'tags', 'jobQueueDetail_tags' - The tags applied to the job queue. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html Tagging your Batch resources>
-- in /Batch User Guide/.
--
-- 'jobQueueName', 'jobQueueDetail_jobQueueName' - The name of the job queue.
--
-- 'jobQueueArn', 'jobQueueDetail_jobQueueArn' - The Amazon Resource Name (ARN) of the job queue.
--
-- 'state', 'jobQueueDetail_state' - Describes the ability of the queue to accept new jobs. If the job queue
-- state is @ENABLED@, it\'s able to accept jobs. If the job queue state is
-- @DISABLED@, new jobs can\'t be added to the queue, but jobs already in
-- the queue can finish.
--
-- 'priority', 'jobQueueDetail_priority' - The priority of the job queue. Job queues with a higher priority (or a
-- higher integer value for the @priority@ parameter) are evaluated first
-- when associated with the same compute environment. Priority is
-- determined in descending order, for example, a job queue with a priority
-- value of @10@ is given scheduling preference over a job queue with a
-- priority value of @1@. All of the compute environments must be either
-- EC2 (@EC2@ or @SPOT@) or Fargate (@FARGATE@ or @FARGATE_SPOT@); EC2 and
-- Fargate compute environments can\'t be mixed.
--
-- 'computeEnvironmentOrder', 'jobQueueDetail_computeEnvironmentOrder' - The compute environments that are attached to the job queue and the
-- order that job placement is preferred. Compute environments are selected
-- for job placement in ascending order.
newJobQueueDetail ::
  -- | 'jobQueueName'
  Prelude.Text ->
  -- | 'jobQueueArn'
  Prelude.Text ->
  -- | 'state'
  JQState ->
  -- | 'priority'
  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
      }

-- | The status of the job queue (for example, @CREATING@ or @VALID@).
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)

-- | A short, human-readable string to provide additional details about the
-- current status of the job queue.
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)

-- | The tags applied to the job queue. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html Tagging your Batch resources>
-- in /Batch User Guide/.
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

-- | The name of the job queue.
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)

-- | The Amazon Resource Name (ARN) of the job queue.
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)

-- | Describes the ability of the queue to accept new jobs. If the job queue
-- state is @ENABLED@, it\'s able to accept jobs. If the job queue state is
-- @DISABLED@, new jobs can\'t be added to the queue, but jobs already in
-- the queue can finish.
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)

-- | The priority of the job queue. Job queues with a higher priority (or a
-- higher integer value for the @priority@ parameter) are evaluated first
-- when associated with the same compute environment. Priority is
-- determined in descending order, for example, a job queue with a priority
-- value of @10@ is given scheduling preference over a job queue with a
-- priority value of @1@. All of the compute environments must be either
-- EC2 (@EC2@ or @SPOT@) or Fargate (@FARGATE@ or @FARGATE_SPOT@); EC2 and
-- Fargate compute environments can\'t be mixed.
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)

-- | The compute environments that are attached to the job queue and the
-- order that job placement is preferred. Compute environments are selected
-- for job placement in ascending order.
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