{-# 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.GetLoggerDefinition
-- 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.
module Amazonka.Greengrass.GetLoggerDefinition
  ( -- * Creating a Request
    GetLoggerDefinition (..),
    newGetLoggerDefinition,

    -- * Request Lenses
    getLoggerDefinition_loggerDefinitionId,

    -- * Destructuring the Response
    GetLoggerDefinitionResponse (..),
    newGetLoggerDefinitionResponse,

    -- * Response Lenses
    getLoggerDefinitionResponse_latestVersionArn,
    getLoggerDefinitionResponse_arn,
    getLoggerDefinitionResponse_name,
    getLoggerDefinitionResponse_creationTimestamp,
    getLoggerDefinitionResponse_id,
    getLoggerDefinitionResponse_latestVersion,
    getLoggerDefinitionResponse_lastUpdatedTimestamp,
    getLoggerDefinitionResponse_tags,
    getLoggerDefinitionResponse_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:/ 'newGetLoggerDefinition' smart constructor.
data GetLoggerDefinition = GetLoggerDefinition'
  { -- | The ID of the logger definition.
    GetLoggerDefinition -> Text
loggerDefinitionId :: Prelude.Text
  }
  deriving (GetLoggerDefinition -> GetLoggerDefinition -> Bool
(GetLoggerDefinition -> GetLoggerDefinition -> Bool)
-> (GetLoggerDefinition -> GetLoggerDefinition -> Bool)
-> Eq GetLoggerDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoggerDefinition -> GetLoggerDefinition -> Bool
$c/= :: GetLoggerDefinition -> GetLoggerDefinition -> Bool
== :: GetLoggerDefinition -> GetLoggerDefinition -> Bool
$c== :: GetLoggerDefinition -> GetLoggerDefinition -> Bool
Prelude.Eq, ReadPrec [GetLoggerDefinition]
ReadPrec GetLoggerDefinition
Int -> ReadS GetLoggerDefinition
ReadS [GetLoggerDefinition]
(Int -> ReadS GetLoggerDefinition)
-> ReadS [GetLoggerDefinition]
-> ReadPrec GetLoggerDefinition
-> ReadPrec [GetLoggerDefinition]
-> Read GetLoggerDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoggerDefinition]
$creadListPrec :: ReadPrec [GetLoggerDefinition]
readPrec :: ReadPrec GetLoggerDefinition
$creadPrec :: ReadPrec GetLoggerDefinition
readList :: ReadS [GetLoggerDefinition]
$creadList :: ReadS [GetLoggerDefinition]
readsPrec :: Int -> ReadS GetLoggerDefinition
$creadsPrec :: Int -> ReadS GetLoggerDefinition
Prelude.Read, Int -> GetLoggerDefinition -> ShowS
[GetLoggerDefinition] -> ShowS
GetLoggerDefinition -> String
(Int -> GetLoggerDefinition -> ShowS)
-> (GetLoggerDefinition -> String)
-> ([GetLoggerDefinition] -> ShowS)
-> Show GetLoggerDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoggerDefinition] -> ShowS
$cshowList :: [GetLoggerDefinition] -> ShowS
show :: GetLoggerDefinition -> String
$cshow :: GetLoggerDefinition -> String
showsPrec :: Int -> GetLoggerDefinition -> ShowS
$cshowsPrec :: Int -> GetLoggerDefinition -> ShowS
Prelude.Show, (forall x. GetLoggerDefinition -> Rep GetLoggerDefinition x)
-> (forall x. Rep GetLoggerDefinition x -> GetLoggerDefinition)
-> Generic GetLoggerDefinition
forall x. Rep GetLoggerDefinition x -> GetLoggerDefinition
forall x. GetLoggerDefinition -> Rep GetLoggerDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLoggerDefinition x -> GetLoggerDefinition
$cfrom :: forall x. GetLoggerDefinition -> Rep GetLoggerDefinition x
Prelude.Generic)

-- |
-- Create a value of 'GetLoggerDefinition' 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:
--
-- 'loggerDefinitionId', 'getLoggerDefinition_loggerDefinitionId' - The ID of the logger definition.
newGetLoggerDefinition ::
  -- | 'loggerDefinitionId'
  Prelude.Text ->
  GetLoggerDefinition
newGetLoggerDefinition :: Text -> GetLoggerDefinition
newGetLoggerDefinition Text
pLoggerDefinitionId_ =
  GetLoggerDefinition' :: Text -> GetLoggerDefinition
GetLoggerDefinition'
    { $sel:loggerDefinitionId:GetLoggerDefinition' :: Text
loggerDefinitionId =
        Text
pLoggerDefinitionId_
    }

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

instance Core.AWSRequest GetLoggerDefinition where
  type
    AWSResponse GetLoggerDefinition =
      GetLoggerDefinitionResponse
  request :: GetLoggerDefinition -> Request GetLoggerDefinition
request = Service -> GetLoggerDefinition -> Request GetLoggerDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetLoggerDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetLoggerDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetLoggerDefinition))
-> Logger
-> Service
-> Proxy GetLoggerDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetLoggerDefinition)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetLoggerDefinitionResponse
GetLoggerDefinitionResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetLoggerDefinitionResponse)
forall (f :: * -> *) a b. Functor 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
"LatestVersionArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetLoggerDefinitionResponse)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetLoggerDefinitionResponse)
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
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetLoggerDefinitionResponse)
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
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetLoggerDefinitionResponse)
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
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> GetLoggerDefinitionResponse)
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
"LatestVersion")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> GetLoggerDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> GetLoggerDefinitionResponse)
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
"LastUpdatedTimestamp")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> GetLoggerDefinitionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetLoggerDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetLoggerDefinitionResponse)
-> Either String Int -> Either String GetLoggerDefinitionResponse
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 GetLoggerDefinition

instance Prelude.NFData GetLoggerDefinition

instance Core.ToHeaders GetLoggerDefinition where
  toHeaders :: GetLoggerDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetLoggerDefinition -> 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 GetLoggerDefinition where
  toPath :: GetLoggerDefinition -> ByteString
toPath GetLoggerDefinition' {Text
loggerDefinitionId :: Text
$sel:loggerDefinitionId:GetLoggerDefinition' :: GetLoggerDefinition -> 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
      ]

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

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

-- |
-- Create a value of 'GetLoggerDefinitionResponse' 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:
--
-- 'latestVersionArn', 'getLoggerDefinitionResponse_latestVersionArn' - The ARN of the latest version associated with the definition.
--
-- 'arn', 'getLoggerDefinitionResponse_arn' - The ARN of the definition.
--
-- 'name', 'getLoggerDefinitionResponse_name' - The name of the definition.
--
-- 'creationTimestamp', 'getLoggerDefinitionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the definition was
-- created.
--
-- 'id', 'getLoggerDefinitionResponse_id' - The ID of the definition.
--
-- 'latestVersion', 'getLoggerDefinitionResponse_latestVersion' - The ID of the latest version associated with the definition.
--
-- 'lastUpdatedTimestamp', 'getLoggerDefinitionResponse_lastUpdatedTimestamp' - The time, in milliseconds since the epoch, when the definition was last
-- updated.
--
-- 'tags', 'getLoggerDefinitionResponse_tags' - Tag(s) attached to the resource arn.
--
-- 'httpStatus', 'getLoggerDefinitionResponse_httpStatus' - The response's http status code.
newGetLoggerDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetLoggerDefinitionResponse
newGetLoggerDefinitionResponse :: Int -> GetLoggerDefinitionResponse
newGetLoggerDefinitionResponse Int
pHttpStatus_ =
  GetLoggerDefinitionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetLoggerDefinitionResponse
GetLoggerDefinitionResponse'
    { $sel:latestVersionArn:GetLoggerDefinitionResponse' :: Maybe Text
latestVersionArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetLoggerDefinitionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetLoggerDefinitionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetLoggerDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetLoggerDefinitionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersion:GetLoggerDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetLoggerDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetLoggerDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetLoggerDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

-- | Tag(s) attached to the resource arn.
getLoggerDefinitionResponse_tags :: Lens.Lens' GetLoggerDefinitionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getLoggerDefinitionResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetLoggerDefinitionResponse -> f GetLoggerDefinitionResponse
getLoggerDefinitionResponse_tags = (GetLoggerDefinitionResponse -> Maybe (HashMap Text Text))
-> (GetLoggerDefinitionResponse
    -> Maybe (HashMap Text Text) -> GetLoggerDefinitionResponse)
-> Lens
     GetLoggerDefinitionResponse
     GetLoggerDefinitionResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoggerDefinitionResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetLoggerDefinitionResponse' :: GetLoggerDefinitionResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetLoggerDefinitionResponse
s@GetLoggerDefinitionResponse' {} Maybe (HashMap Text Text)
a -> GetLoggerDefinitionResponse
s {$sel:tags:GetLoggerDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetLoggerDefinitionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetLoggerDefinitionResponse -> f GetLoggerDefinitionResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetLoggerDefinitionResponse
-> f GetLoggerDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetLoggerDefinitionResponse