{-# 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.Omics.CreateRunGroup
-- 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 a run group.
module Amazonka.Omics.CreateRunGroup
  ( -- * Creating a Request
    CreateRunGroup (..),
    newCreateRunGroup,

    -- * Request Lenses
    createRunGroup_maxCpus,
    createRunGroup_maxDuration,
    createRunGroup_maxRuns,
    createRunGroup_name,
    createRunGroup_tags,
    createRunGroup_requestId,

    -- * Destructuring the Response
    CreateRunGroupResponse (..),
    newCreateRunGroupResponse,

    -- * Response Lenses
    createRunGroupResponse_arn,
    createRunGroupResponse_id,
    createRunGroupResponse_tags,
    createRunGroupResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateRunGroup' smart constructor.
data CreateRunGroup = CreateRunGroup'
  { -- | The maximum number of CPUs to use in the group.
    CreateRunGroup -> Maybe Natural
maxCpus :: Prelude.Maybe Prelude.Natural,
    -- | A max duration for the group.
    CreateRunGroup -> Maybe Natural
maxDuration :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of concurrent runs for the group.
    CreateRunGroup -> Maybe Natural
maxRuns :: Prelude.Maybe Prelude.Natural,
    -- | A name for the group.
    CreateRunGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Tags for the group.
    CreateRunGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A request ID for the group.
    CreateRunGroup -> Text
requestId :: Prelude.Text
  }
  deriving (CreateRunGroup -> CreateRunGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRunGroup -> CreateRunGroup -> Bool
$c/= :: CreateRunGroup -> CreateRunGroup -> Bool
== :: CreateRunGroup -> CreateRunGroup -> Bool
$c== :: CreateRunGroup -> CreateRunGroup -> Bool
Prelude.Eq, ReadPrec [CreateRunGroup]
ReadPrec CreateRunGroup
Int -> ReadS CreateRunGroup
ReadS [CreateRunGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRunGroup]
$creadListPrec :: ReadPrec [CreateRunGroup]
readPrec :: ReadPrec CreateRunGroup
$creadPrec :: ReadPrec CreateRunGroup
readList :: ReadS [CreateRunGroup]
$creadList :: ReadS [CreateRunGroup]
readsPrec :: Int -> ReadS CreateRunGroup
$creadsPrec :: Int -> ReadS CreateRunGroup
Prelude.Read, Int -> CreateRunGroup -> ShowS
[CreateRunGroup] -> ShowS
CreateRunGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRunGroup] -> ShowS
$cshowList :: [CreateRunGroup] -> ShowS
show :: CreateRunGroup -> String
$cshow :: CreateRunGroup -> String
showsPrec :: Int -> CreateRunGroup -> ShowS
$cshowsPrec :: Int -> CreateRunGroup -> ShowS
Prelude.Show, forall x. Rep CreateRunGroup x -> CreateRunGroup
forall x. CreateRunGroup -> Rep CreateRunGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRunGroup x -> CreateRunGroup
$cfrom :: forall x. CreateRunGroup -> Rep CreateRunGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateRunGroup' 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:
--
-- 'maxCpus', 'createRunGroup_maxCpus' - The maximum number of CPUs to use in the group.
--
-- 'maxDuration', 'createRunGroup_maxDuration' - A max duration for the group.
--
-- 'maxRuns', 'createRunGroup_maxRuns' - The maximum number of concurrent runs for the group.
--
-- 'name', 'createRunGroup_name' - A name for the group.
--
-- 'tags', 'createRunGroup_tags' - Tags for the group.
--
-- 'requestId', 'createRunGroup_requestId' - A request ID for the group.
newCreateRunGroup ::
  -- | 'requestId'
  Prelude.Text ->
  CreateRunGroup
newCreateRunGroup :: Text -> CreateRunGroup
newCreateRunGroup Text
pRequestId_ =
  CreateRunGroup'
    { $sel:maxCpus:CreateRunGroup' :: Maybe Natural
maxCpus = forall a. Maybe a
Prelude.Nothing,
      $sel:maxDuration:CreateRunGroup' :: Maybe Natural
maxDuration = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRuns:CreateRunGroup' :: Maybe Natural
maxRuns = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateRunGroup' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRunGroup' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:CreateRunGroup' :: Text
requestId = Text
pRequestId_
    }

-- | The maximum number of CPUs to use in the group.
createRunGroup_maxCpus :: Lens.Lens' CreateRunGroup (Prelude.Maybe Prelude.Natural)
createRunGroup_maxCpus :: Lens' CreateRunGroup (Maybe Natural)
createRunGroup_maxCpus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Maybe Natural
maxCpus :: Maybe Natural
$sel:maxCpus:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
maxCpus} -> Maybe Natural
maxCpus) (\s :: CreateRunGroup
s@CreateRunGroup' {} Maybe Natural
a -> CreateRunGroup
s {$sel:maxCpus:CreateRunGroup' :: Maybe Natural
maxCpus = Maybe Natural
a} :: CreateRunGroup)

-- | A max duration for the group.
createRunGroup_maxDuration :: Lens.Lens' CreateRunGroup (Prelude.Maybe Prelude.Natural)
createRunGroup_maxDuration :: Lens' CreateRunGroup (Maybe Natural)
createRunGroup_maxDuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Maybe Natural
maxDuration :: Maybe Natural
$sel:maxDuration:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
maxDuration} -> Maybe Natural
maxDuration) (\s :: CreateRunGroup
s@CreateRunGroup' {} Maybe Natural
a -> CreateRunGroup
s {$sel:maxDuration:CreateRunGroup' :: Maybe Natural
maxDuration = Maybe Natural
a} :: CreateRunGroup)

-- | The maximum number of concurrent runs for the group.
createRunGroup_maxRuns :: Lens.Lens' CreateRunGroup (Prelude.Maybe Prelude.Natural)
createRunGroup_maxRuns :: Lens' CreateRunGroup (Maybe Natural)
createRunGroup_maxRuns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Maybe Natural
maxRuns :: Maybe Natural
$sel:maxRuns:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
maxRuns} -> Maybe Natural
maxRuns) (\s :: CreateRunGroup
s@CreateRunGroup' {} Maybe Natural
a -> CreateRunGroup
s {$sel:maxRuns:CreateRunGroup' :: Maybe Natural
maxRuns = Maybe Natural
a} :: CreateRunGroup)

-- | A name for the group.
createRunGroup_name :: Lens.Lens' CreateRunGroup (Prelude.Maybe Prelude.Text)
createRunGroup_name :: Lens' CreateRunGroup (Maybe Text)
createRunGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Maybe Text
name :: Maybe Text
$sel:name:CreateRunGroup' :: CreateRunGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateRunGroup
s@CreateRunGroup' {} Maybe Text
a -> CreateRunGroup
s {$sel:name:CreateRunGroup' :: Maybe Text
name = Maybe Text
a} :: CreateRunGroup)

-- | Tags for the group.
createRunGroup_tags :: Lens.Lens' CreateRunGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRunGroup_tags :: Lens' CreateRunGroup (Maybe (HashMap Text Text))
createRunGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRunGroup' :: CreateRunGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRunGroup
s@CreateRunGroup' {} Maybe (HashMap Text Text)
a -> CreateRunGroup
s {$sel:tags:CreateRunGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRunGroup) 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

-- | A request ID for the group.
createRunGroup_requestId :: Lens.Lens' CreateRunGroup Prelude.Text
createRunGroup_requestId :: Lens' CreateRunGroup Text
createRunGroup_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroup' {Text
requestId :: Text
$sel:requestId:CreateRunGroup' :: CreateRunGroup -> Text
requestId} -> Text
requestId) (\s :: CreateRunGroup
s@CreateRunGroup' {} Text
a -> CreateRunGroup
s {$sel:requestId:CreateRunGroup' :: Text
requestId = Text
a} :: CreateRunGroup)

instance Core.AWSRequest CreateRunGroup where
  type
    AWSResponse CreateRunGroup =
      CreateRunGroupResponse
  request :: (Service -> Service) -> CreateRunGroup -> Request CreateRunGroup
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 CreateRunGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRunGroup)))
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 ->
          Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRunGroupResponse
CreateRunGroupResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (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 -> Either String (Maybe a)
Data..?> Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => 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))
      )

instance Prelude.Hashable CreateRunGroup where
  hashWithSalt :: Int -> CreateRunGroup -> Int
hashWithSalt Int
_salt CreateRunGroup' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
requestId :: Text
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
maxRuns :: Maybe Natural
maxDuration :: Maybe Natural
maxCpus :: Maybe Natural
$sel:requestId:CreateRunGroup' :: CreateRunGroup -> Text
$sel:tags:CreateRunGroup' :: CreateRunGroup -> Maybe (HashMap Text Text)
$sel:name:CreateRunGroup' :: CreateRunGroup -> Maybe Text
$sel:maxRuns:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxDuration:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxCpus:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxCpus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxDuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxRuns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
requestId

instance Prelude.NFData CreateRunGroup where
  rnf :: CreateRunGroup -> ()
rnf CreateRunGroup' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
requestId :: Text
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
maxRuns :: Maybe Natural
maxDuration :: Maybe Natural
maxCpus :: Maybe Natural
$sel:requestId:CreateRunGroup' :: CreateRunGroup -> Text
$sel:tags:CreateRunGroup' :: CreateRunGroup -> Maybe (HashMap Text Text)
$sel:name:CreateRunGroup' :: CreateRunGroup -> Maybe Text
$sel:maxRuns:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxDuration:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxCpus:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxCpus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxDuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxRuns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      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
requestId

instance Data.ToHeaders CreateRunGroup where
  toHeaders :: CreateRunGroup -> 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 CreateRunGroup where
  toJSON :: CreateRunGroup -> Value
toJSON CreateRunGroup' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
requestId :: Text
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
maxRuns :: Maybe Natural
maxDuration :: Maybe Natural
maxCpus :: Maybe Natural
$sel:requestId:CreateRunGroup' :: CreateRunGroup -> Text
$sel:tags:CreateRunGroup' :: CreateRunGroup -> Maybe (HashMap Text Text)
$sel:name:CreateRunGroup' :: CreateRunGroup -> Maybe Text
$sel:maxRuns:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxDuration:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
$sel:maxCpus:CreateRunGroup' :: CreateRunGroup -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"maxCpus" 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 Natural
maxCpus,
            (Key
"maxDuration" 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 Natural
maxDuration,
            (Key
"maxRuns" 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 Natural
maxRuns,
            (Key
"name" 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 Text
name,
            (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
"requestId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
requestId)
          ]
      )

instance Data.ToPath CreateRunGroup where
  toPath :: CreateRunGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/runGroup"

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

-- | /See:/ 'newCreateRunGroupResponse' smart constructor.
data CreateRunGroupResponse = CreateRunGroupResponse'
  { -- | The group\'s ARN.
    CreateRunGroupResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The group\'s ID.
    CreateRunGroupResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Tags for the run group.
    CreateRunGroupResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateRunGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRunGroupResponse -> CreateRunGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRunGroupResponse -> CreateRunGroupResponse -> Bool
$c/= :: CreateRunGroupResponse -> CreateRunGroupResponse -> Bool
== :: CreateRunGroupResponse -> CreateRunGroupResponse -> Bool
$c== :: CreateRunGroupResponse -> CreateRunGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateRunGroupResponse]
ReadPrec CreateRunGroupResponse
Int -> ReadS CreateRunGroupResponse
ReadS [CreateRunGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRunGroupResponse]
$creadListPrec :: ReadPrec [CreateRunGroupResponse]
readPrec :: ReadPrec CreateRunGroupResponse
$creadPrec :: ReadPrec CreateRunGroupResponse
readList :: ReadS [CreateRunGroupResponse]
$creadList :: ReadS [CreateRunGroupResponse]
readsPrec :: Int -> ReadS CreateRunGroupResponse
$creadsPrec :: Int -> ReadS CreateRunGroupResponse
Prelude.Read, Int -> CreateRunGroupResponse -> ShowS
[CreateRunGroupResponse] -> ShowS
CreateRunGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRunGroupResponse] -> ShowS
$cshowList :: [CreateRunGroupResponse] -> ShowS
show :: CreateRunGroupResponse -> String
$cshow :: CreateRunGroupResponse -> String
showsPrec :: Int -> CreateRunGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateRunGroupResponse -> ShowS
Prelude.Show, forall x. Rep CreateRunGroupResponse x -> CreateRunGroupResponse
forall x. CreateRunGroupResponse -> Rep CreateRunGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRunGroupResponse x -> CreateRunGroupResponse
$cfrom :: forall x. CreateRunGroupResponse -> Rep CreateRunGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRunGroupResponse' 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:
--
-- 'arn', 'createRunGroupResponse_arn' - The group\'s ARN.
--
-- 'id', 'createRunGroupResponse_id' - The group\'s ID.
--
-- 'tags', 'createRunGroupResponse_tags' - Tags for the run group.
--
-- 'httpStatus', 'createRunGroupResponse_httpStatus' - The response's http status code.
newCreateRunGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRunGroupResponse
newCreateRunGroupResponse :: Int -> CreateRunGroupResponse
newCreateRunGroupResponse Int
pHttpStatus_ =
  CreateRunGroupResponse'
    { $sel:arn:CreateRunGroupResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateRunGroupResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRunGroupResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRunGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The group\'s ARN.
createRunGroupResponse_arn :: Lens.Lens' CreateRunGroupResponse (Prelude.Maybe Prelude.Text)
createRunGroupResponse_arn :: Lens' CreateRunGroupResponse (Maybe Text)
createRunGroupResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroupResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateRunGroupResponse' :: CreateRunGroupResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateRunGroupResponse
s@CreateRunGroupResponse' {} Maybe Text
a -> CreateRunGroupResponse
s {$sel:arn:CreateRunGroupResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateRunGroupResponse)

-- | The group\'s ID.
createRunGroupResponse_id :: Lens.Lens' CreateRunGroupResponse (Prelude.Maybe Prelude.Text)
createRunGroupResponse_id :: Lens' CreateRunGroupResponse (Maybe Text)
createRunGroupResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroupResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateRunGroupResponse' :: CreateRunGroupResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateRunGroupResponse
s@CreateRunGroupResponse' {} Maybe Text
a -> CreateRunGroupResponse
s {$sel:id:CreateRunGroupResponse' :: Maybe Text
id = Maybe Text
a} :: CreateRunGroupResponse)

-- | Tags for the run group.
createRunGroupResponse_tags :: Lens.Lens' CreateRunGroupResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRunGroupResponse_tags :: Lens' CreateRunGroupResponse (Maybe (HashMap Text Text))
createRunGroupResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroupResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRunGroupResponse' :: CreateRunGroupResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRunGroupResponse
s@CreateRunGroupResponse' {} Maybe (HashMap Text Text)
a -> CreateRunGroupResponse
s {$sel:tags:CreateRunGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRunGroupResponse) 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 response's http status code.
createRunGroupResponse_httpStatus :: Lens.Lens' CreateRunGroupResponse Prelude.Int
createRunGroupResponse_httpStatus :: Lens' CreateRunGroupResponse Int
createRunGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRunGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRunGroupResponse' :: CreateRunGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRunGroupResponse
s@CreateRunGroupResponse' {} Int
a -> CreateRunGroupResponse
s {$sel:httpStatus:CreateRunGroupResponse' :: Int
httpStatus = Int
a} :: CreateRunGroupResponse)

instance Prelude.NFData CreateRunGroupResponse where
  rnf :: CreateRunGroupResponse -> ()
rnf CreateRunGroupResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
id :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:CreateRunGroupResponse' :: CreateRunGroupResponse -> Int
$sel:tags:CreateRunGroupResponse' :: CreateRunGroupResponse -> Maybe (HashMap Text Text)
$sel:id:CreateRunGroupResponse' :: CreateRunGroupResponse -> Maybe Text
$sel:arn:CreateRunGroupResponse' :: CreateRunGroupResponse -> 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 Text
id
      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 Int
httpStatus