{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.UpdateJobQueue
-- 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)
--
-- Updates a job queue.
module Amazonka.Batch.UpdateJobQueue
  ( -- * Creating a Request
    UpdateJobQueue (..),
    newUpdateJobQueue,

    -- * Request Lenses
    updateJobQueue_state,
    updateJobQueue_priority,
    updateJobQueue_computeEnvironmentOrder,
    updateJobQueue_jobQueue,

    -- * Destructuring the Response
    UpdateJobQueueResponse (..),
    newUpdateJobQueueResponse,

    -- * Response Lenses
    updateJobQueueResponse_jobQueueArn,
    updateJobQueueResponse_jobQueueName,
    updateJobQueueResponse_httpStatus,
  )
where

import Amazonka.Batch.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Contains the parameters for @UpdateJobQueue@.
--
-- /See:/ 'newUpdateJobQueue' smart constructor.
data UpdateJobQueue = UpdateJobQueue'
  { -- | Describes the queue\'s ability to accept new jobs. If the job queue
    -- state is @ENABLED@, it can 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.
    UpdateJobQueue -> Maybe JQState
state :: Prelude.Maybe 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.
    UpdateJobQueue -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
    -- | Details the set of compute environments mapped to a job queue and their
    -- order relative to each other. This is one of the parameters used by the
    -- job scheduler to determine which compute environment should run a given
    -- job. Compute environments must be in the @VALID@ state before you can
    -- associate them with a job queue. 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.
    --
    -- All compute environments that are associated with a job queue must share
    -- the same architecture. Batch doesn\'t support mixing compute environment
    -- architecture types in a single job queue.
    UpdateJobQueue -> Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder :: Prelude.Maybe [ComputeEnvironmentOrder],
    -- | The name or the Amazon Resource Name (ARN) of the job queue.
    UpdateJobQueue -> Text
jobQueue :: Prelude.Text
  }
  deriving (UpdateJobQueue -> UpdateJobQueue -> Bool
(UpdateJobQueue -> UpdateJobQueue -> Bool)
-> (UpdateJobQueue -> UpdateJobQueue -> Bool) -> Eq UpdateJobQueue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobQueue -> UpdateJobQueue -> Bool
$c/= :: UpdateJobQueue -> UpdateJobQueue -> Bool
== :: UpdateJobQueue -> UpdateJobQueue -> Bool
$c== :: UpdateJobQueue -> UpdateJobQueue -> Bool
Prelude.Eq, ReadPrec [UpdateJobQueue]
ReadPrec UpdateJobQueue
Int -> ReadS UpdateJobQueue
ReadS [UpdateJobQueue]
(Int -> ReadS UpdateJobQueue)
-> ReadS [UpdateJobQueue]
-> ReadPrec UpdateJobQueue
-> ReadPrec [UpdateJobQueue]
-> Read UpdateJobQueue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobQueue]
$creadListPrec :: ReadPrec [UpdateJobQueue]
readPrec :: ReadPrec UpdateJobQueue
$creadPrec :: ReadPrec UpdateJobQueue
readList :: ReadS [UpdateJobQueue]
$creadList :: ReadS [UpdateJobQueue]
readsPrec :: Int -> ReadS UpdateJobQueue
$creadsPrec :: Int -> ReadS UpdateJobQueue
Prelude.Read, Int -> UpdateJobQueue -> ShowS
[UpdateJobQueue] -> ShowS
UpdateJobQueue -> String
(Int -> UpdateJobQueue -> ShowS)
-> (UpdateJobQueue -> String)
-> ([UpdateJobQueue] -> ShowS)
-> Show UpdateJobQueue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobQueue] -> ShowS
$cshowList :: [UpdateJobQueue] -> ShowS
show :: UpdateJobQueue -> String
$cshow :: UpdateJobQueue -> String
showsPrec :: Int -> UpdateJobQueue -> ShowS
$cshowsPrec :: Int -> UpdateJobQueue -> ShowS
Prelude.Show, (forall x. UpdateJobQueue -> Rep UpdateJobQueue x)
-> (forall x. Rep UpdateJobQueue x -> UpdateJobQueue)
-> Generic UpdateJobQueue
forall x. Rep UpdateJobQueue x -> UpdateJobQueue
forall x. UpdateJobQueue -> Rep UpdateJobQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJobQueue x -> UpdateJobQueue
$cfrom :: forall x. UpdateJobQueue -> Rep UpdateJobQueue x
Prelude.Generic)

-- |
-- Create a value of 'UpdateJobQueue' 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:
--
-- 'state', 'updateJobQueue_state' - Describes the queue\'s ability to accept new jobs. If the job queue
-- state is @ENABLED@, it can 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', 'updateJobQueue_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', 'updateJobQueue_computeEnvironmentOrder' - Details the set of compute environments mapped to a job queue and their
-- order relative to each other. This is one of the parameters used by the
-- job scheduler to determine which compute environment should run a given
-- job. Compute environments must be in the @VALID@ state before you can
-- associate them with a job queue. 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.
--
-- All compute environments that are associated with a job queue must share
-- the same architecture. Batch doesn\'t support mixing compute environment
-- architecture types in a single job queue.
--
-- 'jobQueue', 'updateJobQueue_jobQueue' - The name or the Amazon Resource Name (ARN) of the job queue.
newUpdateJobQueue ::
  -- | 'jobQueue'
  Prelude.Text ->
  UpdateJobQueue
newUpdateJobQueue :: Text -> UpdateJobQueue
newUpdateJobQueue Text
pJobQueue_ =
  UpdateJobQueue' :: Maybe JQState
-> Maybe Int
-> Maybe [ComputeEnvironmentOrder]
-> Text
-> UpdateJobQueue
UpdateJobQueue'
    { $sel:state:UpdateJobQueue' :: Maybe JQState
state = Maybe JQState
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:UpdateJobQueue' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:computeEnvironmentOrder:UpdateJobQueue' :: Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder = Maybe [ComputeEnvironmentOrder]
forall a. Maybe a
Prelude.Nothing,
      $sel:jobQueue:UpdateJobQueue' :: Text
jobQueue = Text
pJobQueue_
    }

-- | Describes the queue\'s ability to accept new jobs. If the job queue
-- state is @ENABLED@, it can 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.
updateJobQueue_state :: Lens.Lens' UpdateJobQueue (Prelude.Maybe JQState)
updateJobQueue_state :: (Maybe JQState -> f (Maybe JQState))
-> UpdateJobQueue -> f UpdateJobQueue
updateJobQueue_state = (UpdateJobQueue -> Maybe JQState)
-> (UpdateJobQueue -> Maybe JQState -> UpdateJobQueue)
-> Lens
     UpdateJobQueue UpdateJobQueue (Maybe JQState) (Maybe JQState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueue' {Maybe JQState
state :: Maybe JQState
$sel:state:UpdateJobQueue' :: UpdateJobQueue -> Maybe JQState
state} -> Maybe JQState
state) (\s :: UpdateJobQueue
s@UpdateJobQueue' {} Maybe JQState
a -> UpdateJobQueue
s {$sel:state:UpdateJobQueue' :: Maybe JQState
state = Maybe JQState
a} :: UpdateJobQueue)

-- | 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.
updateJobQueue_priority :: Lens.Lens' UpdateJobQueue (Prelude.Maybe Prelude.Int)
updateJobQueue_priority :: (Maybe Int -> f (Maybe Int)) -> UpdateJobQueue -> f UpdateJobQueue
updateJobQueue_priority = (UpdateJobQueue -> Maybe Int)
-> (UpdateJobQueue -> Maybe Int -> UpdateJobQueue)
-> Lens UpdateJobQueue UpdateJobQueue (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueue' {Maybe Int
priority :: Maybe Int
$sel:priority:UpdateJobQueue' :: UpdateJobQueue -> Maybe Int
priority} -> Maybe Int
priority) (\s :: UpdateJobQueue
s@UpdateJobQueue' {} Maybe Int
a -> UpdateJobQueue
s {$sel:priority:UpdateJobQueue' :: Maybe Int
priority = Maybe Int
a} :: UpdateJobQueue)

-- | Details the set of compute environments mapped to a job queue and their
-- order relative to each other. This is one of the parameters used by the
-- job scheduler to determine which compute environment should run a given
-- job. Compute environments must be in the @VALID@ state before you can
-- associate them with a job queue. 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.
--
-- All compute environments that are associated with a job queue must share
-- the same architecture. Batch doesn\'t support mixing compute environment
-- architecture types in a single job queue.
updateJobQueue_computeEnvironmentOrder :: Lens.Lens' UpdateJobQueue (Prelude.Maybe [ComputeEnvironmentOrder])
updateJobQueue_computeEnvironmentOrder :: (Maybe [ComputeEnvironmentOrder]
 -> f (Maybe [ComputeEnvironmentOrder]))
-> UpdateJobQueue -> f UpdateJobQueue
updateJobQueue_computeEnvironmentOrder = (UpdateJobQueue -> Maybe [ComputeEnvironmentOrder])
-> (UpdateJobQueue
    -> Maybe [ComputeEnvironmentOrder] -> UpdateJobQueue)
-> Lens
     UpdateJobQueue
     UpdateJobQueue
     (Maybe [ComputeEnvironmentOrder])
     (Maybe [ComputeEnvironmentOrder])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueue' {Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder :: Maybe [ComputeEnvironmentOrder]
$sel:computeEnvironmentOrder:UpdateJobQueue' :: UpdateJobQueue -> Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder} -> Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder) (\s :: UpdateJobQueue
s@UpdateJobQueue' {} Maybe [ComputeEnvironmentOrder]
a -> UpdateJobQueue
s {$sel:computeEnvironmentOrder:UpdateJobQueue' :: Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder = Maybe [ComputeEnvironmentOrder]
a} :: UpdateJobQueue) ((Maybe [ComputeEnvironmentOrder]
  -> f (Maybe [ComputeEnvironmentOrder]))
 -> UpdateJobQueue -> f UpdateJobQueue)
-> ((Maybe [ComputeEnvironmentOrder]
     -> f (Maybe [ComputeEnvironmentOrder]))
    -> Maybe [ComputeEnvironmentOrder]
    -> f (Maybe [ComputeEnvironmentOrder]))
-> (Maybe [ComputeEnvironmentOrder]
    -> f (Maybe [ComputeEnvironmentOrder]))
-> UpdateJobQueue
-> f UpdateJobQueue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
-> Iso
     (Maybe [ComputeEnvironmentOrder])
     (Maybe [ComputeEnvironmentOrder])
     (Maybe [ComputeEnvironmentOrder])
     (Maybe [ComputeEnvironmentOrder])
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
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
  [ComputeEnvironmentOrder]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name or the Amazon Resource Name (ARN) of the job queue.
updateJobQueue_jobQueue :: Lens.Lens' UpdateJobQueue Prelude.Text
updateJobQueue_jobQueue :: (Text -> f Text) -> UpdateJobQueue -> f UpdateJobQueue
updateJobQueue_jobQueue = (UpdateJobQueue -> Text)
-> (UpdateJobQueue -> Text -> UpdateJobQueue)
-> Lens UpdateJobQueue UpdateJobQueue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueue' {Text
jobQueue :: Text
$sel:jobQueue:UpdateJobQueue' :: UpdateJobQueue -> Text
jobQueue} -> Text
jobQueue) (\s :: UpdateJobQueue
s@UpdateJobQueue' {} Text
a -> UpdateJobQueue
s {$sel:jobQueue:UpdateJobQueue' :: Text
jobQueue = Text
a} :: UpdateJobQueue)

instance Core.AWSRequest UpdateJobQueue where
  type
    AWSResponse UpdateJobQueue =
      UpdateJobQueueResponse
  request :: UpdateJobQueue -> Request UpdateJobQueue
request = Service -> UpdateJobQueue -> Request UpdateJobQueue
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateJobQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJobQueue)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateJobQueue))
-> Logger
-> Service
-> Proxy UpdateJobQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJobQueue)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> UpdateJobQueueResponse
UpdateJobQueueResponse'
            (Maybe Text -> Maybe Text -> Int -> UpdateJobQueueResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateJobQueueResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobQueueArn")
            Either String (Maybe Text -> Int -> UpdateJobQueueResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateJobQueueResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobQueueName")
            Either String (Int -> UpdateJobQueueResponse)
-> Either String Int -> Either String UpdateJobQueueResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateJobQueue

instance Prelude.NFData UpdateJobQueue

instance Core.ToHeaders UpdateJobQueue where
  toHeaders :: UpdateJobQueue -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateJobQueue -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateJobQueue where
  toJSON :: UpdateJobQueue -> Value
toJSON UpdateJobQueue' {Maybe Int
Maybe [ComputeEnvironmentOrder]
Maybe JQState
Text
jobQueue :: Text
computeEnvironmentOrder :: Maybe [ComputeEnvironmentOrder]
priority :: Maybe Int
state :: Maybe JQState
$sel:jobQueue:UpdateJobQueue' :: UpdateJobQueue -> Text
$sel:computeEnvironmentOrder:UpdateJobQueue' :: UpdateJobQueue -> Maybe [ComputeEnvironmentOrder]
$sel:priority:UpdateJobQueue' :: UpdateJobQueue -> Maybe Int
$sel:state:UpdateJobQueue' :: UpdateJobQueue -> Maybe JQState
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"state" Text -> JQState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JQState -> Pair) -> Maybe JQState -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JQState
state,
            (Text
"priority" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
priority,
            (Text
"computeEnvironmentOrder" Text -> [ComputeEnvironmentOrder] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ComputeEnvironmentOrder] -> Pair)
-> Maybe [ComputeEnvironmentOrder] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ComputeEnvironmentOrder]
computeEnvironmentOrder,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"jobQueue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobQueue)
          ]
      )

instance Core.ToPath UpdateJobQueue where
  toPath :: UpdateJobQueue -> ByteString
toPath = ByteString -> UpdateJobQueue -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/updatejobqueue"

instance Core.ToQuery UpdateJobQueue where
  toQuery :: UpdateJobQueue -> QueryString
toQuery = QueryString -> UpdateJobQueue -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateJobQueueResponse' smart constructor.
data UpdateJobQueueResponse = UpdateJobQueueResponse'
  { -- | The Amazon Resource Name (ARN) of the job queue.
    UpdateJobQueueResponse -> Maybe Text
jobQueueArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the job queue.
    UpdateJobQueueResponse -> Maybe Text
jobQueueName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateJobQueueResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool
(UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool)
-> (UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool)
-> Eq UpdateJobQueueResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool
$c/= :: UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool
== :: UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool
$c== :: UpdateJobQueueResponse -> UpdateJobQueueResponse -> Bool
Prelude.Eq, ReadPrec [UpdateJobQueueResponse]
ReadPrec UpdateJobQueueResponse
Int -> ReadS UpdateJobQueueResponse
ReadS [UpdateJobQueueResponse]
(Int -> ReadS UpdateJobQueueResponse)
-> ReadS [UpdateJobQueueResponse]
-> ReadPrec UpdateJobQueueResponse
-> ReadPrec [UpdateJobQueueResponse]
-> Read UpdateJobQueueResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobQueueResponse]
$creadListPrec :: ReadPrec [UpdateJobQueueResponse]
readPrec :: ReadPrec UpdateJobQueueResponse
$creadPrec :: ReadPrec UpdateJobQueueResponse
readList :: ReadS [UpdateJobQueueResponse]
$creadList :: ReadS [UpdateJobQueueResponse]
readsPrec :: Int -> ReadS UpdateJobQueueResponse
$creadsPrec :: Int -> ReadS UpdateJobQueueResponse
Prelude.Read, Int -> UpdateJobQueueResponse -> ShowS
[UpdateJobQueueResponse] -> ShowS
UpdateJobQueueResponse -> String
(Int -> UpdateJobQueueResponse -> ShowS)
-> (UpdateJobQueueResponse -> String)
-> ([UpdateJobQueueResponse] -> ShowS)
-> Show UpdateJobQueueResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobQueueResponse] -> ShowS
$cshowList :: [UpdateJobQueueResponse] -> ShowS
show :: UpdateJobQueueResponse -> String
$cshow :: UpdateJobQueueResponse -> String
showsPrec :: Int -> UpdateJobQueueResponse -> ShowS
$cshowsPrec :: Int -> UpdateJobQueueResponse -> ShowS
Prelude.Show, (forall x. UpdateJobQueueResponse -> Rep UpdateJobQueueResponse x)
-> (forall x.
    Rep UpdateJobQueueResponse x -> UpdateJobQueueResponse)
-> Generic UpdateJobQueueResponse
forall x. Rep UpdateJobQueueResponse x -> UpdateJobQueueResponse
forall x. UpdateJobQueueResponse -> Rep UpdateJobQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJobQueueResponse x -> UpdateJobQueueResponse
$cfrom :: forall x. UpdateJobQueueResponse -> Rep UpdateJobQueueResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateJobQueueResponse' 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:
--
-- 'jobQueueArn', 'updateJobQueueResponse_jobQueueArn' - The Amazon Resource Name (ARN) of the job queue.
--
-- 'jobQueueName', 'updateJobQueueResponse_jobQueueName' - The name of the job queue.
--
-- 'httpStatus', 'updateJobQueueResponse_httpStatus' - The response's http status code.
newUpdateJobQueueResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateJobQueueResponse
newUpdateJobQueueResponse :: Int -> UpdateJobQueueResponse
newUpdateJobQueueResponse Int
pHttpStatus_ =
  UpdateJobQueueResponse' :: Maybe Text -> Maybe Text -> Int -> UpdateJobQueueResponse
UpdateJobQueueResponse'
    { $sel:jobQueueArn:UpdateJobQueueResponse' :: Maybe Text
jobQueueArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobQueueName:UpdateJobQueueResponse' :: Maybe Text
jobQueueName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateJobQueueResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the job queue.
updateJobQueueResponse_jobQueueArn :: Lens.Lens' UpdateJobQueueResponse (Prelude.Maybe Prelude.Text)
updateJobQueueResponse_jobQueueArn :: (Maybe Text -> f (Maybe Text))
-> UpdateJobQueueResponse -> f UpdateJobQueueResponse
updateJobQueueResponse_jobQueueArn = (UpdateJobQueueResponse -> Maybe Text)
-> (UpdateJobQueueResponse -> Maybe Text -> UpdateJobQueueResponse)
-> Lens
     UpdateJobQueueResponse
     UpdateJobQueueResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueueResponse' {Maybe Text
jobQueueArn :: Maybe Text
$sel:jobQueueArn:UpdateJobQueueResponse' :: UpdateJobQueueResponse -> Maybe Text
jobQueueArn} -> Maybe Text
jobQueueArn) (\s :: UpdateJobQueueResponse
s@UpdateJobQueueResponse' {} Maybe Text
a -> UpdateJobQueueResponse
s {$sel:jobQueueArn:UpdateJobQueueResponse' :: Maybe Text
jobQueueArn = Maybe Text
a} :: UpdateJobQueueResponse)

-- | The name of the job queue.
updateJobQueueResponse_jobQueueName :: Lens.Lens' UpdateJobQueueResponse (Prelude.Maybe Prelude.Text)
updateJobQueueResponse_jobQueueName :: (Maybe Text -> f (Maybe Text))
-> UpdateJobQueueResponse -> f UpdateJobQueueResponse
updateJobQueueResponse_jobQueueName = (UpdateJobQueueResponse -> Maybe Text)
-> (UpdateJobQueueResponse -> Maybe Text -> UpdateJobQueueResponse)
-> Lens
     UpdateJobQueueResponse
     UpdateJobQueueResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueueResponse' {Maybe Text
jobQueueName :: Maybe Text
$sel:jobQueueName:UpdateJobQueueResponse' :: UpdateJobQueueResponse -> Maybe Text
jobQueueName} -> Maybe Text
jobQueueName) (\s :: UpdateJobQueueResponse
s@UpdateJobQueueResponse' {} Maybe Text
a -> UpdateJobQueueResponse
s {$sel:jobQueueName:UpdateJobQueueResponse' :: Maybe Text
jobQueueName = Maybe Text
a} :: UpdateJobQueueResponse)

-- | The response's http status code.
updateJobQueueResponse_httpStatus :: Lens.Lens' UpdateJobQueueResponse Prelude.Int
updateJobQueueResponse_httpStatus :: (Int -> f Int)
-> UpdateJobQueueResponse -> f UpdateJobQueueResponse
updateJobQueueResponse_httpStatus = (UpdateJobQueueResponse -> Int)
-> (UpdateJobQueueResponse -> Int -> UpdateJobQueueResponse)
-> Lens UpdateJobQueueResponse UpdateJobQueueResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateJobQueueResponse' :: UpdateJobQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateJobQueueResponse
s@UpdateJobQueueResponse' {} Int
a -> UpdateJobQueueResponse
s {$sel:httpStatus:UpdateJobQueueResponse' :: Int
httpStatus = Int
a} :: UpdateJobQueueResponse)

instance Prelude.NFData UpdateJobQueueResponse