{-# 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.GetCoreDefinitionVersion
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves information about a core definition version.
module Amazonka.Greengrass.GetCoreDefinitionVersion
  ( -- * Creating a Request
    GetCoreDefinitionVersion (..),
    newGetCoreDefinitionVersion,

    -- * Request Lenses
    getCoreDefinitionVersion_coreDefinitionId,
    getCoreDefinitionVersion_coreDefinitionVersionId,

    -- * Destructuring the Response
    GetCoreDefinitionVersionResponse (..),
    newGetCoreDefinitionVersionResponse,

    -- * Response Lenses
    getCoreDefinitionVersionResponse_arn,
    getCoreDefinitionVersionResponse_creationTimestamp,
    getCoreDefinitionVersionResponse_definition,
    getCoreDefinitionVersionResponse_id,
    getCoreDefinitionVersionResponse_nextToken,
    getCoreDefinitionVersionResponse_version,
    getCoreDefinitionVersionResponse_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:/ 'newGetCoreDefinitionVersion' smart constructor.
data GetCoreDefinitionVersion = GetCoreDefinitionVersion'
  { -- | The ID of the core definition.
    GetCoreDefinitionVersion -> Text
coreDefinitionId :: Prelude.Text,
    -- | The ID of the core definition version. This value maps to the
    -- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
    -- object, which is returned by \'\'ListCoreDefinitionVersions\'\'
    -- requests. If the version is the last one that was associated with a core
    -- definition, the value also maps to the \'\'LatestVersion\'\' property of
    -- the corresponding \'\'DefinitionInformation\'\' object.
    GetCoreDefinitionVersion -> Text
coreDefinitionVersionId :: Prelude.Text
  }
  deriving (GetCoreDefinitionVersion -> GetCoreDefinitionVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCoreDefinitionVersion -> GetCoreDefinitionVersion -> Bool
$c/= :: GetCoreDefinitionVersion -> GetCoreDefinitionVersion -> Bool
== :: GetCoreDefinitionVersion -> GetCoreDefinitionVersion -> Bool
$c== :: GetCoreDefinitionVersion -> GetCoreDefinitionVersion -> Bool
Prelude.Eq, ReadPrec [GetCoreDefinitionVersion]
ReadPrec GetCoreDefinitionVersion
Int -> ReadS GetCoreDefinitionVersion
ReadS [GetCoreDefinitionVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCoreDefinitionVersion]
$creadListPrec :: ReadPrec [GetCoreDefinitionVersion]
readPrec :: ReadPrec GetCoreDefinitionVersion
$creadPrec :: ReadPrec GetCoreDefinitionVersion
readList :: ReadS [GetCoreDefinitionVersion]
$creadList :: ReadS [GetCoreDefinitionVersion]
readsPrec :: Int -> ReadS GetCoreDefinitionVersion
$creadsPrec :: Int -> ReadS GetCoreDefinitionVersion
Prelude.Read, Int -> GetCoreDefinitionVersion -> ShowS
[GetCoreDefinitionVersion] -> ShowS
GetCoreDefinitionVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCoreDefinitionVersion] -> ShowS
$cshowList :: [GetCoreDefinitionVersion] -> ShowS
show :: GetCoreDefinitionVersion -> String
$cshow :: GetCoreDefinitionVersion -> String
showsPrec :: Int -> GetCoreDefinitionVersion -> ShowS
$cshowsPrec :: Int -> GetCoreDefinitionVersion -> ShowS
Prelude.Show, forall x.
Rep GetCoreDefinitionVersion x -> GetCoreDefinitionVersion
forall x.
GetCoreDefinitionVersion -> Rep GetCoreDefinitionVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCoreDefinitionVersion x -> GetCoreDefinitionVersion
$cfrom :: forall x.
GetCoreDefinitionVersion -> Rep GetCoreDefinitionVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetCoreDefinitionVersion' 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:
--
-- 'coreDefinitionId', 'getCoreDefinitionVersion_coreDefinitionId' - The ID of the core definition.
--
-- 'coreDefinitionVersionId', 'getCoreDefinitionVersion_coreDefinitionVersionId' - The ID of the core definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListCoreDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a core
-- definition, the value also maps to the \'\'LatestVersion\'\' property of
-- the corresponding \'\'DefinitionInformation\'\' object.
newGetCoreDefinitionVersion ::
  -- | 'coreDefinitionId'
  Prelude.Text ->
  -- | 'coreDefinitionVersionId'
  Prelude.Text ->
  GetCoreDefinitionVersion
newGetCoreDefinitionVersion :: Text -> Text -> GetCoreDefinitionVersion
newGetCoreDefinitionVersion
  Text
pCoreDefinitionId_
  Text
pCoreDefinitionVersionId_ =
    GetCoreDefinitionVersion'
      { $sel:coreDefinitionId:GetCoreDefinitionVersion' :: Text
coreDefinitionId =
          Text
pCoreDefinitionId_,
        $sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: Text
coreDefinitionVersionId =
          Text
pCoreDefinitionVersionId_
      }

-- | The ID of the core definition.
getCoreDefinitionVersion_coreDefinitionId :: Lens.Lens' GetCoreDefinitionVersion Prelude.Text
getCoreDefinitionVersion_coreDefinitionId :: Lens' GetCoreDefinitionVersion Text
getCoreDefinitionVersion_coreDefinitionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCoreDefinitionVersion' {Text
coreDefinitionId :: Text
$sel:coreDefinitionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
coreDefinitionId} -> Text
coreDefinitionId) (\s :: GetCoreDefinitionVersion
s@GetCoreDefinitionVersion' {} Text
a -> GetCoreDefinitionVersion
s {$sel:coreDefinitionId:GetCoreDefinitionVersion' :: Text
coreDefinitionId = Text
a} :: GetCoreDefinitionVersion)

-- | The ID of the core definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListCoreDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a core
-- definition, the value also maps to the \'\'LatestVersion\'\' property of
-- the corresponding \'\'DefinitionInformation\'\' object.
getCoreDefinitionVersion_coreDefinitionVersionId :: Lens.Lens' GetCoreDefinitionVersion Prelude.Text
getCoreDefinitionVersion_coreDefinitionVersionId :: Lens' GetCoreDefinitionVersion Text
getCoreDefinitionVersion_coreDefinitionVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCoreDefinitionVersion' {Text
coreDefinitionVersionId :: Text
$sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
coreDefinitionVersionId} -> Text
coreDefinitionVersionId) (\s :: GetCoreDefinitionVersion
s@GetCoreDefinitionVersion' {} Text
a -> GetCoreDefinitionVersion
s {$sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: Text
coreDefinitionVersionId = Text
a} :: GetCoreDefinitionVersion)

instance Core.AWSRequest GetCoreDefinitionVersion where
  type
    AWSResponse GetCoreDefinitionVersion =
      GetCoreDefinitionVersionResponse
  request :: (Service -> Service)
-> GetCoreDefinitionVersion -> Request GetCoreDefinitionVersion
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetCoreDefinitionVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetCoreDefinitionVersion)))
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 CoreDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetCoreDefinitionVersionResponse
GetCoreDefinitionVersionResponse'
            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
"Definition")
            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
"NextToken")
            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
"Version")
            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 GetCoreDefinitionVersion where
  hashWithSalt :: Int -> GetCoreDefinitionVersion -> Int
hashWithSalt Int
_salt GetCoreDefinitionVersion' {Text
coreDefinitionVersionId :: Text
coreDefinitionId :: Text
$sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
$sel:coreDefinitionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
coreDefinitionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
coreDefinitionVersionId

instance Prelude.NFData GetCoreDefinitionVersion where
  rnf :: GetCoreDefinitionVersion -> ()
rnf GetCoreDefinitionVersion' {Text
coreDefinitionVersionId :: Text
coreDefinitionId :: Text
$sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
$sel:coreDefinitionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
coreDefinitionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
coreDefinitionVersionId

instance Data.ToHeaders GetCoreDefinitionVersion where
  toHeaders :: GetCoreDefinitionVersion -> 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.ToPath GetCoreDefinitionVersion where
  toPath :: GetCoreDefinitionVersion -> ByteString
toPath GetCoreDefinitionVersion' {Text
coreDefinitionVersionId :: Text
coreDefinitionId :: Text
$sel:coreDefinitionVersionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
$sel:coreDefinitionId:GetCoreDefinitionVersion' :: GetCoreDefinitionVersion -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/cores/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
coreDefinitionId,
        ByteString
"/versions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
coreDefinitionVersionId
      ]

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

-- | /See:/ 'newGetCoreDefinitionVersionResponse' smart constructor.
data GetCoreDefinitionVersionResponse = GetCoreDefinitionVersionResponse'
  { -- | The ARN of the core definition version.
    GetCoreDefinitionVersionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the core definition
    -- version was created.
    GetCoreDefinitionVersionResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
    -- | Information about the core definition version.
    GetCoreDefinitionVersionResponse -> Maybe CoreDefinitionVersion
definition :: Prelude.Maybe CoreDefinitionVersion,
    -- | The ID of the core definition version.
    GetCoreDefinitionVersionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    GetCoreDefinitionVersionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The version of the core definition version.
    GetCoreDefinitionVersionResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCoreDefinitionVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetCoreDefinitionVersionResponse
-> GetCoreDefinitionVersionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCoreDefinitionVersionResponse
-> GetCoreDefinitionVersionResponse -> Bool
$c/= :: GetCoreDefinitionVersionResponse
-> GetCoreDefinitionVersionResponse -> Bool
== :: GetCoreDefinitionVersionResponse
-> GetCoreDefinitionVersionResponse -> Bool
$c== :: GetCoreDefinitionVersionResponse
-> GetCoreDefinitionVersionResponse -> Bool
Prelude.Eq, ReadPrec [GetCoreDefinitionVersionResponse]
ReadPrec GetCoreDefinitionVersionResponse
Int -> ReadS GetCoreDefinitionVersionResponse
ReadS [GetCoreDefinitionVersionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCoreDefinitionVersionResponse]
$creadListPrec :: ReadPrec [GetCoreDefinitionVersionResponse]
readPrec :: ReadPrec GetCoreDefinitionVersionResponse
$creadPrec :: ReadPrec GetCoreDefinitionVersionResponse
readList :: ReadS [GetCoreDefinitionVersionResponse]
$creadList :: ReadS [GetCoreDefinitionVersionResponse]
readsPrec :: Int -> ReadS GetCoreDefinitionVersionResponse
$creadsPrec :: Int -> ReadS GetCoreDefinitionVersionResponse
Prelude.Read, Int -> GetCoreDefinitionVersionResponse -> ShowS
[GetCoreDefinitionVersionResponse] -> ShowS
GetCoreDefinitionVersionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCoreDefinitionVersionResponse] -> ShowS
$cshowList :: [GetCoreDefinitionVersionResponse] -> ShowS
show :: GetCoreDefinitionVersionResponse -> String
$cshow :: GetCoreDefinitionVersionResponse -> String
showsPrec :: Int -> GetCoreDefinitionVersionResponse -> ShowS
$cshowsPrec :: Int -> GetCoreDefinitionVersionResponse -> ShowS
Prelude.Show, forall x.
Rep GetCoreDefinitionVersionResponse x
-> GetCoreDefinitionVersionResponse
forall x.
GetCoreDefinitionVersionResponse
-> Rep GetCoreDefinitionVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCoreDefinitionVersionResponse x
-> GetCoreDefinitionVersionResponse
$cfrom :: forall x.
GetCoreDefinitionVersionResponse
-> Rep GetCoreDefinitionVersionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetCoreDefinitionVersionResponse' 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', 'getCoreDefinitionVersionResponse_arn' - The ARN of the core definition version.
--
-- 'creationTimestamp', 'getCoreDefinitionVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the core definition
-- version was created.
--
-- 'definition', 'getCoreDefinitionVersionResponse_definition' - Information about the core definition version.
--
-- 'id', 'getCoreDefinitionVersionResponse_id' - The ID of the core definition version.
--
-- 'nextToken', 'getCoreDefinitionVersionResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'version', 'getCoreDefinitionVersionResponse_version' - The version of the core definition version.
--
-- 'httpStatus', 'getCoreDefinitionVersionResponse_httpStatus' - The response's http status code.
newGetCoreDefinitionVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCoreDefinitionVersionResponse
newGetCoreDefinitionVersionResponse :: Int -> GetCoreDefinitionVersionResponse
newGetCoreDefinitionVersionResponse Int
pHttpStatus_ =
  GetCoreDefinitionVersionResponse'
    { $sel:arn:GetCoreDefinitionVersionResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetCoreDefinitionVersionResponse' :: Maybe Text
creationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:definition:GetCoreDefinitionVersionResponse' :: Maybe CoreDefinitionVersion
definition = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetCoreDefinitionVersionResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetCoreDefinitionVersionResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetCoreDefinitionVersionResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetCoreDefinitionVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | Information about the core definition version.
getCoreDefinitionVersionResponse_definition :: Lens.Lens' GetCoreDefinitionVersionResponse (Prelude.Maybe CoreDefinitionVersion)
getCoreDefinitionVersionResponse_definition :: Lens'
  GetCoreDefinitionVersionResponse (Maybe CoreDefinitionVersion)
getCoreDefinitionVersionResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCoreDefinitionVersionResponse' {Maybe CoreDefinitionVersion
definition :: Maybe CoreDefinitionVersion
$sel:definition:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe CoreDefinitionVersion
definition} -> Maybe CoreDefinitionVersion
definition) (\s :: GetCoreDefinitionVersionResponse
s@GetCoreDefinitionVersionResponse' {} Maybe CoreDefinitionVersion
a -> GetCoreDefinitionVersionResponse
s {$sel:definition:GetCoreDefinitionVersionResponse' :: Maybe CoreDefinitionVersion
definition = Maybe CoreDefinitionVersion
a} :: GetCoreDefinitionVersionResponse)

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

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
getCoreDefinitionVersionResponse_nextToken :: Lens.Lens' GetCoreDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getCoreDefinitionVersionResponse_nextToken :: Lens' GetCoreDefinitionVersionResponse (Maybe Text)
getCoreDefinitionVersionResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCoreDefinitionVersionResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCoreDefinitionVersionResponse
s@GetCoreDefinitionVersionResponse' {} Maybe Text
a -> GetCoreDefinitionVersionResponse
s {$sel:nextToken:GetCoreDefinitionVersionResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetCoreDefinitionVersionResponse)

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

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

instance
  Prelude.NFData
    GetCoreDefinitionVersionResponse
  where
  rnf :: GetCoreDefinitionVersionResponse -> ()
rnf GetCoreDefinitionVersionResponse' {Int
Maybe Text
Maybe CoreDefinitionVersion
httpStatus :: Int
version :: Maybe Text
nextToken :: Maybe Text
id :: Maybe Text
definition :: Maybe CoreDefinitionVersion
creationTimestamp :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Int
$sel:version:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe Text
$sel:nextToken:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe Text
$sel:id:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe Text
$sel:definition:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe CoreDefinitionVersion
$sel:creationTimestamp:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> Maybe Text
$sel:arn:GetCoreDefinitionVersionResponse' :: GetCoreDefinitionVersionResponse -> 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 CoreDefinitionVersion
definition
      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
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus