{-# 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.GetGroupVersion
-- 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)
--
-- Retrieves information about a group version.
module Amazonka.Greengrass.GetGroupVersion
  ( -- * Creating a Request
    GetGroupVersion (..),
    newGetGroupVersion,

    -- * Request Lenses
    getGroupVersion_groupVersionId,
    getGroupVersion_groupId,

    -- * Destructuring the Response
    GetGroupVersionResponse (..),
    newGetGroupVersionResponse,

    -- * Response Lenses
    getGroupVersionResponse_definition,
    getGroupVersionResponse_arn,
    getGroupVersionResponse_creationTimestamp,
    getGroupVersionResponse_version,
    getGroupVersionResponse_id,
    getGroupVersionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetGroupVersion' smart constructor.
data GetGroupVersion = GetGroupVersion'
  { -- | The ID of the group version. This value maps to the \'\'Version\'\'
    -- property of the corresponding \'\'VersionInformation\'\' object, which
    -- is returned by \'\'ListGroupVersions\'\' requests. If the version is the
    -- last one that was associated with a group, the value also maps to the
    -- \'\'LatestVersion\'\' property of the corresponding
    -- \'\'GroupInformation\'\' object.
    GetGroupVersion -> Text
groupVersionId :: Prelude.Text,
    -- | The ID of the Greengrass group.
    GetGroupVersion -> Text
groupId :: Prelude.Text
  }
  deriving (GetGroupVersion -> GetGroupVersion -> Bool
(GetGroupVersion -> GetGroupVersion -> Bool)
-> (GetGroupVersion -> GetGroupVersion -> Bool)
-> Eq GetGroupVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGroupVersion -> GetGroupVersion -> Bool
$c/= :: GetGroupVersion -> GetGroupVersion -> Bool
== :: GetGroupVersion -> GetGroupVersion -> Bool
$c== :: GetGroupVersion -> GetGroupVersion -> Bool
Prelude.Eq, ReadPrec [GetGroupVersion]
ReadPrec GetGroupVersion
Int -> ReadS GetGroupVersion
ReadS [GetGroupVersion]
(Int -> ReadS GetGroupVersion)
-> ReadS [GetGroupVersion]
-> ReadPrec GetGroupVersion
-> ReadPrec [GetGroupVersion]
-> Read GetGroupVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGroupVersion]
$creadListPrec :: ReadPrec [GetGroupVersion]
readPrec :: ReadPrec GetGroupVersion
$creadPrec :: ReadPrec GetGroupVersion
readList :: ReadS [GetGroupVersion]
$creadList :: ReadS [GetGroupVersion]
readsPrec :: Int -> ReadS GetGroupVersion
$creadsPrec :: Int -> ReadS GetGroupVersion
Prelude.Read, Int -> GetGroupVersion -> ShowS
[GetGroupVersion] -> ShowS
GetGroupVersion -> String
(Int -> GetGroupVersion -> ShowS)
-> (GetGroupVersion -> String)
-> ([GetGroupVersion] -> ShowS)
-> Show GetGroupVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGroupVersion] -> ShowS
$cshowList :: [GetGroupVersion] -> ShowS
show :: GetGroupVersion -> String
$cshow :: GetGroupVersion -> String
showsPrec :: Int -> GetGroupVersion -> ShowS
$cshowsPrec :: Int -> GetGroupVersion -> ShowS
Prelude.Show, (forall x. GetGroupVersion -> Rep GetGroupVersion x)
-> (forall x. Rep GetGroupVersion x -> GetGroupVersion)
-> Generic GetGroupVersion
forall x. Rep GetGroupVersion x -> GetGroupVersion
forall x. GetGroupVersion -> Rep GetGroupVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGroupVersion x -> GetGroupVersion
$cfrom :: forall x. GetGroupVersion -> Rep GetGroupVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetGroupVersion' 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:
--
-- 'groupVersionId', 'getGroupVersion_groupVersionId' - The ID of the group version. This value maps to the \'\'Version\'\'
-- property of the corresponding \'\'VersionInformation\'\' object, which
-- is returned by \'\'ListGroupVersions\'\' requests. If the version is the
-- last one that was associated with a group, the value also maps to the
-- \'\'LatestVersion\'\' property of the corresponding
-- \'\'GroupInformation\'\' object.
--
-- 'groupId', 'getGroupVersion_groupId' - The ID of the Greengrass group.
newGetGroupVersion ::
  -- | 'groupVersionId'
  Prelude.Text ->
  -- | 'groupId'
  Prelude.Text ->
  GetGroupVersion
newGetGroupVersion :: Text -> Text -> GetGroupVersion
newGetGroupVersion Text
pGroupVersionId_ Text
pGroupId_ =
  GetGroupVersion' :: Text -> Text -> GetGroupVersion
GetGroupVersion'
    { $sel:groupVersionId:GetGroupVersion' :: Text
groupVersionId = Text
pGroupVersionId_,
      $sel:groupId:GetGroupVersion' :: Text
groupId = Text
pGroupId_
    }

-- | The ID of the group version. This value maps to the \'\'Version\'\'
-- property of the corresponding \'\'VersionInformation\'\' object, which
-- is returned by \'\'ListGroupVersions\'\' requests. If the version is the
-- last one that was associated with a group, the value also maps to the
-- \'\'LatestVersion\'\' property of the corresponding
-- \'\'GroupInformation\'\' object.
getGroupVersion_groupVersionId :: Lens.Lens' GetGroupVersion Prelude.Text
getGroupVersion_groupVersionId :: (Text -> f Text) -> GetGroupVersion -> f GetGroupVersion
getGroupVersion_groupVersionId = (GetGroupVersion -> Text)
-> (GetGroupVersion -> Text -> GetGroupVersion)
-> Lens GetGroupVersion GetGroupVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersion' {Text
groupVersionId :: Text
$sel:groupVersionId:GetGroupVersion' :: GetGroupVersion -> Text
groupVersionId} -> Text
groupVersionId) (\s :: GetGroupVersion
s@GetGroupVersion' {} Text
a -> GetGroupVersion
s {$sel:groupVersionId:GetGroupVersion' :: Text
groupVersionId = Text
a} :: GetGroupVersion)

-- | The ID of the Greengrass group.
getGroupVersion_groupId :: Lens.Lens' GetGroupVersion Prelude.Text
getGroupVersion_groupId :: (Text -> f Text) -> GetGroupVersion -> f GetGroupVersion
getGroupVersion_groupId = (GetGroupVersion -> Text)
-> (GetGroupVersion -> Text -> GetGroupVersion)
-> Lens GetGroupVersion GetGroupVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersion' {Text
groupId :: Text
$sel:groupId:GetGroupVersion' :: GetGroupVersion -> Text
groupId} -> Text
groupId) (\s :: GetGroupVersion
s@GetGroupVersion' {} Text
a -> GetGroupVersion
s {$sel:groupId:GetGroupVersion' :: Text
groupId = Text
a} :: GetGroupVersion)

instance Core.AWSRequest GetGroupVersion where
  type
    AWSResponse GetGroupVersion =
      GetGroupVersionResponse
  request :: GetGroupVersion -> Request GetGroupVersion
request = Service -> GetGroupVersion -> Request GetGroupVersion
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetGroupVersion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetGroupVersion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetGroupVersion))
-> Logger
-> Service
-> Proxy GetGroupVersion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetGroupVersion)))
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 GroupVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetGroupVersionResponse
GetGroupVersionResponse'
            (Maybe GroupVersion
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetGroupVersionResponse)
-> Either String (Maybe GroupVersion)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetGroupVersionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe GroupVersion)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Definition")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetGroupVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> GetGroupVersionResponse)
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
"Arn")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> GetGroupVersionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetGroupVersionResponse)
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
"CreationTimestamp")
            Either
  String (Maybe Text -> Maybe Text -> Int -> GetGroupVersionResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetGroupVersionResponse)
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
"Version")
            Either String (Maybe Text -> Int -> GetGroupVersionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetGroupVersionResponse)
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
"Id")
            Either String (Int -> GetGroupVersionResponse)
-> Either String Int -> Either String GetGroupVersionResponse
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 GetGroupVersion

instance Prelude.NFData GetGroupVersion

instance Core.ToHeaders GetGroupVersion where
  toHeaders :: GetGroupVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetGroupVersion -> 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.ToPath GetGroupVersion where
  toPath :: GetGroupVersion -> ByteString
toPath GetGroupVersion' {Text
groupId :: Text
groupVersionId :: Text
$sel:groupId:GetGroupVersion' :: GetGroupVersion -> Text
$sel:groupVersionId:GetGroupVersion' :: GetGroupVersion -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/groups/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
groupId,
        ByteString
"/versions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
groupVersionId
      ]

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

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

-- |
-- Create a value of 'GetGroupVersionResponse' 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:
--
-- 'definition', 'getGroupVersionResponse_definition' - Information about the group version definition.
--
-- 'arn', 'getGroupVersionResponse_arn' - The ARN of the group version.
--
-- 'creationTimestamp', 'getGroupVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the group version was
-- created.
--
-- 'version', 'getGroupVersionResponse_version' - The ID of the group version.
--
-- 'id', 'getGroupVersionResponse_id' - The ID of the group that the version is associated with.
--
-- 'httpStatus', 'getGroupVersionResponse_httpStatus' - The response's http status code.
newGetGroupVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetGroupVersionResponse
newGetGroupVersionResponse :: Int -> GetGroupVersionResponse
newGetGroupVersionResponse Int
pHttpStatus_ =
  GetGroupVersionResponse' :: Maybe GroupVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetGroupVersionResponse
GetGroupVersionResponse'
    { $sel:definition:GetGroupVersionResponse' :: Maybe GroupVersion
definition =
        Maybe GroupVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetGroupVersionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetGroupVersionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetGroupVersionResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetGroupVersionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetGroupVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the group version definition.
getGroupVersionResponse_definition :: Lens.Lens' GetGroupVersionResponse (Prelude.Maybe GroupVersion)
getGroupVersionResponse_definition :: (Maybe GroupVersion -> f (Maybe GroupVersion))
-> GetGroupVersionResponse -> f GetGroupVersionResponse
getGroupVersionResponse_definition = (GetGroupVersionResponse -> Maybe GroupVersion)
-> (GetGroupVersionResponse
    -> Maybe GroupVersion -> GetGroupVersionResponse)
-> Lens
     GetGroupVersionResponse
     GetGroupVersionResponse
     (Maybe GroupVersion)
     (Maybe GroupVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersionResponse' {Maybe GroupVersion
definition :: Maybe GroupVersion
$sel:definition:GetGroupVersionResponse' :: GetGroupVersionResponse -> Maybe GroupVersion
definition} -> Maybe GroupVersion
definition) (\s :: GetGroupVersionResponse
s@GetGroupVersionResponse' {} Maybe GroupVersion
a -> GetGroupVersionResponse
s {$sel:definition:GetGroupVersionResponse' :: Maybe GroupVersion
definition = Maybe GroupVersion
a} :: GetGroupVersionResponse)

-- | The ARN of the group version.
getGroupVersionResponse_arn :: Lens.Lens' GetGroupVersionResponse (Prelude.Maybe Prelude.Text)
getGroupVersionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> GetGroupVersionResponse -> f GetGroupVersionResponse
getGroupVersionResponse_arn = (GetGroupVersionResponse -> Maybe Text)
-> (GetGroupVersionResponse
    -> Maybe Text -> GetGroupVersionResponse)
-> Lens
     GetGroupVersionResponse
     GetGroupVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetGroupVersionResponse' :: GetGroupVersionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetGroupVersionResponse
s@GetGroupVersionResponse' {} Maybe Text
a -> GetGroupVersionResponse
s {$sel:arn:GetGroupVersionResponse' :: Maybe Text
arn = Maybe Text
a} :: GetGroupVersionResponse)

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

-- | The ID of the group version.
getGroupVersionResponse_version :: Lens.Lens' GetGroupVersionResponse (Prelude.Maybe Prelude.Text)
getGroupVersionResponse_version :: (Maybe Text -> f (Maybe Text))
-> GetGroupVersionResponse -> f GetGroupVersionResponse
getGroupVersionResponse_version = (GetGroupVersionResponse -> Maybe Text)
-> (GetGroupVersionResponse
    -> Maybe Text -> GetGroupVersionResponse)
-> Lens
     GetGroupVersionResponse
     GetGroupVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersionResponse' {Maybe Text
version :: Maybe Text
$sel:version:GetGroupVersionResponse' :: GetGroupVersionResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: GetGroupVersionResponse
s@GetGroupVersionResponse' {} Maybe Text
a -> GetGroupVersionResponse
s {$sel:version:GetGroupVersionResponse' :: Maybe Text
version = Maybe Text
a} :: GetGroupVersionResponse)

-- | The ID of the group that the version is associated with.
getGroupVersionResponse_id :: Lens.Lens' GetGroupVersionResponse (Prelude.Maybe Prelude.Text)
getGroupVersionResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetGroupVersionResponse -> f GetGroupVersionResponse
getGroupVersionResponse_id = (GetGroupVersionResponse -> Maybe Text)
-> (GetGroupVersionResponse
    -> Maybe Text -> GetGroupVersionResponse)
-> Lens
     GetGroupVersionResponse
     GetGroupVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupVersionResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetGroupVersionResponse' :: GetGroupVersionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetGroupVersionResponse
s@GetGroupVersionResponse' {} Maybe Text
a -> GetGroupVersionResponse
s {$sel:id:GetGroupVersionResponse' :: Maybe Text
id = Maybe Text
a} :: GetGroupVersionResponse)

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

instance Prelude.NFData GetGroupVersionResponse