{-# 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-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 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_definition,
    getConnectorDefinitionVersionResponse_arn,
    getConnectorDefinitionVersionResponse_nextToken,
    getConnectorDefinitionVersionResponse_creationTimestamp,
    getConnectorDefinitionVersionResponse_version,
    getConnectorDefinitionVersionResponse_id,
    getConnectorDefinitionVersionResponse_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:/ '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
(GetConnectorDefinitionVersion
 -> GetConnectorDefinitionVersion -> Bool)
-> (GetConnectorDefinitionVersion
    -> GetConnectorDefinitionVersion -> Bool)
-> Eq GetConnectorDefinitionVersion
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]
(Int -> ReadS GetConnectorDefinitionVersion)
-> ReadS [GetConnectorDefinitionVersion]
-> ReadPrec GetConnectorDefinitionVersion
-> ReadPrec [GetConnectorDefinitionVersion]
-> Read 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
(Int -> GetConnectorDefinitionVersion -> ShowS)
-> (GetConnectorDefinitionVersion -> String)
-> ([GetConnectorDefinitionVersion] -> ShowS)
-> Show GetConnectorDefinitionVersion
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.
 GetConnectorDefinitionVersion
 -> Rep GetConnectorDefinitionVersion x)
-> (forall x.
    Rep GetConnectorDefinitionVersion x
    -> GetConnectorDefinitionVersion)
-> Generic GetConnectorDefinitionVersion
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' :: Maybe Text -> Text -> Text -> GetConnectorDefinitionVersion
GetConnectorDefinitionVersion'
      { $sel:nextToken:GetConnectorDefinitionVersion' :: Maybe Text
nextToken =
          Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersion -> f GetConnectorDefinitionVersion
getConnectorDefinitionVersion_nextToken = (GetConnectorDefinitionVersion -> Maybe Text)
-> (GetConnectorDefinitionVersion
    -> Maybe Text -> GetConnectorDefinitionVersion)
-> Lens
     GetConnectorDefinitionVersion
     GetConnectorDefinitionVersion
     (Maybe Text)
     (Maybe Text)
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 :: (Text -> f Text)
-> GetConnectorDefinitionVersion -> f GetConnectorDefinitionVersion
getConnectorDefinitionVersion_connectorDefinitionId = (GetConnectorDefinitionVersion -> Text)
-> (GetConnectorDefinitionVersion
    -> Text -> GetConnectorDefinitionVersion)
-> Lens
     GetConnectorDefinitionVersion
     GetConnectorDefinitionVersion
     Text
     Text
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 :: (Text -> f Text)
-> GetConnectorDefinitionVersion -> f GetConnectorDefinitionVersion
getConnectorDefinitionVersion_connectorDefinitionVersionId = (GetConnectorDefinitionVersion -> Text)
-> (GetConnectorDefinitionVersion
    -> Text -> GetConnectorDefinitionVersion)
-> Lens
     GetConnectorDefinitionVersion
     GetConnectorDefinitionVersion
     Text
     Text
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 :: GetConnectorDefinitionVersion
-> Request GetConnectorDefinitionVersion
request = Service
-> GetConnectorDefinitionVersion
-> Request GetConnectorDefinitionVersion
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetConnectorDefinitionVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetConnectorDefinitionVersion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetConnectorDefinitionVersion))
-> Logger
-> Service
-> Proxy GetConnectorDefinitionVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetConnectorDefinitionVersion)))
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 ConnectorDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetConnectorDefinitionVersionResponse
GetConnectorDefinitionVersionResponse'
            (Maybe ConnectorDefinitionVersion
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe ConnectorDefinitionVersion)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetConnectorDefinitionVersionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ConnectorDefinitionVersion)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Definition")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetConnectorDefinitionVersionResponse)
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
   -> Int
   -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetConnectorDefinitionVersionResponse)
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
"NextToken")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetConnectorDefinitionVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTimestamp")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> GetConnectorDefinitionVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Version")
            Either
  String (Maybe Text -> Int -> GetConnectorDefinitionVersionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetConnectorDefinitionVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Id")
            Either String (Int -> GetConnectorDefinitionVersionResponse)
-> Either String Int
-> Either String GetConnectorDefinitionVersionResponse
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
    GetConnectorDefinitionVersion

instance Prelude.NFData GetConnectorDefinitionVersion

instance Core.ToHeaders GetConnectorDefinitionVersion where
  toHeaders :: GetConnectorDefinitionVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetConnectorDefinitionVersion -> 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 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
..} =
    [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,
        ByteString
"/versions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
connectorDefinitionVersionId
      ]

instance Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken]

-- | /See:/ 'newGetConnectorDefinitionVersionResponse' smart constructor.
data GetConnectorDefinitionVersionResponse = GetConnectorDefinitionVersionResponse'
  { -- | Information about the connector definition version.
    GetConnectorDefinitionVersionResponse
-> Maybe ConnectorDefinitionVersion
definition :: Prelude.Maybe ConnectorDefinitionVersion,
    -- | The ARN of the connector definition version.
    GetConnectorDefinitionVersionResponse -> Maybe Text
arn :: 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 time, in milliseconds since the epoch, when the connector definition
    -- version was created.
    GetConnectorDefinitionVersionResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
    -- | The version of the connector definition version.
    GetConnectorDefinitionVersionResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The ID of the connector definition version.
    GetConnectorDefinitionVersionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetConnectorDefinitionVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetConnectorDefinitionVersionResponse
-> GetConnectorDefinitionVersionResponse -> Bool
(GetConnectorDefinitionVersionResponse
 -> GetConnectorDefinitionVersionResponse -> Bool)
-> (GetConnectorDefinitionVersionResponse
    -> GetConnectorDefinitionVersionResponse -> Bool)
-> Eq GetConnectorDefinitionVersionResponse
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]
(Int -> ReadS GetConnectorDefinitionVersionResponse)
-> ReadS [GetConnectorDefinitionVersionResponse]
-> ReadPrec GetConnectorDefinitionVersionResponse
-> ReadPrec [GetConnectorDefinitionVersionResponse]
-> Read 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
(Int -> GetConnectorDefinitionVersionResponse -> ShowS)
-> (GetConnectorDefinitionVersionResponse -> String)
-> ([GetConnectorDefinitionVersionResponse] -> ShowS)
-> Show GetConnectorDefinitionVersionResponse
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.
 GetConnectorDefinitionVersionResponse
 -> Rep GetConnectorDefinitionVersionResponse x)
-> (forall x.
    Rep GetConnectorDefinitionVersionResponse x
    -> GetConnectorDefinitionVersionResponse)
-> Generic GetConnectorDefinitionVersionResponse
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:
--
-- 'definition', 'getConnectorDefinitionVersionResponse_definition' - Information about the connector definition version.
--
-- 'arn', 'getConnectorDefinitionVersionResponse_arn' - The ARN of the connector definition version.
--
-- 'nextToken', 'getConnectorDefinitionVersionResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'creationTimestamp', 'getConnectorDefinitionVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the connector definition
-- version was created.
--
-- 'version', 'getConnectorDefinitionVersionResponse_version' - The version of the connector definition version.
--
-- 'id', 'getConnectorDefinitionVersionResponse_id' - The ID 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' :: Maybe ConnectorDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetConnectorDefinitionVersionResponse
GetConnectorDefinitionVersionResponse'
    { $sel:definition:GetConnectorDefinitionVersionResponse' :: Maybe ConnectorDefinitionVersion
definition =
        Maybe ConnectorDefinitionVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetConnectorDefinitionVersionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetConnectorDefinitionVersionResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetConnectorDefinitionVersionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetConnectorDefinitionVersionResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetConnectorDefinitionVersionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetConnectorDefinitionVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the connector definition version.
getConnectorDefinitionVersionResponse_definition :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe ConnectorDefinitionVersion)
getConnectorDefinitionVersionResponse_definition :: (Maybe ConnectorDefinitionVersion
 -> f (Maybe ConnectorDefinitionVersion))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_definition = (GetConnectorDefinitionVersionResponse
 -> Maybe ConnectorDefinitionVersion)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe ConnectorDefinitionVersion
    -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe ConnectorDefinitionVersion)
     (Maybe ConnectorDefinitionVersion)
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 ARN of the connector definition version.
getConnectorDefinitionVersionResponse_arn :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getConnectorDefinitionVersionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_arn = (GetConnectorDefinitionVersionResponse -> Maybe Text)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe Text -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_nextToken = (GetConnectorDefinitionVersionResponse -> Maybe Text)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe Text -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe Text)
     (Maybe Text)
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 time, in milliseconds since the epoch, when the connector definition
-- version was created.
getConnectorDefinitionVersionResponse_creationTimestamp :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getConnectorDefinitionVersionResponse_creationTimestamp :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_creationTimestamp = (GetConnectorDefinitionVersionResponse -> Maybe Text)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe Text -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The version of the connector definition version.
getConnectorDefinitionVersionResponse_version :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getConnectorDefinitionVersionResponse_version :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_version = (GetConnectorDefinitionVersionResponse -> Maybe Text)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe Text -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe Text)
     (Maybe Text)
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 ID of the connector definition version.
getConnectorDefinitionVersionResponse_id :: Lens.Lens' GetConnectorDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getConnectorDefinitionVersionResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_id = (GetConnectorDefinitionVersionResponse -> Maybe Text)
-> (GetConnectorDefinitionVersionResponse
    -> Maybe Text -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     (Maybe Text)
     (Maybe Text)
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 response's http status code.
getConnectorDefinitionVersionResponse_httpStatus :: Lens.Lens' GetConnectorDefinitionVersionResponse Prelude.Int
getConnectorDefinitionVersionResponse_httpStatus :: (Int -> f Int)
-> GetConnectorDefinitionVersionResponse
-> f GetConnectorDefinitionVersionResponse
getConnectorDefinitionVersionResponse_httpStatus = (GetConnectorDefinitionVersionResponse -> Int)
-> (GetConnectorDefinitionVersionResponse
    -> Int -> GetConnectorDefinitionVersionResponse)
-> Lens
     GetConnectorDefinitionVersionResponse
     GetConnectorDefinitionVersionResponse
     Int
     Int
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