{-# 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.Greengrass.CreateGroup
-- 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 group. You may provide the initial version of the group or use
-- \'\'CreateGroupVersion\'\' at a later time. Tip: You can use the
-- \'\'gg_group_setup\'\' package
-- (https:\/\/github.com\/awslabs\/aws-greengrass-group-setup) as a library
-- or command-line application to create and deploy Greengrass groups.
module Amazonka.Greengrass.CreateGroup
  ( -- * Creating a Request
    CreateGroup (..),
    newCreateGroup,

    -- * Request Lenses
    createGroup_amznClientToken,
    createGroup_initialVersion,
    createGroup_tags,
    createGroup_name,

    -- * Destructuring the Response
    CreateGroupResponse (..),
    newCreateGroupResponse,

    -- * Response Lenses
    createGroupResponse_arn,
    createGroupResponse_creationTimestamp,
    createGroupResponse_id,
    createGroupResponse_lastUpdatedTimestamp,
    createGroupResponse_latestVersion,
    createGroupResponse_latestVersionArn,
    createGroupResponse_name,
    createGroupResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateGroup' smart constructor.
data CreateGroup = CreateGroup'
  { -- | A client token used to correlate requests and responses.
    CreateGroup -> Maybe Text
amznClientToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the initial version of the group.
    CreateGroup -> Maybe GroupVersion
initialVersion :: Prelude.Maybe GroupVersion,
    -- | Tag(s) to add to the new resource.
    CreateGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the group.
    CreateGroup -> Text
name :: Prelude.Text
  }
  deriving (CreateGroup -> CreateGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroup -> CreateGroup -> Bool
$c/= :: CreateGroup -> CreateGroup -> Bool
== :: CreateGroup -> CreateGroup -> Bool
$c== :: CreateGroup -> CreateGroup -> Bool
Prelude.Eq, ReadPrec [CreateGroup]
ReadPrec CreateGroup
Int -> ReadS CreateGroup
ReadS [CreateGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroup]
$creadListPrec :: ReadPrec [CreateGroup]
readPrec :: ReadPrec CreateGroup
$creadPrec :: ReadPrec CreateGroup
readList :: ReadS [CreateGroup]
$creadList :: ReadS [CreateGroup]
readsPrec :: Int -> ReadS CreateGroup
$creadsPrec :: Int -> ReadS CreateGroup
Prelude.Read, Int -> CreateGroup -> ShowS
[CreateGroup] -> ShowS
CreateGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroup] -> ShowS
$cshowList :: [CreateGroup] -> ShowS
show :: CreateGroup -> String
$cshow :: CreateGroup -> String
showsPrec :: Int -> CreateGroup -> ShowS
$cshowsPrec :: Int -> CreateGroup -> ShowS
Prelude.Show, forall x. Rep CreateGroup x -> CreateGroup
forall x. CreateGroup -> Rep CreateGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGroup x -> CreateGroup
$cfrom :: forall x. CreateGroup -> Rep CreateGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateGroup' 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:
--
-- 'amznClientToken', 'createGroup_amznClientToken' - A client token used to correlate requests and responses.
--
-- 'initialVersion', 'createGroup_initialVersion' - Information about the initial version of the group.
--
-- 'tags', 'createGroup_tags' - Tag(s) to add to the new resource.
--
-- 'name', 'createGroup_name' - The name of the group.
newCreateGroup ::
  -- | 'name'
  Prelude.Text ->
  CreateGroup
newCreateGroup :: Text -> CreateGroup
newCreateGroup Text
pName_ =
  CreateGroup'
    { $sel:amznClientToken:CreateGroup' :: Maybe Text
amznClientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:initialVersion:CreateGroup' :: Maybe GroupVersion
initialVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateGroup' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateGroup' :: Text
name = Text
pName_
    }

-- | A client token used to correlate requests and responses.
createGroup_amznClientToken :: Lens.Lens' CreateGroup (Prelude.Maybe Prelude.Text)
createGroup_amznClientToken :: Lens' CreateGroup (Maybe Text)
createGroup_amznClientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe Text
amznClientToken :: Maybe Text
$sel:amznClientToken:CreateGroup' :: CreateGroup -> Maybe Text
amznClientToken} -> Maybe Text
amznClientToken) (\s :: CreateGroup
s@CreateGroup' {} Maybe Text
a -> CreateGroup
s {$sel:amznClientToken:CreateGroup' :: Maybe Text
amznClientToken = Maybe Text
a} :: CreateGroup)

-- | Information about the initial version of the group.
createGroup_initialVersion :: Lens.Lens' CreateGroup (Prelude.Maybe GroupVersion)
createGroup_initialVersion :: Lens' CreateGroup (Maybe GroupVersion)
createGroup_initialVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe GroupVersion
initialVersion :: Maybe GroupVersion
$sel:initialVersion:CreateGroup' :: CreateGroup -> Maybe GroupVersion
initialVersion} -> Maybe GroupVersion
initialVersion) (\s :: CreateGroup
s@CreateGroup' {} Maybe GroupVersion
a -> CreateGroup
s {$sel:initialVersion:CreateGroup' :: Maybe GroupVersion
initialVersion = Maybe GroupVersion
a} :: CreateGroup)

-- | Tag(s) to add to the new resource.
createGroup_tags :: Lens.Lens' CreateGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createGroup_tags :: Lens' CreateGroup (Maybe (HashMap Text Text))
createGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateGroup
s@CreateGroup' {} Maybe (HashMap Text Text)
a -> CreateGroup
s {$sel:tags:CreateGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateGroup) 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 group.
createGroup_name :: Lens.Lens' CreateGroup Prelude.Text
createGroup_name :: Lens' CreateGroup Text
createGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Text
name :: Text
$sel:name:CreateGroup' :: CreateGroup -> Text
name} -> Text
name) (\s :: CreateGroup
s@CreateGroup' {} Text
a -> CreateGroup
s {$sel:name:CreateGroup' :: Text
name = Text
a} :: CreateGroup)

instance Core.AWSRequest CreateGroup where
  type AWSResponse CreateGroup = CreateGroupResponse
  request :: (Service -> Service) -> CreateGroup -> Request CreateGroup
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 CreateGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateGroup)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateGroupResponse
CreateGroupResponse'
            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
"CreationTimestamp")
            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
"LastUpdatedTimestamp")
            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
"LatestVersion")
            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
"LatestVersionArn")
            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
"Name")
            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 CreateGroup where
  hashWithSalt :: Int -> CreateGroup -> Int
hashWithSalt Int
_salt CreateGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe GroupVersion
Text
name :: Text
tags :: Maybe (HashMap Text Text)
initialVersion :: Maybe GroupVersion
amznClientToken :: Maybe Text
$sel:name:CreateGroup' :: CreateGroup -> Text
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
$sel:initialVersion:CreateGroup' :: CreateGroup -> Maybe GroupVersion
$sel:amznClientToken:CreateGroup' :: CreateGroup -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
amznClientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GroupVersion
initialVersion
      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 CreateGroup where
  rnf :: CreateGroup -> ()
rnf CreateGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe GroupVersion
Text
name :: Text
tags :: Maybe (HashMap Text Text)
initialVersion :: Maybe GroupVersion
amznClientToken :: Maybe Text
$sel:name:CreateGroup' :: CreateGroup -> Text
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
$sel:initialVersion:CreateGroup' :: CreateGroup -> Maybe GroupVersion
$sel:amznClientToken:CreateGroup' :: CreateGroup -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
amznClientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GroupVersion
initialVersion
      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 CreateGroup where
  toHeaders :: CreateGroup -> ResponseHeaders
toHeaders CreateGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe GroupVersion
Text
name :: Text
tags :: Maybe (HashMap Text Text)
initialVersion :: Maybe GroupVersion
amznClientToken :: Maybe Text
$sel:name:CreateGroup' :: CreateGroup -> Text
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
$sel:initialVersion:CreateGroup' :: CreateGroup -> Maybe GroupVersion
$sel:amznClientToken:CreateGroup' :: CreateGroup -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"X-Amzn-Client-Token" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
amznClientToken,
        HeaderName
"Content-Type"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
      ]

instance Data.ToJSON CreateGroup where
  toJSON :: CreateGroup -> Value
toJSON CreateGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe GroupVersion
Text
name :: Text
tags :: Maybe (HashMap Text Text)
initialVersion :: Maybe GroupVersion
amznClientToken :: Maybe Text
$sel:name:CreateGroup' :: CreateGroup -> Text
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
$sel:initialVersion:CreateGroup' :: CreateGroup -> Maybe GroupVersion
$sel:amznClientToken:CreateGroup' :: CreateGroup -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"InitialVersion" 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 GroupVersion
initialVersion,
            (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 CreateGroup where
  toPath :: CreateGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/greengrass/groups"

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

-- | /See:/ 'newCreateGroupResponse' smart constructor.
data CreateGroupResponse = CreateGroupResponse'
  { -- | The ARN of the definition.
    CreateGroupResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the definition was
    -- created.
    CreateGroupResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
    -- | The ID of the definition.
    CreateGroupResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the definition was last
    -- updated.
    CreateGroupResponse -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text,
    -- | The ID of the latest version associated with the definition.
    CreateGroupResponse -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the latest version associated with the definition.
    CreateGroupResponse -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the definition.
    CreateGroupResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateGroupResponse -> CreateGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroupResponse -> CreateGroupResponse -> Bool
$c/= :: CreateGroupResponse -> CreateGroupResponse -> Bool
== :: CreateGroupResponse -> CreateGroupResponse -> Bool
$c== :: CreateGroupResponse -> CreateGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateGroupResponse]
ReadPrec CreateGroupResponse
Int -> ReadS CreateGroupResponse
ReadS [CreateGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroupResponse]
$creadListPrec :: ReadPrec [CreateGroupResponse]
readPrec :: ReadPrec CreateGroupResponse
$creadPrec :: ReadPrec CreateGroupResponse
readList :: ReadS [CreateGroupResponse]
$creadList :: ReadS [CreateGroupResponse]
readsPrec :: Int -> ReadS CreateGroupResponse
$creadsPrec :: Int -> ReadS CreateGroupResponse
Prelude.Read, Int -> CreateGroupResponse -> ShowS
[CreateGroupResponse] -> ShowS
CreateGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroupResponse] -> ShowS
$cshowList :: [CreateGroupResponse] -> ShowS
show :: CreateGroupResponse -> String
$cshow :: CreateGroupResponse -> String
showsPrec :: Int -> CreateGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateGroupResponse -> ShowS
Prelude.Show, forall x. Rep CreateGroupResponse x -> CreateGroupResponse
forall x. CreateGroupResponse -> Rep CreateGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGroupResponse x -> CreateGroupResponse
$cfrom :: forall x. CreateGroupResponse -> Rep CreateGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateGroupResponse' 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', 'createGroupResponse_arn' - The ARN of the definition.
--
-- 'creationTimestamp', 'createGroupResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the definition was
-- created.
--
-- 'id', 'createGroupResponse_id' - The ID of the definition.
--
-- 'lastUpdatedTimestamp', 'createGroupResponse_lastUpdatedTimestamp' - The time, in milliseconds since the epoch, when the definition was last
-- updated.
--
-- 'latestVersion', 'createGroupResponse_latestVersion' - The ID of the latest version associated with the definition.
--
-- 'latestVersionArn', 'createGroupResponse_latestVersionArn' - The ARN of the latest version associated with the definition.
--
-- 'name', 'createGroupResponse_name' - The name of the definition.
--
-- 'httpStatus', 'createGroupResponse_httpStatus' - The response's http status code.
newCreateGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateGroupResponse
newCreateGroupResponse :: Int -> CreateGroupResponse
newCreateGroupResponse Int
pHttpStatus_ =
  CreateGroupResponse'
    { $sel:arn:CreateGroupResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:CreateGroupResponse' :: Maybe Text
creationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateGroupResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:CreateGroupResponse' :: Maybe Text
lastUpdatedTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersion:CreateGroupResponse' :: Maybe Text
latestVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersionArn:CreateGroupResponse' :: Maybe Text
latestVersionArn = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateGroupResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the definition.
createGroupResponse_arn :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_arn :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:arn:CreateGroupResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateGroupResponse)

-- | The time, in milliseconds since the epoch, when the definition was
-- created.
createGroupResponse_creationTimestamp :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_creationTimestamp :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_creationTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:creationTimestamp:CreateGroupResponse' :: Maybe Text
creationTimestamp = Maybe Text
a} :: CreateGroupResponse)

-- | The ID of the definition.
createGroupResponse_id :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_id :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:id:CreateGroupResponse' :: Maybe Text
id = Maybe Text
a} :: CreateGroupResponse)

-- | The time, in milliseconds since the epoch, when the definition was last
-- updated.
createGroupResponse_lastUpdatedTimestamp :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_lastUpdatedTimestamp :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_lastUpdatedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
lastUpdatedTimestamp :: Maybe Text
$sel:lastUpdatedTimestamp:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
lastUpdatedTimestamp} -> Maybe Text
lastUpdatedTimestamp) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:lastUpdatedTimestamp:CreateGroupResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
a} :: CreateGroupResponse)

-- | The ID of the latest version associated with the definition.
createGroupResponse_latestVersion :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_latestVersion :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_latestVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
latestVersion :: Maybe Text
$sel:latestVersion:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
latestVersion} -> Maybe Text
latestVersion) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:latestVersion:CreateGroupResponse' :: Maybe Text
latestVersion = Maybe Text
a} :: CreateGroupResponse)

-- | The ARN of the latest version associated with the definition.
createGroupResponse_latestVersionArn :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_latestVersionArn :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_latestVersionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
latestVersionArn :: Maybe Text
$sel:latestVersionArn:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
latestVersionArn} -> Maybe Text
latestVersionArn) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:latestVersionArn:CreateGroupResponse' :: Maybe Text
latestVersionArn = Maybe Text
a} :: CreateGroupResponse)

-- | The name of the definition.
createGroupResponse_name :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Prelude.Text)
createGroupResponse_name :: Lens' CreateGroupResponse (Maybe Text)
createGroupResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Text
a -> CreateGroupResponse
s {$sel:name:CreateGroupResponse' :: Maybe Text
name = Maybe Text
a} :: CreateGroupResponse)

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

instance Prelude.NFData CreateGroupResponse where
  rnf :: CreateGroupResponse -> ()
rnf CreateGroupResponse' {Int
Maybe Text
httpStatus :: Int
name :: Maybe Text
latestVersionArn :: Maybe Text
latestVersion :: Maybe Text
lastUpdatedTimestamp :: Maybe Text
id :: Maybe Text
creationTimestamp :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:CreateGroupResponse' :: CreateGroupResponse -> Int
$sel:name:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:latestVersionArn:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:latestVersion:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:lastUpdatedTimestamp:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:id:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:creationTimestamp:CreateGroupResponse' :: CreateGroupResponse -> Maybe Text
$sel:arn:CreateGroupResponse' :: CreateGroupResponse -> 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
creationTimestamp
      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 Text
lastUpdatedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestVersionArn
      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 Int
httpStatus