{-# 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.KafkaConnect.CreateCustomPlugin
-- 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)
--
-- Creates a custom plugin using the specified properties.
module Amazonka.KafkaConnect.CreateCustomPlugin
  ( -- * Creating a Request
    CreateCustomPlugin (..),
    newCreateCustomPlugin,

    -- * Request Lenses
    createCustomPlugin_description,
    createCustomPlugin_contentType,
    createCustomPlugin_location,
    createCustomPlugin_name,

    -- * Destructuring the Response
    CreateCustomPluginResponse (..),
    newCreateCustomPluginResponse,

    -- * Response Lenses
    createCustomPluginResponse_name,
    createCustomPluginResponse_customPluginArn,
    createCustomPluginResponse_customPluginState,
    createCustomPluginResponse_revision,
    createCustomPluginResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.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:/ 'newCreateCustomPlugin' smart constructor.
data CreateCustomPlugin = CreateCustomPlugin'
  { -- | A summary description of the custom plugin.
    CreateCustomPlugin -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The type of the plugin file.
    CreateCustomPlugin -> CustomPluginContentType
contentType :: CustomPluginContentType,
    -- | Information about the location of a custom plugin.
    CreateCustomPlugin -> CustomPluginLocation
location :: CustomPluginLocation,
    -- | The name of the custom plugin.
    CreateCustomPlugin -> Text
name :: Prelude.Text
  }
  deriving (CreateCustomPlugin -> CreateCustomPlugin -> Bool
(CreateCustomPlugin -> CreateCustomPlugin -> Bool)
-> (CreateCustomPlugin -> CreateCustomPlugin -> Bool)
-> Eq CreateCustomPlugin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomPlugin -> CreateCustomPlugin -> Bool
$c/= :: CreateCustomPlugin -> CreateCustomPlugin -> Bool
== :: CreateCustomPlugin -> CreateCustomPlugin -> Bool
$c== :: CreateCustomPlugin -> CreateCustomPlugin -> Bool
Prelude.Eq, ReadPrec [CreateCustomPlugin]
ReadPrec CreateCustomPlugin
Int -> ReadS CreateCustomPlugin
ReadS [CreateCustomPlugin]
(Int -> ReadS CreateCustomPlugin)
-> ReadS [CreateCustomPlugin]
-> ReadPrec CreateCustomPlugin
-> ReadPrec [CreateCustomPlugin]
-> Read CreateCustomPlugin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomPlugin]
$creadListPrec :: ReadPrec [CreateCustomPlugin]
readPrec :: ReadPrec CreateCustomPlugin
$creadPrec :: ReadPrec CreateCustomPlugin
readList :: ReadS [CreateCustomPlugin]
$creadList :: ReadS [CreateCustomPlugin]
readsPrec :: Int -> ReadS CreateCustomPlugin
$creadsPrec :: Int -> ReadS CreateCustomPlugin
Prelude.Read, Int -> CreateCustomPlugin -> ShowS
[CreateCustomPlugin] -> ShowS
CreateCustomPlugin -> String
(Int -> CreateCustomPlugin -> ShowS)
-> (CreateCustomPlugin -> String)
-> ([CreateCustomPlugin] -> ShowS)
-> Show CreateCustomPlugin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomPlugin] -> ShowS
$cshowList :: [CreateCustomPlugin] -> ShowS
show :: CreateCustomPlugin -> String
$cshow :: CreateCustomPlugin -> String
showsPrec :: Int -> CreateCustomPlugin -> ShowS
$cshowsPrec :: Int -> CreateCustomPlugin -> ShowS
Prelude.Show, (forall x. CreateCustomPlugin -> Rep CreateCustomPlugin x)
-> (forall x. Rep CreateCustomPlugin x -> CreateCustomPlugin)
-> Generic CreateCustomPlugin
forall x. Rep CreateCustomPlugin x -> CreateCustomPlugin
forall x. CreateCustomPlugin -> Rep CreateCustomPlugin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCustomPlugin x -> CreateCustomPlugin
$cfrom :: forall x. CreateCustomPlugin -> Rep CreateCustomPlugin x
Prelude.Generic)

-- |
-- Create a value of 'CreateCustomPlugin' 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:
--
-- 'description', 'createCustomPlugin_description' - A summary description of the custom plugin.
--
-- 'contentType', 'createCustomPlugin_contentType' - The type of the plugin file.
--
-- 'location', 'createCustomPlugin_location' - Information about the location of a custom plugin.
--
-- 'name', 'createCustomPlugin_name' - The name of the custom plugin.
newCreateCustomPlugin ::
  -- | 'contentType'
  CustomPluginContentType ->
  -- | 'location'
  CustomPluginLocation ->
  -- | 'name'
  Prelude.Text ->
  CreateCustomPlugin
newCreateCustomPlugin :: CustomPluginContentType
-> CustomPluginLocation -> Text -> CreateCustomPlugin
newCreateCustomPlugin CustomPluginContentType
pContentType_ CustomPluginLocation
pLocation_ Text
pName_ =
  CreateCustomPlugin' :: Maybe Text
-> CustomPluginContentType
-> CustomPluginLocation
-> Text
-> CreateCustomPlugin
CreateCustomPlugin'
    { $sel:description:CreateCustomPlugin' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:CreateCustomPlugin' :: CustomPluginContentType
contentType = CustomPluginContentType
pContentType_,
      $sel:location:CreateCustomPlugin' :: CustomPluginLocation
location = CustomPluginLocation
pLocation_,
      $sel:name:CreateCustomPlugin' :: Text
name = Text
pName_
    }

-- | A summary description of the custom plugin.
createCustomPlugin_description :: Lens.Lens' CreateCustomPlugin (Prelude.Maybe Prelude.Text)
createCustomPlugin_description :: (Maybe Text -> f (Maybe Text))
-> CreateCustomPlugin -> f CreateCustomPlugin
createCustomPlugin_description = (CreateCustomPlugin -> Maybe Text)
-> (CreateCustomPlugin -> Maybe Text -> CreateCustomPlugin)
-> Lens
     CreateCustomPlugin CreateCustomPlugin (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPlugin' {Maybe Text
description :: Maybe Text
$sel:description:CreateCustomPlugin' :: CreateCustomPlugin -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateCustomPlugin
s@CreateCustomPlugin' {} Maybe Text
a -> CreateCustomPlugin
s {$sel:description:CreateCustomPlugin' :: Maybe Text
description = Maybe Text
a} :: CreateCustomPlugin)

-- | The type of the plugin file.
createCustomPlugin_contentType :: Lens.Lens' CreateCustomPlugin CustomPluginContentType
createCustomPlugin_contentType :: (CustomPluginContentType -> f CustomPluginContentType)
-> CreateCustomPlugin -> f CreateCustomPlugin
createCustomPlugin_contentType = (CreateCustomPlugin -> CustomPluginContentType)
-> (CreateCustomPlugin
    -> CustomPluginContentType -> CreateCustomPlugin)
-> Lens
     CreateCustomPlugin
     CreateCustomPlugin
     CustomPluginContentType
     CustomPluginContentType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPlugin' {CustomPluginContentType
contentType :: CustomPluginContentType
$sel:contentType:CreateCustomPlugin' :: CreateCustomPlugin -> CustomPluginContentType
contentType} -> CustomPluginContentType
contentType) (\s :: CreateCustomPlugin
s@CreateCustomPlugin' {} CustomPluginContentType
a -> CreateCustomPlugin
s {$sel:contentType:CreateCustomPlugin' :: CustomPluginContentType
contentType = CustomPluginContentType
a} :: CreateCustomPlugin)

-- | Information about the location of a custom plugin.
createCustomPlugin_location :: Lens.Lens' CreateCustomPlugin CustomPluginLocation
createCustomPlugin_location :: (CustomPluginLocation -> f CustomPluginLocation)
-> CreateCustomPlugin -> f CreateCustomPlugin
createCustomPlugin_location = (CreateCustomPlugin -> CustomPluginLocation)
-> (CreateCustomPlugin
    -> CustomPluginLocation -> CreateCustomPlugin)
-> Lens
     CreateCustomPlugin
     CreateCustomPlugin
     CustomPluginLocation
     CustomPluginLocation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPlugin' {CustomPluginLocation
location :: CustomPluginLocation
$sel:location:CreateCustomPlugin' :: CreateCustomPlugin -> CustomPluginLocation
location} -> CustomPluginLocation
location) (\s :: CreateCustomPlugin
s@CreateCustomPlugin' {} CustomPluginLocation
a -> CreateCustomPlugin
s {$sel:location:CreateCustomPlugin' :: CustomPluginLocation
location = CustomPluginLocation
a} :: CreateCustomPlugin)

-- | The name of the custom plugin.
createCustomPlugin_name :: Lens.Lens' CreateCustomPlugin Prelude.Text
createCustomPlugin_name :: (Text -> f Text) -> CreateCustomPlugin -> f CreateCustomPlugin
createCustomPlugin_name = (CreateCustomPlugin -> Text)
-> (CreateCustomPlugin -> Text -> CreateCustomPlugin)
-> Lens CreateCustomPlugin CreateCustomPlugin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPlugin' {Text
name :: Text
$sel:name:CreateCustomPlugin' :: CreateCustomPlugin -> Text
name} -> Text
name) (\s :: CreateCustomPlugin
s@CreateCustomPlugin' {} Text
a -> CreateCustomPlugin
s {$sel:name:CreateCustomPlugin' :: Text
name = Text
a} :: CreateCustomPlugin)

instance Core.AWSRequest CreateCustomPlugin where
  type
    AWSResponse CreateCustomPlugin =
      CreateCustomPluginResponse
  request :: CreateCustomPlugin -> Request CreateCustomPlugin
request = Service -> CreateCustomPlugin -> Request CreateCustomPlugin
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCustomPlugin
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCustomPlugin)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateCustomPlugin))
-> Logger
-> Service
-> Proxy CreateCustomPlugin
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCustomPlugin)))
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 CustomPluginState
-> Maybe Integer
-> Int
-> CreateCustomPluginResponse
CreateCustomPluginResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe CustomPluginState
 -> Maybe Integer
 -> Int
 -> CreateCustomPluginResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe CustomPluginState
      -> Maybe Integer
      -> Int
      -> CreateCustomPluginResponse)
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
"name")
            Either
  String
  (Maybe Text
   -> Maybe CustomPluginState
   -> Maybe Integer
   -> Int
   -> CreateCustomPluginResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe CustomPluginState
      -> Maybe Integer -> Int -> CreateCustomPluginResponse)
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
"customPluginArn")
            Either
  String
  (Maybe CustomPluginState
   -> Maybe Integer -> Int -> CreateCustomPluginResponse)
-> Either String (Maybe CustomPluginState)
-> Either
     String (Maybe Integer -> Int -> CreateCustomPluginResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CustomPluginState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"customPluginState")
            Either String (Maybe Integer -> Int -> CreateCustomPluginResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> CreateCustomPluginResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"revision")
            Either String (Int -> CreateCustomPluginResponse)
-> Either String Int -> Either String CreateCustomPluginResponse
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 CreateCustomPlugin

instance Prelude.NFData CreateCustomPlugin

instance Core.ToHeaders CreateCustomPlugin where
  toHeaders :: CreateCustomPlugin -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateCustomPlugin -> 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.ToJSON CreateCustomPlugin where
  toJSON :: CreateCustomPlugin -> Value
toJSON CreateCustomPlugin' {Maybe Text
Text
CustomPluginContentType
CustomPluginLocation
name :: Text
location :: CustomPluginLocation
contentType :: CustomPluginContentType
description :: Maybe Text
$sel:name:CreateCustomPlugin' :: CreateCustomPlugin -> Text
$sel:location:CreateCustomPlugin' :: CreateCustomPlugin -> CustomPluginLocation
$sel:contentType:CreateCustomPlugin' :: CreateCustomPlugin -> CustomPluginContentType
$sel:description:CreateCustomPlugin' :: CreateCustomPlugin -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"contentType" Text -> CustomPluginContentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CustomPluginContentType
contentType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"location" Text -> CustomPluginLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CustomPluginLocation
location),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

instance Core.ToPath CreateCustomPlugin where
  toPath :: CreateCustomPlugin -> ByteString
toPath = ByteString -> CreateCustomPlugin -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/custom-plugins"

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

-- | /See:/ 'newCreateCustomPluginResponse' smart constructor.
data CreateCustomPluginResponse = CreateCustomPluginResponse'
  { -- | The name of the custom plugin.
    CreateCustomPluginResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) that Amazon assigned to the custom
    -- plugin.
    CreateCustomPluginResponse -> Maybe Text
customPluginArn :: Prelude.Maybe Prelude.Text,
    -- | The state of the custom plugin.
    CreateCustomPluginResponse -> Maybe CustomPluginState
customPluginState :: Prelude.Maybe CustomPluginState,
    -- | The revision of the custom plugin.
    CreateCustomPluginResponse -> Maybe Integer
revision :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    CreateCustomPluginResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool
(CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool)
-> (CreateCustomPluginResponse
    -> CreateCustomPluginResponse -> Bool)
-> Eq CreateCustomPluginResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool
$c/= :: CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool
== :: CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool
$c== :: CreateCustomPluginResponse -> CreateCustomPluginResponse -> Bool
Prelude.Eq, ReadPrec [CreateCustomPluginResponse]
ReadPrec CreateCustomPluginResponse
Int -> ReadS CreateCustomPluginResponse
ReadS [CreateCustomPluginResponse]
(Int -> ReadS CreateCustomPluginResponse)
-> ReadS [CreateCustomPluginResponse]
-> ReadPrec CreateCustomPluginResponse
-> ReadPrec [CreateCustomPluginResponse]
-> Read CreateCustomPluginResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomPluginResponse]
$creadListPrec :: ReadPrec [CreateCustomPluginResponse]
readPrec :: ReadPrec CreateCustomPluginResponse
$creadPrec :: ReadPrec CreateCustomPluginResponse
readList :: ReadS [CreateCustomPluginResponse]
$creadList :: ReadS [CreateCustomPluginResponse]
readsPrec :: Int -> ReadS CreateCustomPluginResponse
$creadsPrec :: Int -> ReadS CreateCustomPluginResponse
Prelude.Read, Int -> CreateCustomPluginResponse -> ShowS
[CreateCustomPluginResponse] -> ShowS
CreateCustomPluginResponse -> String
(Int -> CreateCustomPluginResponse -> ShowS)
-> (CreateCustomPluginResponse -> String)
-> ([CreateCustomPluginResponse] -> ShowS)
-> Show CreateCustomPluginResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomPluginResponse] -> ShowS
$cshowList :: [CreateCustomPluginResponse] -> ShowS
show :: CreateCustomPluginResponse -> String
$cshow :: CreateCustomPluginResponse -> String
showsPrec :: Int -> CreateCustomPluginResponse -> ShowS
$cshowsPrec :: Int -> CreateCustomPluginResponse -> ShowS
Prelude.Show, (forall x.
 CreateCustomPluginResponse -> Rep CreateCustomPluginResponse x)
-> (forall x.
    Rep CreateCustomPluginResponse x -> CreateCustomPluginResponse)
-> Generic CreateCustomPluginResponse
forall x.
Rep CreateCustomPluginResponse x -> CreateCustomPluginResponse
forall x.
CreateCustomPluginResponse -> Rep CreateCustomPluginResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomPluginResponse x -> CreateCustomPluginResponse
$cfrom :: forall x.
CreateCustomPluginResponse -> Rep CreateCustomPluginResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateCustomPluginResponse' 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:
--
-- 'name', 'createCustomPluginResponse_name' - The name of the custom plugin.
--
-- 'customPluginArn', 'createCustomPluginResponse_customPluginArn' - The Amazon Resource Name (ARN) that Amazon assigned to the custom
-- plugin.
--
-- 'customPluginState', 'createCustomPluginResponse_customPluginState' - The state of the custom plugin.
--
-- 'revision', 'createCustomPluginResponse_revision' - The revision of the custom plugin.
--
-- 'httpStatus', 'createCustomPluginResponse_httpStatus' - The response's http status code.
newCreateCustomPluginResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCustomPluginResponse
newCreateCustomPluginResponse :: Int -> CreateCustomPluginResponse
newCreateCustomPluginResponse Int
pHttpStatus_ =
  CreateCustomPluginResponse' :: Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Integer
-> Int
-> CreateCustomPluginResponse
CreateCustomPluginResponse'
    { $sel:name:CreateCustomPluginResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customPluginArn:CreateCustomPluginResponse' :: Maybe Text
customPluginArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customPluginState:CreateCustomPluginResponse' :: Maybe CustomPluginState
customPluginState = Maybe CustomPluginState
forall a. Maybe a
Prelude.Nothing,
      $sel:revision:CreateCustomPluginResponse' :: Maybe Integer
revision = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCustomPluginResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The Amazon Resource Name (ARN) that Amazon assigned to the custom
-- plugin.
createCustomPluginResponse_customPluginArn :: Lens.Lens' CreateCustomPluginResponse (Prelude.Maybe Prelude.Text)
createCustomPluginResponse_customPluginArn :: (Maybe Text -> f (Maybe Text))
-> CreateCustomPluginResponse -> f CreateCustomPluginResponse
createCustomPluginResponse_customPluginArn = (CreateCustomPluginResponse -> Maybe Text)
-> (CreateCustomPluginResponse
    -> Maybe Text -> CreateCustomPluginResponse)
-> Lens
     CreateCustomPluginResponse
     CreateCustomPluginResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPluginResponse' {Maybe Text
customPluginArn :: Maybe Text
$sel:customPluginArn:CreateCustomPluginResponse' :: CreateCustomPluginResponse -> Maybe Text
customPluginArn} -> Maybe Text
customPluginArn) (\s :: CreateCustomPluginResponse
s@CreateCustomPluginResponse' {} Maybe Text
a -> CreateCustomPluginResponse
s {$sel:customPluginArn:CreateCustomPluginResponse' :: Maybe Text
customPluginArn = Maybe Text
a} :: CreateCustomPluginResponse)

-- | The state of the custom plugin.
createCustomPluginResponse_customPluginState :: Lens.Lens' CreateCustomPluginResponse (Prelude.Maybe CustomPluginState)
createCustomPluginResponse_customPluginState :: (Maybe CustomPluginState -> f (Maybe CustomPluginState))
-> CreateCustomPluginResponse -> f CreateCustomPluginResponse
createCustomPluginResponse_customPluginState = (CreateCustomPluginResponse -> Maybe CustomPluginState)
-> (CreateCustomPluginResponse
    -> Maybe CustomPluginState -> CreateCustomPluginResponse)
-> Lens
     CreateCustomPluginResponse
     CreateCustomPluginResponse
     (Maybe CustomPluginState)
     (Maybe CustomPluginState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPluginResponse' {Maybe CustomPluginState
customPluginState :: Maybe CustomPluginState
$sel:customPluginState:CreateCustomPluginResponse' :: CreateCustomPluginResponse -> Maybe CustomPluginState
customPluginState} -> Maybe CustomPluginState
customPluginState) (\s :: CreateCustomPluginResponse
s@CreateCustomPluginResponse' {} Maybe CustomPluginState
a -> CreateCustomPluginResponse
s {$sel:customPluginState:CreateCustomPluginResponse' :: Maybe CustomPluginState
customPluginState = Maybe CustomPluginState
a} :: CreateCustomPluginResponse)

-- | The revision of the custom plugin.
createCustomPluginResponse_revision :: Lens.Lens' CreateCustomPluginResponse (Prelude.Maybe Prelude.Integer)
createCustomPluginResponse_revision :: (Maybe Integer -> f (Maybe Integer))
-> CreateCustomPluginResponse -> f CreateCustomPluginResponse
createCustomPluginResponse_revision = (CreateCustomPluginResponse -> Maybe Integer)
-> (CreateCustomPluginResponse
    -> Maybe Integer -> CreateCustomPluginResponse)
-> Lens
     CreateCustomPluginResponse
     CreateCustomPluginResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomPluginResponse' {Maybe Integer
revision :: Maybe Integer
$sel:revision:CreateCustomPluginResponse' :: CreateCustomPluginResponse -> Maybe Integer
revision} -> Maybe Integer
revision) (\s :: CreateCustomPluginResponse
s@CreateCustomPluginResponse' {} Maybe Integer
a -> CreateCustomPluginResponse
s {$sel:revision:CreateCustomPluginResponse' :: Maybe Integer
revision = Maybe Integer
a} :: CreateCustomPluginResponse)

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

instance Prelude.NFData CreateCustomPluginResponse