{-# 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.CreateSchedulingPolicy
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Batch scheduling policy.
module Amazonka.Batch.CreateSchedulingPolicy
  ( -- * Creating a Request
    CreateSchedulingPolicy (..),
    newCreateSchedulingPolicy,

    -- * Request Lenses
    createSchedulingPolicy_fairsharePolicy,
    createSchedulingPolicy_tags,
    createSchedulingPolicy_name,

    -- * Destructuring the Response
    CreateSchedulingPolicyResponse (..),
    newCreateSchedulingPolicyResponse,

    -- * Response Lenses
    createSchedulingPolicyResponse_httpStatus,
    createSchedulingPolicyResponse_name,
    createSchedulingPolicyResponse_arn,
  )
where

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

-- | Contains the parameters for @CreateSchedulingPolicy@.
--
-- /See:/ 'newCreateSchedulingPolicy' smart constructor.
data CreateSchedulingPolicy = CreateSchedulingPolicy'
  { -- | The fair share policy of the scheduling policy.
    CreateSchedulingPolicy -> Maybe FairsharePolicy
fairsharePolicy :: Prelude.Maybe FairsharePolicy,
    -- | The tags that you apply to the scheduling policy to help you categorize
    -- and organize your resources. Each tag consists of a key and an optional
    -- value. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
    -- in /Amazon Web Services General Reference/.
    --
    -- These tags can be updated or removed using the
    -- <https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html TagResource>
    -- and
    -- <https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html UntagResource>
    -- API operations.
    CreateSchedulingPolicy -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the scheduling policy. It can be up to 128 letters long. It
    -- can contain uppercase and lowercase letters, numbers, hyphens (-), and
    -- underscores (_).
    CreateSchedulingPolicy -> Text
name :: Prelude.Text
  }
  deriving (CreateSchedulingPolicy -> CreateSchedulingPolicy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSchedulingPolicy -> CreateSchedulingPolicy -> Bool
$c/= :: CreateSchedulingPolicy -> CreateSchedulingPolicy -> Bool
== :: CreateSchedulingPolicy -> CreateSchedulingPolicy -> Bool
$c== :: CreateSchedulingPolicy -> CreateSchedulingPolicy -> Bool
Prelude.Eq, ReadPrec [CreateSchedulingPolicy]
ReadPrec CreateSchedulingPolicy
Int -> ReadS CreateSchedulingPolicy
ReadS [CreateSchedulingPolicy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSchedulingPolicy]
$creadListPrec :: ReadPrec [CreateSchedulingPolicy]
readPrec :: ReadPrec CreateSchedulingPolicy
$creadPrec :: ReadPrec CreateSchedulingPolicy
readList :: ReadS [CreateSchedulingPolicy]
$creadList :: ReadS [CreateSchedulingPolicy]
readsPrec :: Int -> ReadS CreateSchedulingPolicy
$creadsPrec :: Int -> ReadS CreateSchedulingPolicy
Prelude.Read, Int -> CreateSchedulingPolicy -> ShowS
[CreateSchedulingPolicy] -> ShowS
CreateSchedulingPolicy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSchedulingPolicy] -> ShowS
$cshowList :: [CreateSchedulingPolicy] -> ShowS
show :: CreateSchedulingPolicy -> String
$cshow :: CreateSchedulingPolicy -> String
showsPrec :: Int -> CreateSchedulingPolicy -> ShowS
$cshowsPrec :: Int -> CreateSchedulingPolicy -> ShowS
Prelude.Show, forall x. Rep CreateSchedulingPolicy x -> CreateSchedulingPolicy
forall x. CreateSchedulingPolicy -> Rep CreateSchedulingPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSchedulingPolicy x -> CreateSchedulingPolicy
$cfrom :: forall x. CreateSchedulingPolicy -> Rep CreateSchedulingPolicy x
Prelude.Generic)

-- |
-- Create a value of 'CreateSchedulingPolicy' 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:
--
-- 'fairsharePolicy', 'createSchedulingPolicy_fairsharePolicy' - The fair share policy of the scheduling policy.
--
-- 'tags', 'createSchedulingPolicy_tags' - The tags that you apply to the scheduling policy to help you categorize
-- and organize your resources. Each tag consists of a key and an optional
-- value. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- in /Amazon Web Services General Reference/.
--
-- These tags can be updated or removed using the
-- <https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html TagResource>
-- and
-- <https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html UntagResource>
-- API operations.
--
-- 'name', 'createSchedulingPolicy_name' - The name of the scheduling policy. It can be up to 128 letters long. It
-- can contain uppercase and lowercase letters, numbers, hyphens (-), and
-- underscores (_).
newCreateSchedulingPolicy ::
  -- | 'name'
  Prelude.Text ->
  CreateSchedulingPolicy
newCreateSchedulingPolicy :: Text -> CreateSchedulingPolicy
newCreateSchedulingPolicy Text
pName_ =
  CreateSchedulingPolicy'
    { $sel:fairsharePolicy:CreateSchedulingPolicy' :: Maybe FairsharePolicy
fairsharePolicy =
        forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateSchedulingPolicy' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateSchedulingPolicy' :: Text
name = Text
pName_
    }

-- | The fair share policy of the scheduling policy.
createSchedulingPolicy_fairsharePolicy :: Lens.Lens' CreateSchedulingPolicy (Prelude.Maybe FairsharePolicy)
createSchedulingPolicy_fairsharePolicy :: Lens' CreateSchedulingPolicy (Maybe FairsharePolicy)
createSchedulingPolicy_fairsharePolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchedulingPolicy' {Maybe FairsharePolicy
fairsharePolicy :: Maybe FairsharePolicy
$sel:fairsharePolicy:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe FairsharePolicy
fairsharePolicy} -> Maybe FairsharePolicy
fairsharePolicy) (\s :: CreateSchedulingPolicy
s@CreateSchedulingPolicy' {} Maybe FairsharePolicy
a -> CreateSchedulingPolicy
s {$sel:fairsharePolicy:CreateSchedulingPolicy' :: Maybe FairsharePolicy
fairsharePolicy = Maybe FairsharePolicy
a} :: CreateSchedulingPolicy)

-- | The tags that you apply to the scheduling policy to help you categorize
-- and organize your resources. Each tag consists of a key and an optional
-- value. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- in /Amazon Web Services General Reference/.
--
-- These tags can be updated or removed using the
-- <https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html TagResource>
-- and
-- <https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html UntagResource>
-- API operations.
createSchedulingPolicy_tags :: Lens.Lens' CreateSchedulingPolicy (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSchedulingPolicy_tags :: Lens' CreateSchedulingPolicy (Maybe (HashMap Text Text))
createSchedulingPolicy_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchedulingPolicy' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateSchedulingPolicy
s@CreateSchedulingPolicy' {} Maybe (HashMap Text Text)
a -> CreateSchedulingPolicy
s {$sel:tags:CreateSchedulingPolicy' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateSchedulingPolicy) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the scheduling policy. It can be up to 128 letters long. It
-- can contain uppercase and lowercase letters, numbers, hyphens (-), and
-- underscores (_).
createSchedulingPolicy_name :: Lens.Lens' CreateSchedulingPolicy Prelude.Text
createSchedulingPolicy_name :: Lens' CreateSchedulingPolicy Text
createSchedulingPolicy_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchedulingPolicy' {Text
name :: Text
$sel:name:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Text
name} -> Text
name) (\s :: CreateSchedulingPolicy
s@CreateSchedulingPolicy' {} Text
a -> CreateSchedulingPolicy
s {$sel:name:CreateSchedulingPolicy' :: Text
name = Text
a} :: CreateSchedulingPolicy)

instance Core.AWSRequest CreateSchedulingPolicy where
  type
    AWSResponse CreateSchedulingPolicy =
      CreateSchedulingPolicyResponse
  request :: (Service -> Service)
-> CreateSchedulingPolicy -> Request CreateSchedulingPolicy
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateSchedulingPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSchedulingPolicy)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> Text -> Text -> CreateSchedulingPolicyResponse
CreateSchedulingPolicyResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"arn")
      )

instance Prelude.Hashable CreateSchedulingPolicy where
  hashWithSalt :: Int -> CreateSchedulingPolicy -> Int
hashWithSalt Int
_salt CreateSchedulingPolicy' {Maybe (HashMap Text Text)
Maybe FairsharePolicy
Text
name :: Text
tags :: Maybe (HashMap Text Text)
fairsharePolicy :: Maybe FairsharePolicy
$sel:name:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Text
$sel:tags:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe (HashMap Text Text)
$sel:fairsharePolicy:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe FairsharePolicy
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FairsharePolicy
fairsharePolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData CreateSchedulingPolicy where
  rnf :: CreateSchedulingPolicy -> ()
rnf CreateSchedulingPolicy' {Maybe (HashMap Text Text)
Maybe FairsharePolicy
Text
name :: Text
tags :: Maybe (HashMap Text Text)
fairsharePolicy :: Maybe FairsharePolicy
$sel:name:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Text
$sel:tags:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe (HashMap Text Text)
$sel:fairsharePolicy:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe FairsharePolicy
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe FairsharePolicy
fairsharePolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

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

instance Data.ToJSON CreateSchedulingPolicy where
  toJSON :: CreateSchedulingPolicy -> Value
toJSON CreateSchedulingPolicy' {Maybe (HashMap Text Text)
Maybe FairsharePolicy
Text
name :: Text
tags :: Maybe (HashMap Text Text)
fairsharePolicy :: Maybe FairsharePolicy
$sel:name:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Text
$sel:tags:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe (HashMap Text Text)
$sel:fairsharePolicy:CreateSchedulingPolicy' :: CreateSchedulingPolicy -> Maybe FairsharePolicy
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"fairsharePolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FairsharePolicy
fairsharePolicy,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

instance Data.ToPath CreateSchedulingPolicy where
  toPath :: CreateSchedulingPolicy -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/createschedulingpolicy"

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

-- | /See:/ 'newCreateSchedulingPolicyResponse' smart constructor.
data CreateSchedulingPolicyResponse = CreateSchedulingPolicyResponse'
  { -- | The response's http status code.
    CreateSchedulingPolicyResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the scheduling policy.
    CreateSchedulingPolicyResponse -> Text
name :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the scheduling policy. The format is
    -- @aws:@/@Partition@/@:batch:@/@Region@/@:@/@Account@/@:scheduling-policy\/@/@Name@/@ @.
    -- For example,
    -- @aws:aws:batch:us-west-2:123456789012:scheduling-policy\/MySchedulingPolicy@.
    CreateSchedulingPolicyResponse -> Text
arn :: Prelude.Text
  }
  deriving (CreateSchedulingPolicyResponse
-> CreateSchedulingPolicyResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSchedulingPolicyResponse
-> CreateSchedulingPolicyResponse -> Bool
$c/= :: CreateSchedulingPolicyResponse
-> CreateSchedulingPolicyResponse -> Bool
== :: CreateSchedulingPolicyResponse
-> CreateSchedulingPolicyResponse -> Bool
$c== :: CreateSchedulingPolicyResponse
-> CreateSchedulingPolicyResponse -> Bool
Prelude.Eq, ReadPrec [CreateSchedulingPolicyResponse]
ReadPrec CreateSchedulingPolicyResponse
Int -> ReadS CreateSchedulingPolicyResponse
ReadS [CreateSchedulingPolicyResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSchedulingPolicyResponse]
$creadListPrec :: ReadPrec [CreateSchedulingPolicyResponse]
readPrec :: ReadPrec CreateSchedulingPolicyResponse
$creadPrec :: ReadPrec CreateSchedulingPolicyResponse
readList :: ReadS [CreateSchedulingPolicyResponse]
$creadList :: ReadS [CreateSchedulingPolicyResponse]
readsPrec :: Int -> ReadS CreateSchedulingPolicyResponse
$creadsPrec :: Int -> ReadS CreateSchedulingPolicyResponse
Prelude.Read, Int -> CreateSchedulingPolicyResponse -> ShowS
[CreateSchedulingPolicyResponse] -> ShowS
CreateSchedulingPolicyResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSchedulingPolicyResponse] -> ShowS
$cshowList :: [CreateSchedulingPolicyResponse] -> ShowS
show :: CreateSchedulingPolicyResponse -> String
$cshow :: CreateSchedulingPolicyResponse -> String
showsPrec :: Int -> CreateSchedulingPolicyResponse -> ShowS
$cshowsPrec :: Int -> CreateSchedulingPolicyResponse -> ShowS
Prelude.Show, forall x.
Rep CreateSchedulingPolicyResponse x
-> CreateSchedulingPolicyResponse
forall x.
CreateSchedulingPolicyResponse
-> Rep CreateSchedulingPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSchedulingPolicyResponse x
-> CreateSchedulingPolicyResponse
$cfrom :: forall x.
CreateSchedulingPolicyResponse
-> Rep CreateSchedulingPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSchedulingPolicyResponse' 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:
--
-- 'httpStatus', 'createSchedulingPolicyResponse_httpStatus' - The response's http status code.
--
-- 'name', 'createSchedulingPolicyResponse_name' - The name of the scheduling policy.
--
-- 'arn', 'createSchedulingPolicyResponse_arn' - The Amazon Resource Name (ARN) of the scheduling policy. The format is
-- @aws:@/@Partition@/@:batch:@/@Region@/@:@/@Account@/@:scheduling-policy\/@/@Name@/@ @.
-- For example,
-- @aws:aws:batch:us-west-2:123456789012:scheduling-policy\/MySchedulingPolicy@.
newCreateSchedulingPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  CreateSchedulingPolicyResponse
newCreateSchedulingPolicyResponse :: Int -> Text -> Text -> CreateSchedulingPolicyResponse
newCreateSchedulingPolicyResponse
  Int
pHttpStatus_
  Text
pName_
  Text
pArn_ =
    CreateSchedulingPolicyResponse'
      { $sel:httpStatus:CreateSchedulingPolicyResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:name:CreateSchedulingPolicyResponse' :: Text
name = Text
pName_,
        $sel:arn:CreateSchedulingPolicyResponse' :: Text
arn = Text
pArn_
      }

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

-- | The name of the scheduling policy.
createSchedulingPolicyResponse_name :: Lens.Lens' CreateSchedulingPolicyResponse Prelude.Text
createSchedulingPolicyResponse_name :: Lens' CreateSchedulingPolicyResponse Text
createSchedulingPolicyResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchedulingPolicyResponse' {Text
name :: Text
$sel:name:CreateSchedulingPolicyResponse' :: CreateSchedulingPolicyResponse -> Text
name} -> Text
name) (\s :: CreateSchedulingPolicyResponse
s@CreateSchedulingPolicyResponse' {} Text
a -> CreateSchedulingPolicyResponse
s {$sel:name:CreateSchedulingPolicyResponse' :: Text
name = Text
a} :: CreateSchedulingPolicyResponse)

-- | The Amazon Resource Name (ARN) of the scheduling policy. The format is
-- @aws:@/@Partition@/@:batch:@/@Region@/@:@/@Account@/@:scheduling-policy\/@/@Name@/@ @.
-- For example,
-- @aws:aws:batch:us-west-2:123456789012:scheduling-policy\/MySchedulingPolicy@.
createSchedulingPolicyResponse_arn :: Lens.Lens' CreateSchedulingPolicyResponse Prelude.Text
createSchedulingPolicyResponse_arn :: Lens' CreateSchedulingPolicyResponse Text
createSchedulingPolicyResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchedulingPolicyResponse' {Text
arn :: Text
$sel:arn:CreateSchedulingPolicyResponse' :: CreateSchedulingPolicyResponse -> Text
arn} -> Text
arn) (\s :: CreateSchedulingPolicyResponse
s@CreateSchedulingPolicyResponse' {} Text
a -> CreateSchedulingPolicyResponse
s {$sel:arn:CreateSchedulingPolicyResponse' :: Text
arn = Text
a} :: CreateSchedulingPolicyResponse)

instance
  Prelude.NFData
    CreateSchedulingPolicyResponse
  where
  rnf :: CreateSchedulingPolicyResponse -> ()
rnf CreateSchedulingPolicyResponse' {Int
Text
arn :: Text
name :: Text
httpStatus :: Int
$sel:arn:CreateSchedulingPolicyResponse' :: CreateSchedulingPolicyResponse -> Text
$sel:name:CreateSchedulingPolicyResponse' :: CreateSchedulingPolicyResponse -> Text
$sel:httpStatus:CreateSchedulingPolicyResponse' :: CreateSchedulingPolicyResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn