{-# 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.GetConnectorDefinition
-- 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 connector definition.
module Amazonka.Greengrass.GetConnectorDefinition
  ( -- * Creating a Request
    GetConnectorDefinition (..),
    newGetConnectorDefinition,

    -- * Request Lenses
    getConnectorDefinition_connectorDefinitionId,

    -- * Destructuring the Response
    GetConnectorDefinitionResponse (..),
    newGetConnectorDefinitionResponse,

    -- * Response Lenses
    getConnectorDefinitionResponse_latestVersionArn,
    getConnectorDefinitionResponse_arn,
    getConnectorDefinitionResponse_name,
    getConnectorDefinitionResponse_creationTimestamp,
    getConnectorDefinitionResponse_id,
    getConnectorDefinitionResponse_latestVersion,
    getConnectorDefinitionResponse_lastUpdatedTimestamp,
    getConnectorDefinitionResponse_tags,
    getConnectorDefinitionResponse_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:/ 'newGetConnectorDefinition' smart constructor.
data GetConnectorDefinition = GetConnectorDefinition'
  { -- | The ID of the connector definition.
    GetConnectorDefinition -> Text
connectorDefinitionId :: Prelude.Text
  }
  deriving (GetConnectorDefinition -> GetConnectorDefinition -> Bool
(GetConnectorDefinition -> GetConnectorDefinition -> Bool)
-> (GetConnectorDefinition -> GetConnectorDefinition -> Bool)
-> Eq GetConnectorDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConnectorDefinition -> GetConnectorDefinition -> Bool
$c/= :: GetConnectorDefinition -> GetConnectorDefinition -> Bool
== :: GetConnectorDefinition -> GetConnectorDefinition -> Bool
$c== :: GetConnectorDefinition -> GetConnectorDefinition -> Bool
Prelude.Eq, ReadPrec [GetConnectorDefinition]
ReadPrec GetConnectorDefinition
Int -> ReadS GetConnectorDefinition
ReadS [GetConnectorDefinition]
(Int -> ReadS GetConnectorDefinition)
-> ReadS [GetConnectorDefinition]
-> ReadPrec GetConnectorDefinition
-> ReadPrec [GetConnectorDefinition]
-> Read GetConnectorDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConnectorDefinition]
$creadListPrec :: ReadPrec [GetConnectorDefinition]
readPrec :: ReadPrec GetConnectorDefinition
$creadPrec :: ReadPrec GetConnectorDefinition
readList :: ReadS [GetConnectorDefinition]
$creadList :: ReadS [GetConnectorDefinition]
readsPrec :: Int -> ReadS GetConnectorDefinition
$creadsPrec :: Int -> ReadS GetConnectorDefinition
Prelude.Read, Int -> GetConnectorDefinition -> ShowS
[GetConnectorDefinition] -> ShowS
GetConnectorDefinition -> String
(Int -> GetConnectorDefinition -> ShowS)
-> (GetConnectorDefinition -> String)
-> ([GetConnectorDefinition] -> ShowS)
-> Show GetConnectorDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConnectorDefinition] -> ShowS
$cshowList :: [GetConnectorDefinition] -> ShowS
show :: GetConnectorDefinition -> String
$cshow :: GetConnectorDefinition -> String
showsPrec :: Int -> GetConnectorDefinition -> ShowS
$cshowsPrec :: Int -> GetConnectorDefinition -> ShowS
Prelude.Show, (forall x. GetConnectorDefinition -> Rep GetConnectorDefinition x)
-> (forall x.
    Rep GetConnectorDefinition x -> GetConnectorDefinition)
-> Generic GetConnectorDefinition
forall x. Rep GetConnectorDefinition x -> GetConnectorDefinition
forall x. GetConnectorDefinition -> Rep GetConnectorDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetConnectorDefinition x -> GetConnectorDefinition
$cfrom :: forall x. GetConnectorDefinition -> Rep GetConnectorDefinition x
Prelude.Generic)

-- |
-- Create a value of 'GetConnectorDefinition' 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:
--
-- 'connectorDefinitionId', 'getConnectorDefinition_connectorDefinitionId' - The ID of the connector definition.
newGetConnectorDefinition ::
  -- | 'connectorDefinitionId'
  Prelude.Text ->
  GetConnectorDefinition
newGetConnectorDefinition :: Text -> GetConnectorDefinition
newGetConnectorDefinition Text
pConnectorDefinitionId_ =
  GetConnectorDefinition' :: Text -> GetConnectorDefinition
GetConnectorDefinition'
    { $sel:connectorDefinitionId:GetConnectorDefinition' :: Text
connectorDefinitionId =
        Text
pConnectorDefinitionId_
    }

-- | The ID of the connector definition.
getConnectorDefinition_connectorDefinitionId :: Lens.Lens' GetConnectorDefinition Prelude.Text
getConnectorDefinition_connectorDefinitionId :: (Text -> f Text)
-> GetConnectorDefinition -> f GetConnectorDefinition
getConnectorDefinition_connectorDefinitionId = (GetConnectorDefinition -> Text)
-> (GetConnectorDefinition -> Text -> GetConnectorDefinition)
-> Lens GetConnectorDefinition GetConnectorDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectorDefinition' {Text
connectorDefinitionId :: Text
$sel:connectorDefinitionId:GetConnectorDefinition' :: GetConnectorDefinition -> Text
connectorDefinitionId} -> Text
connectorDefinitionId) (\s :: GetConnectorDefinition
s@GetConnectorDefinition' {} Text
a -> GetConnectorDefinition
s {$sel:connectorDefinitionId:GetConnectorDefinition' :: Text
connectorDefinitionId = Text
a} :: GetConnectorDefinition)

instance Core.AWSRequest GetConnectorDefinition where
  type
    AWSResponse GetConnectorDefinition =
      GetConnectorDefinitionResponse
  request :: GetConnectorDefinition -> Request GetConnectorDefinition
request = Service -> GetConnectorDefinition -> Request GetConnectorDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetConnectorDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetConnectorDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetConnectorDefinition))
-> Logger
-> Service
-> Proxy GetConnectorDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetConnectorDefinition)))
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
-> GetConnectorDefinitionResponse
GetConnectorDefinitionResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetConnectorDefinitionResponse)
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
   -> GetConnectorDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> GetConnectorDefinitionResponse)
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 -> GetConnectorDefinitionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetConnectorDefinitionResponse)
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 -> GetConnectorDefinitionResponse)
-> Either String Int
-> Either String GetConnectorDefinitionResponse
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 GetConnectorDefinition

instance Prelude.NFData GetConnectorDefinition

instance Core.ToHeaders GetConnectorDefinition where
  toHeaders :: GetConnectorDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetConnectorDefinition -> 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 GetConnectorDefinition where
  toPath :: GetConnectorDefinition -> ByteString
toPath GetConnectorDefinition' {Text
connectorDefinitionId :: Text
$sel:connectorDefinitionId:GetConnectorDefinition' :: GetConnectorDefinition -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/connectors/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
connectorDefinitionId
      ]

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

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

-- |
-- Create a value of 'GetConnectorDefinitionResponse' 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', 'getConnectorDefinitionResponse_latestVersionArn' - The ARN of the latest version associated with the definition.
--
-- 'arn', 'getConnectorDefinitionResponse_arn' - The ARN of the definition.
--
-- 'name', 'getConnectorDefinitionResponse_name' - The name of the definition.
--
-- 'creationTimestamp', 'getConnectorDefinitionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the definition was
-- created.
--
-- 'id', 'getConnectorDefinitionResponse_id' - The ID of the definition.
--
-- 'latestVersion', 'getConnectorDefinitionResponse_latestVersion' - The ID of the latest version associated with the definition.
--
-- 'lastUpdatedTimestamp', 'getConnectorDefinitionResponse_lastUpdatedTimestamp' - The time, in milliseconds since the epoch, when the definition was last
-- updated.
--
-- 'tags', 'getConnectorDefinitionResponse_tags' - Tag(s) attached to the resource arn.
--
-- 'httpStatus', 'getConnectorDefinitionResponse_httpStatus' - The response's http status code.
newGetConnectorDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetConnectorDefinitionResponse
newGetConnectorDefinitionResponse :: Int -> GetConnectorDefinitionResponse
newGetConnectorDefinitionResponse Int
pHttpStatus_ =
  GetConnectorDefinitionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetConnectorDefinitionResponse
GetConnectorDefinitionResponse'
    { $sel:latestVersionArn:GetConnectorDefinitionResponse' :: Maybe Text
latestVersionArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetConnectorDefinitionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetConnectorDefinitionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetConnectorDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetConnectorDefinitionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersion:GetConnectorDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetConnectorDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetConnectorDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetConnectorDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

-- | Tag(s) attached to the resource arn.
getConnectorDefinitionResponse_tags :: Lens.Lens' GetConnectorDefinitionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getConnectorDefinitionResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetConnectorDefinitionResponse
-> f GetConnectorDefinitionResponse
getConnectorDefinitionResponse_tags = (GetConnectorDefinitionResponse -> Maybe (HashMap Text Text))
-> (GetConnectorDefinitionResponse
    -> Maybe (HashMap Text Text) -> GetConnectorDefinitionResponse)
-> Lens
     GetConnectorDefinitionResponse
     GetConnectorDefinitionResponse
     (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 (\GetConnectorDefinitionResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetConnectorDefinitionResponse' :: GetConnectorDefinitionResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetConnectorDefinitionResponse
s@GetConnectorDefinitionResponse' {} Maybe (HashMap Text Text)
a -> GetConnectorDefinitionResponse
s {$sel:tags:GetConnectorDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetConnectorDefinitionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetConnectorDefinitionResponse
 -> f GetConnectorDefinitionResponse)
-> ((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)))
-> GetConnectorDefinitionResponse
-> f GetConnectorDefinitionResponse
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.
getConnectorDefinitionResponse_httpStatus :: Lens.Lens' GetConnectorDefinitionResponse Prelude.Int
getConnectorDefinitionResponse_httpStatus :: (Int -> f Int)
-> GetConnectorDefinitionResponse
-> f GetConnectorDefinitionResponse
getConnectorDefinitionResponse_httpStatus = (GetConnectorDefinitionResponse -> Int)
-> (GetConnectorDefinitionResponse
    -> Int -> GetConnectorDefinitionResponse)
-> Lens
     GetConnectorDefinitionResponse
     GetConnectorDefinitionResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectorDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetConnectorDefinitionResponse' :: GetConnectorDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetConnectorDefinitionResponse
s@GetConnectorDefinitionResponse' {} Int
a -> GetConnectorDefinitionResponse
s {$sel:httpStatus:GetConnectorDefinitionResponse' :: Int
httpStatus = Int
a} :: GetConnectorDefinitionResponse)

instance
  Prelude.NFData
    GetConnectorDefinitionResponse