{-# 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.GetConnectorDefinitionVersion
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves information about a connector definition version, including
-- the connectors that the version contains. Connectors are prebuilt
-- modules that interact with local infrastructure, device protocols, AWS,
-- and other cloud services.
module Amazonka.Greengrass.GetConnectorDefinitionVersion
  ( -- * Creating a Request
    GetConnectorDefinitionVersion (..),
    newGetConnectorDefinitionVersion,

    -- * Request Lenses
    getConnectorDefinitionVersion_nextToken,
    getConnectorDefinitionVersion_connectorDefinitionId,
    getConnectorDefinitionVersion_connectorDefinitionVersionId,

    -- * Destructuring the Response
    GetConnectorDefinitionVersionResponse (..),
    newGetConnectorDefinitionVersionResponse,

    -- * Response Lenses
    getConnectorDefinitionVersionResponse_arn,
    getConnectorDefinitionVersionResponse_creationTimestamp,
    getConnectorDefinitionVersionResponse_definition,
    getConnectorDefinitionVersionResponse_id,
    getConnectorDefinitionVersionResponse_nextToken,
    getConnectorDefinitionVersionResponse_version,
    getConnectorDefinitionVersionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetConnectorDefinitionVersion' smart constructor.
data GetConnectorDefinitionVersion = GetConnectorDefinitionVersion'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    GetConnectorDefinitionVersion -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the connector definition.
    GetConnectorDefinitionVersion -> Text
connectorDefinitionId :: Prelude.Text,
    -- | The ID of the connector definition version. This value maps to the
    -- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
    -- object, which is returned by \'\'ListConnectorDefinitionVersions\'\'
    -- requests. If the version is the last one that was associated with a
    -- connector definition, the value also maps to the \'\'LatestVersion\'\'
    -- property of the corresponding \'\'DefinitionInformation\'\' object.
    GetConnectorDefinitionVersion -> Text
connectorDefinitionVersionId :: Prelude.Text
  }
  deriving (GetConnectorDefinitionVersion
-> GetConnectorDefinitionVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConnectorDefinitionVersion
-> GetConnectorDefinitionVersion -> Bool
$c/= :: GetConnectorDefinitionVersion
-> GetConnectorDefinitionVersion -> Bool
== :: GetConnectorDefinitionVersion
-> GetConnectorDefinitionVersion -> Bool
$c== :: GetConnectorDefinitionVersion
-> GetConnectorDefinitionVersion -> Bool
Prelude.Eq, ReadPrec [GetConnectorDefinitionVersion]
ReadPrec GetConnectorDefinitionVersion
Int -> ReadS GetConnectorDefinitionVersion
ReadS [GetConnectorDefinitionVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConnectorDefinitionVersion]
$creadListPrec :: ReadPrec [GetConnectorDefinitionVersion]
readPrec :: ReadPrec GetConnectorDefinitionVersion
$creadPrec :: ReadPrec GetConnectorDefinitionVersion
readList :: ReadS [GetConnectorDefinitionVersion]
$creadList :: ReadS [GetConnectorDefinitionVersion]
readsPrec :: Int -> ReadS GetConnectorDefinitionVersion
$creadsPrec :: Int -> ReadS GetConnectorDefinitionVersion
Prelude.Read, Int -> GetConnectorDefinitionVersion -> ShowS
[GetConnectorDefinitionVersion] -> ShowS
GetConnectorDefinitionVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConnectorDefinitionVersion] -> ShowS
$cshowList :: [GetConnectorDefinitionVersion] -> ShowS
show :: GetConnectorDefinitionVersion -> String
$cshow :: GetConnectorDefinitionVersion -> String
showsPrec :: Int -> GetConnectorDefinitionVersion -> ShowS
$cshowsPrec :: Int -> GetConnectorDefinitionVersion -> ShowS
Prelude.Show, forall x.
Rep GetConnectorDefinitionVersion x
-> GetConnectorDefinitionVersion
forall x.
GetConnectorDefinitionVersion
-> Rep GetConnectorDefinitionVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetConnectorDefinitionVersion x
-> GetConnectorDefinitionVersion
$cfrom :: forall x.
GetConnectorDefinitionVersion
-> Rep GetConnectorDefinitionVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetConnectorDefinitionVersion' 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', 'getConnectorDefinitionVersion_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'connectorDefinitionId', 'getConnectorDefinitionVersion_connectorDefinitionId' - The ID of the connector definition.
--
-- 'connectorDefinitionVersionId', 'getConnectorDefinitionVersion_connectorDefinitionVersionId' - The ID of the connector definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListConnectorDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a
-- connector definition, the value also maps to the \'\'LatestVersion\'\'
-- property of the corresponding \'\'DefinitionInformation\'\' object.
newGetConnectorDefinitionVersion ::
  -- | 'connectorDefinitionId'
  Prelude.Text ->
  -- | 'connectorDefinitionVersionId'
  Prelude.Text ->
  GetConnectorDefinitionVersion
newGetConnectorDefinitionVersion :: Text -> Text -> GetConnectorDefinitionVersion
newGetConnectorDefinitionVersion
  Text
pConnectorDefinitionId_
  Text
pConnectorDefinitionVersionId_ =
    GetConnectorDefinitionVersion'
      { $sel:nextToken:GetConnectorDefinitionVersion' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:connectorDefinitionId:GetConnectorDefinitionVersion' :: Text
connectorDefinitionId =
          Text
pConnectorDefinitionId_,
        $sel:connectorDefinitionVersionId:GetConnectorDefinitionVersion' :: Text
connectorDefinitionVersionId =
          Text
pConnectorDefinitionVersionId_
      }

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

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

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

instance
  Core.AWSRequest
    GetConnectorDefinitionVersion
  where
  type
    AWSResponse GetConnectorDefinitionVersion =
      GetConnectorDefinitionVersionResponse
  request :: (Service -> Service)
-> GetConnectorDefinitionVersion
-> Request GetConnectorDefinitionVersion
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetConnectorDefinitionVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetConnectorDefinitionVersion)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe ConnectorDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetConnectorDefinitionVersionResponse
GetConnectorDefinitionVersionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreationTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Definition")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    GetConnectorDefinitionVersion
  where
  hashWithSalt :: Int -> GetConnectorDefinitionVersion -> Int
hashWithSalt Int
_salt GetConnectorDefinitionVersion' {Maybe Text
Text
connectorDefinitionVersionId :: Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
$sel:connectorDefinitionVersionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:connectorDefinitionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:nextToken:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectorDefinitionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectorDefinitionVersionId

instance Prelude.NFData GetConnectorDefinitionVersion where
  rnf :: GetConnectorDefinitionVersion -> ()
rnf GetConnectorDefinitionVersion' {Maybe Text
Text
connectorDefinitionVersionId :: Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
$sel:connectorDefinitionVersionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:connectorDefinitionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:nextToken:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
connectorDefinitionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
connectorDefinitionVersionId

instance Data.ToHeaders GetConnectorDefinitionVersion where
  toHeaders :: GetConnectorDefinitionVersion -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetConnectorDefinitionVersion where
  toPath :: GetConnectorDefinitionVersion -> ByteString
toPath GetConnectorDefinitionVersion' {Maybe Text
Text
connectorDefinitionVersionId :: Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
$sel:connectorDefinitionVersionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:connectorDefinitionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:nextToken:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/connectors/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
connectorDefinitionId,
        ByteString
"/versions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
connectorDefinitionVersionId
      ]

instance Data.ToQuery GetConnectorDefinitionVersion where
  toQuery :: GetConnectorDefinitionVersion -> QueryString
toQuery GetConnectorDefinitionVersion' {Maybe Text
Text
connectorDefinitionVersionId :: Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
$sel:connectorDefinitionVersionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:connectorDefinitionId:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Text
$sel:nextToken:GetConnectorDefinitionVersion' :: GetConnectorDefinitionVersion -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken]

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

-- |
-- Create a value of 'GetConnectorDefinitionVersionResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'getConnectorDefinitionVersionResponse_arn' - The ARN of the connector definition version.
--
-- 'creationTimestamp', 'getConnectorDefinitionVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the connector definition
-- version was created.
--
-- 'definition', 'getConnectorDefinitionVersionResponse_definition' - Information about the connector definition version.
--
-- 'id', 'getConnectorDefinitionVersionResponse_id' - The ID of the connector definition version.
--
-- 'nextToken', 'getConnectorDefinitionVersionResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'version', 'getConnectorDefinitionVersionResponse_version' - The version of the connector definition version.
--
-- 'httpStatus', 'getConnectorDefinitionVersionResponse_httpStatus' - The response's http status code.
newGetConnectorDefinitionVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetConnectorDefinitionVersionResponse
newGetConnectorDefinitionVersionResponse :: Int -> GetConnectorDefinitionVersionResponse
newGetConnectorDefinitionVersionResponse Int
pHttpStatus_ =
  GetConnectorDefinitionVersionResponse'
    { $sel:arn:GetConnectorDefinitionVersionResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetConnectorDefinitionVersionResponse' :: Maybe Text
creationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:definition:GetConnectorDefinitionVersionResponse' :: Maybe ConnectorDefinitionVersion
definition = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetConnectorDefinitionVersionResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetConnectorDefinitionVersionResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetConnectorDefinitionVersionResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetConnectorDefinitionVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | Information about the connector definition version.
getConnectorDefinitionVersionResponse_definition :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe ConnectorDefinitionVersion)
getConnectorDefinitionVersionResponse_definition :: Lens'
  GetConnectorDefinitionVersionResponse
  (Maybe ConnectorDefinitionVersion)
getConnectorDefinitionVersionResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectorDefinitionVersionResponse' {Maybe ConnectorDefinitionVersion
definition :: Maybe ConnectorDefinitionVersion
$sel:definition:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse
-> Maybe ConnectorDefinitionVersion
definition} -> Maybe ConnectorDefinitionVersion
definition) (\s :: GetConnectorDefinitionVersionResponse
s@GetConnectorDefinitionVersionResponse' {} Maybe ConnectorDefinitionVersion
a -> GetConnectorDefinitionVersionResponse
s {$sel:definition:GetConnectorDefinitionVersionResponse' :: Maybe ConnectorDefinitionVersion
definition = Maybe ConnectorDefinitionVersion
a} :: GetConnectorDefinitionVersionResponse)

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

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

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

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

instance
  Prelude.NFData
    GetConnectorDefinitionVersionResponse
  where
  rnf :: GetConnectorDefinitionVersionResponse -> ()
rnf GetConnectorDefinitionVersionResponse' {Int
Maybe Text
Maybe ConnectorDefinitionVersion
httpStatus :: Int
version :: Maybe Text
nextToken :: Maybe Text
id :: Maybe Text
definition :: Maybe ConnectorDefinitionVersion
creationTimestamp :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Int
$sel:version:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Maybe Text
$sel:nextToken:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Maybe Text
$sel:id:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Maybe Text
$sel:definition:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse
-> Maybe ConnectorDefinitionVersion
$sel:creationTimestamp:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Maybe Text
$sel:arn:GetConnectorDefinitionVersionResponse' :: GetConnectorDefinitionVersionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectorDefinitionVersion
definition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus