{-# 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.GetLoggerDefinitionVersion
-- 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 logger definition version.
module Amazonka.Greengrass.GetLoggerDefinitionVersion
  ( -- * Creating a Request
    GetLoggerDefinitionVersion (..),
    newGetLoggerDefinitionVersion,

    -- * Request Lenses
    getLoggerDefinitionVersion_nextToken,
    getLoggerDefinitionVersion_loggerDefinitionVersionId,
    getLoggerDefinitionVersion_loggerDefinitionId,

    -- * Destructuring the Response
    GetLoggerDefinitionVersionResponse (..),
    newGetLoggerDefinitionVersionResponse,

    -- * Response Lenses
    getLoggerDefinitionVersionResponse_definition,
    getLoggerDefinitionVersionResponse_arn,
    getLoggerDefinitionVersionResponse_creationTimestamp,
    getLoggerDefinitionVersionResponse_version,
    getLoggerDefinitionVersionResponse_id,
    getLoggerDefinitionVersionResponse_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:/ 'newGetLoggerDefinitionVersion' smart constructor.
data GetLoggerDefinitionVersion = GetLoggerDefinitionVersion'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    GetLoggerDefinitionVersion -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the logger definition version. This value maps to the
    -- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
    -- object, which is returned by \'\'ListLoggerDefinitionVersions\'\'
    -- requests. If the version is the last one that was associated with a
    -- logger definition, the value also maps to the \'\'LatestVersion\'\'
    -- property of the corresponding \'\'DefinitionInformation\'\' object.
    GetLoggerDefinitionVersion -> Text
loggerDefinitionVersionId :: Prelude.Text,
    -- | The ID of the logger definition.
    GetLoggerDefinitionVersion -> Text
loggerDefinitionId :: Prelude.Text
  }
  deriving (GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool
(GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool)
-> (GetLoggerDefinitionVersion
    -> GetLoggerDefinitionVersion -> Bool)
-> Eq GetLoggerDefinitionVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool
$c/= :: GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool
== :: GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool
$c== :: GetLoggerDefinitionVersion -> GetLoggerDefinitionVersion -> Bool
Prelude.Eq, ReadPrec [GetLoggerDefinitionVersion]
ReadPrec GetLoggerDefinitionVersion
Int -> ReadS GetLoggerDefinitionVersion
ReadS [GetLoggerDefinitionVersion]
(Int -> ReadS GetLoggerDefinitionVersion)
-> ReadS [GetLoggerDefinitionVersion]
-> ReadPrec GetLoggerDefinitionVersion
-> ReadPrec [GetLoggerDefinitionVersion]
-> Read GetLoggerDefinitionVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoggerDefinitionVersion]
$creadListPrec :: ReadPrec [GetLoggerDefinitionVersion]
readPrec :: ReadPrec GetLoggerDefinitionVersion
$creadPrec :: ReadPrec GetLoggerDefinitionVersion
readList :: ReadS [GetLoggerDefinitionVersion]
$creadList :: ReadS [GetLoggerDefinitionVersion]
readsPrec :: Int -> ReadS GetLoggerDefinitionVersion
$creadsPrec :: Int -> ReadS GetLoggerDefinitionVersion
Prelude.Read, Int -> GetLoggerDefinitionVersion -> ShowS
[GetLoggerDefinitionVersion] -> ShowS
GetLoggerDefinitionVersion -> String
(Int -> GetLoggerDefinitionVersion -> ShowS)
-> (GetLoggerDefinitionVersion -> String)
-> ([GetLoggerDefinitionVersion] -> ShowS)
-> Show GetLoggerDefinitionVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoggerDefinitionVersion] -> ShowS
$cshowList :: [GetLoggerDefinitionVersion] -> ShowS
show :: GetLoggerDefinitionVersion -> String
$cshow :: GetLoggerDefinitionVersion -> String
showsPrec :: Int -> GetLoggerDefinitionVersion -> ShowS
$cshowsPrec :: Int -> GetLoggerDefinitionVersion -> ShowS
Prelude.Show, (forall x.
 GetLoggerDefinitionVersion -> Rep GetLoggerDefinitionVersion x)
-> (forall x.
    Rep GetLoggerDefinitionVersion x -> GetLoggerDefinitionVersion)
-> Generic GetLoggerDefinitionVersion
forall x.
Rep GetLoggerDefinitionVersion x -> GetLoggerDefinitionVersion
forall x.
GetLoggerDefinitionVersion -> Rep GetLoggerDefinitionVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLoggerDefinitionVersion x -> GetLoggerDefinitionVersion
$cfrom :: forall x.
GetLoggerDefinitionVersion -> Rep GetLoggerDefinitionVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetLoggerDefinitionVersion' 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:
--
-- 'nextToken', 'getLoggerDefinitionVersion_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'loggerDefinitionVersionId', 'getLoggerDefinitionVersion_loggerDefinitionVersionId' - The ID of the logger definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListLoggerDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a
-- logger definition, the value also maps to the \'\'LatestVersion\'\'
-- property of the corresponding \'\'DefinitionInformation\'\' object.
--
-- 'loggerDefinitionId', 'getLoggerDefinitionVersion_loggerDefinitionId' - The ID of the logger definition.
newGetLoggerDefinitionVersion ::
  -- | 'loggerDefinitionVersionId'
  Prelude.Text ->
  -- | 'loggerDefinitionId'
  Prelude.Text ->
  GetLoggerDefinitionVersion
newGetLoggerDefinitionVersion :: Text -> Text -> GetLoggerDefinitionVersion
newGetLoggerDefinitionVersion
  Text
pLoggerDefinitionVersionId_
  Text
pLoggerDefinitionId_ =
    GetLoggerDefinitionVersion' :: Maybe Text -> Text -> Text -> GetLoggerDefinitionVersion
GetLoggerDefinitionVersion'
      { $sel:nextToken:GetLoggerDefinitionVersion' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:loggerDefinitionVersionId:GetLoggerDefinitionVersion' :: Text
loggerDefinitionVersionId =
          Text
pLoggerDefinitionVersionId_,
        $sel:loggerDefinitionId:GetLoggerDefinitionVersion' :: Text
loggerDefinitionId = Text
pLoggerDefinitionId_
      }

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

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

-- | The ID of the logger definition.
getLoggerDefinitionVersion_loggerDefinitionId :: Lens.Lens' GetLoggerDefinitionVersion Prelude.Text
getLoggerDefinitionVersion_loggerDefinitionId :: (Text -> f Text)
-> GetLoggerDefinitionVersion -> f GetLoggerDefinitionVersion
getLoggerDefinitionVersion_loggerDefinitionId = (GetLoggerDefinitionVersion -> Text)
-> (GetLoggerDefinitionVersion
    -> Text -> GetLoggerDefinitionVersion)
-> Lens
     GetLoggerDefinitionVersion GetLoggerDefinitionVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoggerDefinitionVersion' {Text
loggerDefinitionId :: Text
$sel:loggerDefinitionId:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Text
loggerDefinitionId} -> Text
loggerDefinitionId) (\s :: GetLoggerDefinitionVersion
s@GetLoggerDefinitionVersion' {} Text
a -> GetLoggerDefinitionVersion
s {$sel:loggerDefinitionId:GetLoggerDefinitionVersion' :: Text
loggerDefinitionId = Text
a} :: GetLoggerDefinitionVersion)

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

instance Prelude.NFData GetLoggerDefinitionVersion

instance Core.ToHeaders GetLoggerDefinitionVersion where
  toHeaders :: GetLoggerDefinitionVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetLoggerDefinitionVersion -> 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 GetLoggerDefinitionVersion where
  toPath :: GetLoggerDefinitionVersion -> ByteString
toPath GetLoggerDefinitionVersion' {Maybe Text
Text
loggerDefinitionId :: Text
loggerDefinitionVersionId :: Text
nextToken :: Maybe Text
$sel:loggerDefinitionId:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Text
$sel:loggerDefinitionVersionId:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Text
$sel:nextToken:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/loggers/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
loggerDefinitionId,
        ByteString
"/versions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
loggerDefinitionVersionId
      ]

instance Core.ToQuery GetLoggerDefinitionVersion where
  toQuery :: GetLoggerDefinitionVersion -> QueryString
toQuery GetLoggerDefinitionVersion' {Maybe Text
Text
loggerDefinitionId :: Text
loggerDefinitionVersionId :: Text
nextToken :: Maybe Text
$sel:loggerDefinitionId:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Text
$sel:loggerDefinitionVersionId:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Text
$sel:nextToken:GetLoggerDefinitionVersion' :: GetLoggerDefinitionVersion -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken]

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

-- |
-- Create a value of 'GetLoggerDefinitionVersionResponse' 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', 'getLoggerDefinitionVersionResponse_definition' - Information about the logger definition version.
--
-- 'arn', 'getLoggerDefinitionVersionResponse_arn' - The ARN of the logger definition version.
--
-- 'creationTimestamp', 'getLoggerDefinitionVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the logger definition
-- version was created.
--
-- 'version', 'getLoggerDefinitionVersionResponse_version' - The version of the logger definition version.
--
-- 'id', 'getLoggerDefinitionVersionResponse_id' - The ID of the logger definition version.
--
-- 'httpStatus', 'getLoggerDefinitionVersionResponse_httpStatus' - The response's http status code.
newGetLoggerDefinitionVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetLoggerDefinitionVersionResponse
newGetLoggerDefinitionVersionResponse :: Int -> GetLoggerDefinitionVersionResponse
newGetLoggerDefinitionVersionResponse Int
pHttpStatus_ =
  GetLoggerDefinitionVersionResponse' :: Maybe LoggerDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetLoggerDefinitionVersionResponse
GetLoggerDefinitionVersionResponse'
    { $sel:definition:GetLoggerDefinitionVersionResponse' :: Maybe LoggerDefinitionVersion
definition =
        Maybe LoggerDefinitionVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetLoggerDefinitionVersionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetLoggerDefinitionVersionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetLoggerDefinitionVersionResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetLoggerDefinitionVersionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetLoggerDefinitionVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the logger definition version.
getLoggerDefinitionVersionResponse_definition :: Lens.Lens' GetLoggerDefinitionVersionResponse (Prelude.Maybe LoggerDefinitionVersion)
getLoggerDefinitionVersionResponse_definition :: (Maybe LoggerDefinitionVersion
 -> f (Maybe LoggerDefinitionVersion))
-> GetLoggerDefinitionVersionResponse
-> f GetLoggerDefinitionVersionResponse
getLoggerDefinitionVersionResponse_definition = (GetLoggerDefinitionVersionResponse
 -> Maybe LoggerDefinitionVersion)
-> (GetLoggerDefinitionVersionResponse
    -> Maybe LoggerDefinitionVersion
    -> GetLoggerDefinitionVersionResponse)
-> Lens
     GetLoggerDefinitionVersionResponse
     GetLoggerDefinitionVersionResponse
     (Maybe LoggerDefinitionVersion)
     (Maybe LoggerDefinitionVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoggerDefinitionVersionResponse' {Maybe LoggerDefinitionVersion
definition :: Maybe LoggerDefinitionVersion
$sel:definition:GetLoggerDefinitionVersionResponse' :: GetLoggerDefinitionVersionResponse -> Maybe LoggerDefinitionVersion
definition} -> Maybe LoggerDefinitionVersion
definition) (\s :: GetLoggerDefinitionVersionResponse
s@GetLoggerDefinitionVersionResponse' {} Maybe LoggerDefinitionVersion
a -> GetLoggerDefinitionVersionResponse
s {$sel:definition:GetLoggerDefinitionVersionResponse' :: Maybe LoggerDefinitionVersion
definition = Maybe LoggerDefinitionVersion
a} :: GetLoggerDefinitionVersionResponse)

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

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

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

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

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

instance
  Prelude.NFData
    GetLoggerDefinitionVersionResponse