{-# 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 #-}
module Amazonka.Greengrass.DeleteConnectorDefinition
(
DeleteConnectorDefinition (..),
newDeleteConnectorDefinition,
deleteConnectorDefinition_connectorDefinitionId,
DeleteConnectorDefinitionResponse (..),
newDeleteConnectorDefinitionResponse,
deleteConnectorDefinitionResponse_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
data DeleteConnectorDefinition = DeleteConnectorDefinition'
{
DeleteConnectorDefinition -> Text
connectorDefinitionId :: Prelude.Text
}
deriving (DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool
(DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool)
-> (DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool)
-> Eq DeleteConnectorDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool
$c/= :: DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool
== :: DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool
$c== :: DeleteConnectorDefinition -> DeleteConnectorDefinition -> Bool
Prelude.Eq, ReadPrec [DeleteConnectorDefinition]
ReadPrec DeleteConnectorDefinition
Int -> ReadS DeleteConnectorDefinition
ReadS [DeleteConnectorDefinition]
(Int -> ReadS DeleteConnectorDefinition)
-> ReadS [DeleteConnectorDefinition]
-> ReadPrec DeleteConnectorDefinition
-> ReadPrec [DeleteConnectorDefinition]
-> Read DeleteConnectorDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConnectorDefinition]
$creadListPrec :: ReadPrec [DeleteConnectorDefinition]
readPrec :: ReadPrec DeleteConnectorDefinition
$creadPrec :: ReadPrec DeleteConnectorDefinition
readList :: ReadS [DeleteConnectorDefinition]
$creadList :: ReadS [DeleteConnectorDefinition]
readsPrec :: Int -> ReadS DeleteConnectorDefinition
$creadsPrec :: Int -> ReadS DeleteConnectorDefinition
Prelude.Read, Int -> DeleteConnectorDefinition -> ShowS
[DeleteConnectorDefinition] -> ShowS
DeleteConnectorDefinition -> String
(Int -> DeleteConnectorDefinition -> ShowS)
-> (DeleteConnectorDefinition -> String)
-> ([DeleteConnectorDefinition] -> ShowS)
-> Show DeleteConnectorDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConnectorDefinition] -> ShowS
$cshowList :: [DeleteConnectorDefinition] -> ShowS
show :: DeleteConnectorDefinition -> String
$cshow :: DeleteConnectorDefinition -> String
showsPrec :: Int -> DeleteConnectorDefinition -> ShowS
$cshowsPrec :: Int -> DeleteConnectorDefinition -> ShowS
Prelude.Show, (forall x.
DeleteConnectorDefinition -> Rep DeleteConnectorDefinition x)
-> (forall x.
Rep DeleteConnectorDefinition x -> DeleteConnectorDefinition)
-> Generic DeleteConnectorDefinition
forall x.
Rep DeleteConnectorDefinition x -> DeleteConnectorDefinition
forall x.
DeleteConnectorDefinition -> Rep DeleteConnectorDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConnectorDefinition x -> DeleteConnectorDefinition
$cfrom :: forall x.
DeleteConnectorDefinition -> Rep DeleteConnectorDefinition x
Prelude.Generic)
newDeleteConnectorDefinition ::
Prelude.Text ->
DeleteConnectorDefinition
newDeleteConnectorDefinition :: Text -> DeleteConnectorDefinition
newDeleteConnectorDefinition Text
pConnectorDefinitionId_ =
DeleteConnectorDefinition' :: Text -> DeleteConnectorDefinition
DeleteConnectorDefinition'
{ $sel:connectorDefinitionId:DeleteConnectorDefinition' :: Text
connectorDefinitionId =
Text
pConnectorDefinitionId_
}
deleteConnectorDefinition_connectorDefinitionId :: Lens.Lens' DeleteConnectorDefinition Prelude.Text
deleteConnectorDefinition_connectorDefinitionId :: (Text -> f Text)
-> DeleteConnectorDefinition -> f DeleteConnectorDefinition
deleteConnectorDefinition_connectorDefinitionId = (DeleteConnectorDefinition -> Text)
-> (DeleteConnectorDefinition -> Text -> DeleteConnectorDefinition)
-> Lens
DeleteConnectorDefinition DeleteConnectorDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectorDefinition' {Text
connectorDefinitionId :: Text
$sel:connectorDefinitionId:DeleteConnectorDefinition' :: DeleteConnectorDefinition -> Text
connectorDefinitionId} -> Text
connectorDefinitionId) (\s :: DeleteConnectorDefinition
s@DeleteConnectorDefinition' {} Text
a -> DeleteConnectorDefinition
s {$sel:connectorDefinitionId:DeleteConnectorDefinition' :: Text
connectorDefinitionId = Text
a} :: DeleteConnectorDefinition)
instance Core.AWSRequest DeleteConnectorDefinition where
type
AWSResponse DeleteConnectorDefinition =
DeleteConnectorDefinitionResponse
request :: DeleteConnectorDefinition -> Request DeleteConnectorDefinition
request = Service
-> DeleteConnectorDefinition -> Request DeleteConnectorDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteConnectorDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteConnectorDefinition)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteConnectorDefinition))
-> Logger
-> Service
-> Proxy DeleteConnectorDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteConnectorDefinition)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteConnectorDefinitionResponse
DeleteConnectorDefinitionResponse'
(Int -> DeleteConnectorDefinitionResponse)
-> Either String Int
-> Either String DeleteConnectorDefinitionResponse
forall (f :: * -> *) a b. Functor 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 DeleteConnectorDefinition
instance Prelude.NFData DeleteConnectorDefinition
instance Core.ToHeaders DeleteConnectorDefinition where
toHeaders :: DeleteConnectorDefinition -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteConnectorDefinition -> 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 DeleteConnectorDefinition where
toPath :: DeleteConnectorDefinition -> ByteString
toPath DeleteConnectorDefinition' {Text
connectorDefinitionId :: Text
$sel:connectorDefinitionId:DeleteConnectorDefinition' :: DeleteConnectorDefinition -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/greengrass/definition/connectors/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
connectorDefinitionId
]
instance Core.ToQuery DeleteConnectorDefinition where
toQuery :: DeleteConnectorDefinition -> QueryString
toQuery = QueryString -> DeleteConnectorDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteConnectorDefinitionResponse = DeleteConnectorDefinitionResponse'
{
DeleteConnectorDefinitionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool
(DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool)
-> (DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool)
-> Eq DeleteConnectorDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool
$c/= :: DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool
== :: DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool
$c== :: DeleteConnectorDefinitionResponse
-> DeleteConnectorDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteConnectorDefinitionResponse]
ReadPrec DeleteConnectorDefinitionResponse
Int -> ReadS DeleteConnectorDefinitionResponse
ReadS [DeleteConnectorDefinitionResponse]
(Int -> ReadS DeleteConnectorDefinitionResponse)
-> ReadS [DeleteConnectorDefinitionResponse]
-> ReadPrec DeleteConnectorDefinitionResponse
-> ReadPrec [DeleteConnectorDefinitionResponse]
-> Read DeleteConnectorDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConnectorDefinitionResponse]
$creadListPrec :: ReadPrec [DeleteConnectorDefinitionResponse]
readPrec :: ReadPrec DeleteConnectorDefinitionResponse
$creadPrec :: ReadPrec DeleteConnectorDefinitionResponse
readList :: ReadS [DeleteConnectorDefinitionResponse]
$creadList :: ReadS [DeleteConnectorDefinitionResponse]
readsPrec :: Int -> ReadS DeleteConnectorDefinitionResponse
$creadsPrec :: Int -> ReadS DeleteConnectorDefinitionResponse
Prelude.Read, Int -> DeleteConnectorDefinitionResponse -> ShowS
[DeleteConnectorDefinitionResponse] -> ShowS
DeleteConnectorDefinitionResponse -> String
(Int -> DeleteConnectorDefinitionResponse -> ShowS)
-> (DeleteConnectorDefinitionResponse -> String)
-> ([DeleteConnectorDefinitionResponse] -> ShowS)
-> Show DeleteConnectorDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConnectorDefinitionResponse] -> ShowS
$cshowList :: [DeleteConnectorDefinitionResponse] -> ShowS
show :: DeleteConnectorDefinitionResponse -> String
$cshow :: DeleteConnectorDefinitionResponse -> String
showsPrec :: Int -> DeleteConnectorDefinitionResponse -> ShowS
$cshowsPrec :: Int -> DeleteConnectorDefinitionResponse -> ShowS
Prelude.Show, (forall x.
DeleteConnectorDefinitionResponse
-> Rep DeleteConnectorDefinitionResponse x)
-> (forall x.
Rep DeleteConnectorDefinitionResponse x
-> DeleteConnectorDefinitionResponse)
-> Generic DeleteConnectorDefinitionResponse
forall x.
Rep DeleteConnectorDefinitionResponse x
-> DeleteConnectorDefinitionResponse
forall x.
DeleteConnectorDefinitionResponse
-> Rep DeleteConnectorDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConnectorDefinitionResponse x
-> DeleteConnectorDefinitionResponse
$cfrom :: forall x.
DeleteConnectorDefinitionResponse
-> Rep DeleteConnectorDefinitionResponse x
Prelude.Generic)
newDeleteConnectorDefinitionResponse ::
Prelude.Int ->
DeleteConnectorDefinitionResponse
newDeleteConnectorDefinitionResponse :: Int -> DeleteConnectorDefinitionResponse
newDeleteConnectorDefinitionResponse Int
pHttpStatus_ =
DeleteConnectorDefinitionResponse' :: Int -> DeleteConnectorDefinitionResponse
DeleteConnectorDefinitionResponse'
{ $sel:httpStatus:DeleteConnectorDefinitionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteConnectorDefinitionResponse_httpStatus :: Lens.Lens' DeleteConnectorDefinitionResponse Prelude.Int
deleteConnectorDefinitionResponse_httpStatus :: (Int -> f Int)
-> DeleteConnectorDefinitionResponse
-> f DeleteConnectorDefinitionResponse
deleteConnectorDefinitionResponse_httpStatus = (DeleteConnectorDefinitionResponse -> Int)
-> (DeleteConnectorDefinitionResponse
-> Int -> DeleteConnectorDefinitionResponse)
-> Lens
DeleteConnectorDefinitionResponse
DeleteConnectorDefinitionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectorDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteConnectorDefinitionResponse' :: DeleteConnectorDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteConnectorDefinitionResponse
s@DeleteConnectorDefinitionResponse' {} Int
a -> DeleteConnectorDefinitionResponse
s {$sel:httpStatus:DeleteConnectorDefinitionResponse' :: Int
httpStatus = Int
a} :: DeleteConnectorDefinitionResponse)
instance
Prelude.NFData
DeleteConnectorDefinitionResponse