{-# 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.IoTWireless.DeleteServiceProfile
(
DeleteServiceProfile (..),
newDeleteServiceProfile,
deleteServiceProfile_id,
DeleteServiceProfileResponse (..),
newDeleteServiceProfileResponse,
deleteServiceProfileResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.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 DeleteServiceProfile = DeleteServiceProfile'
{
DeleteServiceProfile -> Text
id :: Prelude.Text
}
deriving (DeleteServiceProfile -> DeleteServiceProfile -> Bool
(DeleteServiceProfile -> DeleteServiceProfile -> Bool)
-> (DeleteServiceProfile -> DeleteServiceProfile -> Bool)
-> Eq DeleteServiceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteServiceProfile -> DeleteServiceProfile -> Bool
$c/= :: DeleteServiceProfile -> DeleteServiceProfile -> Bool
== :: DeleteServiceProfile -> DeleteServiceProfile -> Bool
$c== :: DeleteServiceProfile -> DeleteServiceProfile -> Bool
Prelude.Eq, ReadPrec [DeleteServiceProfile]
ReadPrec DeleteServiceProfile
Int -> ReadS DeleteServiceProfile
ReadS [DeleteServiceProfile]
(Int -> ReadS DeleteServiceProfile)
-> ReadS [DeleteServiceProfile]
-> ReadPrec DeleteServiceProfile
-> ReadPrec [DeleteServiceProfile]
-> Read DeleteServiceProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteServiceProfile]
$creadListPrec :: ReadPrec [DeleteServiceProfile]
readPrec :: ReadPrec DeleteServiceProfile
$creadPrec :: ReadPrec DeleteServiceProfile
readList :: ReadS [DeleteServiceProfile]
$creadList :: ReadS [DeleteServiceProfile]
readsPrec :: Int -> ReadS DeleteServiceProfile
$creadsPrec :: Int -> ReadS DeleteServiceProfile
Prelude.Read, Int -> DeleteServiceProfile -> ShowS
[DeleteServiceProfile] -> ShowS
DeleteServiceProfile -> String
(Int -> DeleteServiceProfile -> ShowS)
-> (DeleteServiceProfile -> String)
-> ([DeleteServiceProfile] -> ShowS)
-> Show DeleteServiceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteServiceProfile] -> ShowS
$cshowList :: [DeleteServiceProfile] -> ShowS
show :: DeleteServiceProfile -> String
$cshow :: DeleteServiceProfile -> String
showsPrec :: Int -> DeleteServiceProfile -> ShowS
$cshowsPrec :: Int -> DeleteServiceProfile -> ShowS
Prelude.Show, (forall x. DeleteServiceProfile -> Rep DeleteServiceProfile x)
-> (forall x. Rep DeleteServiceProfile x -> DeleteServiceProfile)
-> Generic DeleteServiceProfile
forall x. Rep DeleteServiceProfile x -> DeleteServiceProfile
forall x. DeleteServiceProfile -> Rep DeleteServiceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteServiceProfile x -> DeleteServiceProfile
$cfrom :: forall x. DeleteServiceProfile -> Rep DeleteServiceProfile x
Prelude.Generic)
newDeleteServiceProfile ::
Prelude.Text ->
DeleteServiceProfile
newDeleteServiceProfile :: Text -> DeleteServiceProfile
newDeleteServiceProfile Text
pId_ =
DeleteServiceProfile' :: Text -> DeleteServiceProfile
DeleteServiceProfile' {$sel:id:DeleteServiceProfile' :: Text
id = Text
pId_}
deleteServiceProfile_id :: Lens.Lens' DeleteServiceProfile Prelude.Text
deleteServiceProfile_id :: (Text -> f Text) -> DeleteServiceProfile -> f DeleteServiceProfile
deleteServiceProfile_id = (DeleteServiceProfile -> Text)
-> (DeleteServiceProfile -> Text -> DeleteServiceProfile)
-> Lens DeleteServiceProfile DeleteServiceProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteServiceProfile' {Text
id :: Text
$sel:id:DeleteServiceProfile' :: DeleteServiceProfile -> Text
id} -> Text
id) (\s :: DeleteServiceProfile
s@DeleteServiceProfile' {} Text
a -> DeleteServiceProfile
s {$sel:id:DeleteServiceProfile' :: Text
id = Text
a} :: DeleteServiceProfile)
instance Core.AWSRequest DeleteServiceProfile where
type
AWSResponse DeleteServiceProfile =
DeleteServiceProfileResponse
request :: DeleteServiceProfile -> Request DeleteServiceProfile
request = Service -> DeleteServiceProfile -> Request DeleteServiceProfile
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteServiceProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteServiceProfile)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteServiceProfile))
-> Logger
-> Service
-> Proxy DeleteServiceProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteServiceProfile)))
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 -> DeleteServiceProfileResponse
DeleteServiceProfileResponse'
(Int -> DeleteServiceProfileResponse)
-> Either String Int -> Either String DeleteServiceProfileResponse
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 DeleteServiceProfile
instance Prelude.NFData DeleteServiceProfile
instance Core.ToHeaders DeleteServiceProfile where
toHeaders :: DeleteServiceProfile -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteServiceProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteServiceProfile where
toPath :: DeleteServiceProfile -> ByteString
toPath DeleteServiceProfile' {Text
id :: Text
$sel:id:DeleteServiceProfile' :: DeleteServiceProfile -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/service-profiles/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeleteServiceProfile where
toQuery :: DeleteServiceProfile -> QueryString
toQuery = QueryString -> DeleteServiceProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteServiceProfileResponse = DeleteServiceProfileResponse'
{
DeleteServiceProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool
(DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool)
-> (DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool)
-> Eq DeleteServiceProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool
$c/= :: DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool
== :: DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool
$c== :: DeleteServiceProfileResponse
-> DeleteServiceProfileResponse -> Bool
Prelude.Eq, ReadPrec [DeleteServiceProfileResponse]
ReadPrec DeleteServiceProfileResponse
Int -> ReadS DeleteServiceProfileResponse
ReadS [DeleteServiceProfileResponse]
(Int -> ReadS DeleteServiceProfileResponse)
-> ReadS [DeleteServiceProfileResponse]
-> ReadPrec DeleteServiceProfileResponse
-> ReadPrec [DeleteServiceProfileResponse]
-> Read DeleteServiceProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteServiceProfileResponse]
$creadListPrec :: ReadPrec [DeleteServiceProfileResponse]
readPrec :: ReadPrec DeleteServiceProfileResponse
$creadPrec :: ReadPrec DeleteServiceProfileResponse
readList :: ReadS [DeleteServiceProfileResponse]
$creadList :: ReadS [DeleteServiceProfileResponse]
readsPrec :: Int -> ReadS DeleteServiceProfileResponse
$creadsPrec :: Int -> ReadS DeleteServiceProfileResponse
Prelude.Read, Int -> DeleteServiceProfileResponse -> ShowS
[DeleteServiceProfileResponse] -> ShowS
DeleteServiceProfileResponse -> String
(Int -> DeleteServiceProfileResponse -> ShowS)
-> (DeleteServiceProfileResponse -> String)
-> ([DeleteServiceProfileResponse] -> ShowS)
-> Show DeleteServiceProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteServiceProfileResponse] -> ShowS
$cshowList :: [DeleteServiceProfileResponse] -> ShowS
show :: DeleteServiceProfileResponse -> String
$cshow :: DeleteServiceProfileResponse -> String
showsPrec :: Int -> DeleteServiceProfileResponse -> ShowS
$cshowsPrec :: Int -> DeleteServiceProfileResponse -> ShowS
Prelude.Show, (forall x.
DeleteServiceProfileResponse -> Rep DeleteServiceProfileResponse x)
-> (forall x.
Rep DeleteServiceProfileResponse x -> DeleteServiceProfileResponse)
-> Generic DeleteServiceProfileResponse
forall x.
Rep DeleteServiceProfileResponse x -> DeleteServiceProfileResponse
forall x.
DeleteServiceProfileResponse -> Rep DeleteServiceProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteServiceProfileResponse x -> DeleteServiceProfileResponse
$cfrom :: forall x.
DeleteServiceProfileResponse -> Rep DeleteServiceProfileResponse x
Prelude.Generic)
newDeleteServiceProfileResponse ::
Prelude.Int ->
DeleteServiceProfileResponse
newDeleteServiceProfileResponse :: Int -> DeleteServiceProfileResponse
newDeleteServiceProfileResponse Int
pHttpStatus_ =
DeleteServiceProfileResponse' :: Int -> DeleteServiceProfileResponse
DeleteServiceProfileResponse'
{ $sel:httpStatus:DeleteServiceProfileResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteServiceProfileResponse_httpStatus :: Lens.Lens' DeleteServiceProfileResponse Prelude.Int
deleteServiceProfileResponse_httpStatus :: (Int -> f Int)
-> DeleteServiceProfileResponse -> f DeleteServiceProfileResponse
deleteServiceProfileResponse_httpStatus = (DeleteServiceProfileResponse -> Int)
-> (DeleteServiceProfileResponse
-> Int -> DeleteServiceProfileResponse)
-> Lens
DeleteServiceProfileResponse DeleteServiceProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteServiceProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteServiceProfileResponse' :: DeleteServiceProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteServiceProfileResponse
s@DeleteServiceProfileResponse' {} Int
a -> DeleteServiceProfileResponse
s {$sel:httpStatus:DeleteServiceProfileResponse' :: Int
httpStatus = Int
a} :: DeleteServiceProfileResponse)
instance Prelude.NFData DeleteServiceProfileResponse