{-# 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.AlexaBusiness.DeleteNetworkProfile
(
DeleteNetworkProfile (..),
newDeleteNetworkProfile,
deleteNetworkProfile_networkProfileArn,
DeleteNetworkProfileResponse (..),
newDeleteNetworkProfileResponse,
deleteNetworkProfileResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
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 DeleteNetworkProfile = DeleteNetworkProfile'
{
DeleteNetworkProfile -> Text
networkProfileArn :: Prelude.Text
}
deriving (DeleteNetworkProfile -> DeleteNetworkProfile -> Bool
(DeleteNetworkProfile -> DeleteNetworkProfile -> Bool)
-> (DeleteNetworkProfile -> DeleteNetworkProfile -> Bool)
-> Eq DeleteNetworkProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteNetworkProfile -> DeleteNetworkProfile -> Bool
$c/= :: DeleteNetworkProfile -> DeleteNetworkProfile -> Bool
== :: DeleteNetworkProfile -> DeleteNetworkProfile -> Bool
$c== :: DeleteNetworkProfile -> DeleteNetworkProfile -> Bool
Prelude.Eq, ReadPrec [DeleteNetworkProfile]
ReadPrec DeleteNetworkProfile
Int -> ReadS DeleteNetworkProfile
ReadS [DeleteNetworkProfile]
(Int -> ReadS DeleteNetworkProfile)
-> ReadS [DeleteNetworkProfile]
-> ReadPrec DeleteNetworkProfile
-> ReadPrec [DeleteNetworkProfile]
-> Read DeleteNetworkProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteNetworkProfile]
$creadListPrec :: ReadPrec [DeleteNetworkProfile]
readPrec :: ReadPrec DeleteNetworkProfile
$creadPrec :: ReadPrec DeleteNetworkProfile
readList :: ReadS [DeleteNetworkProfile]
$creadList :: ReadS [DeleteNetworkProfile]
readsPrec :: Int -> ReadS DeleteNetworkProfile
$creadsPrec :: Int -> ReadS DeleteNetworkProfile
Prelude.Read, Int -> DeleteNetworkProfile -> ShowS
[DeleteNetworkProfile] -> ShowS
DeleteNetworkProfile -> String
(Int -> DeleteNetworkProfile -> ShowS)
-> (DeleteNetworkProfile -> String)
-> ([DeleteNetworkProfile] -> ShowS)
-> Show DeleteNetworkProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteNetworkProfile] -> ShowS
$cshowList :: [DeleteNetworkProfile] -> ShowS
show :: DeleteNetworkProfile -> String
$cshow :: DeleteNetworkProfile -> String
showsPrec :: Int -> DeleteNetworkProfile -> ShowS
$cshowsPrec :: Int -> DeleteNetworkProfile -> ShowS
Prelude.Show, (forall x. DeleteNetworkProfile -> Rep DeleteNetworkProfile x)
-> (forall x. Rep DeleteNetworkProfile x -> DeleteNetworkProfile)
-> Generic DeleteNetworkProfile
forall x. Rep DeleteNetworkProfile x -> DeleteNetworkProfile
forall x. DeleteNetworkProfile -> Rep DeleteNetworkProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteNetworkProfile x -> DeleteNetworkProfile
$cfrom :: forall x. DeleteNetworkProfile -> Rep DeleteNetworkProfile x
Prelude.Generic)
newDeleteNetworkProfile ::
Prelude.Text ->
DeleteNetworkProfile
newDeleteNetworkProfile :: Text -> DeleteNetworkProfile
newDeleteNetworkProfile Text
pNetworkProfileArn_ =
DeleteNetworkProfile' :: Text -> DeleteNetworkProfile
DeleteNetworkProfile'
{ $sel:networkProfileArn:DeleteNetworkProfile' :: Text
networkProfileArn =
Text
pNetworkProfileArn_
}
deleteNetworkProfile_networkProfileArn :: Lens.Lens' DeleteNetworkProfile Prelude.Text
deleteNetworkProfile_networkProfileArn :: (Text -> f Text) -> DeleteNetworkProfile -> f DeleteNetworkProfile
deleteNetworkProfile_networkProfileArn = (DeleteNetworkProfile -> Text)
-> (DeleteNetworkProfile -> Text -> DeleteNetworkProfile)
-> Lens DeleteNetworkProfile DeleteNetworkProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteNetworkProfile' {Text
networkProfileArn :: Text
$sel:networkProfileArn:DeleteNetworkProfile' :: DeleteNetworkProfile -> Text
networkProfileArn} -> Text
networkProfileArn) (\s :: DeleteNetworkProfile
s@DeleteNetworkProfile' {} Text
a -> DeleteNetworkProfile
s {$sel:networkProfileArn:DeleteNetworkProfile' :: Text
networkProfileArn = Text
a} :: DeleteNetworkProfile)
instance Core.AWSRequest DeleteNetworkProfile where
type
AWSResponse DeleteNetworkProfile =
DeleteNetworkProfileResponse
request :: DeleteNetworkProfile -> Request DeleteNetworkProfile
request = Service -> DeleteNetworkProfile -> Request DeleteNetworkProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteNetworkProfile)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteNetworkProfile))
-> Logger
-> Service
-> Proxy DeleteNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteNetworkProfile)))
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 -> DeleteNetworkProfileResponse
DeleteNetworkProfileResponse'
(Int -> DeleteNetworkProfileResponse)
-> Either String Int -> Either String DeleteNetworkProfileResponse
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 DeleteNetworkProfile
instance Prelude.NFData DeleteNetworkProfile
instance Core.ToHeaders DeleteNetworkProfile where
toHeaders :: DeleteNetworkProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteNetworkProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.DeleteNetworkProfile" ::
Prelude.ByteString
),
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 DeleteNetworkProfile where
toJSON :: DeleteNetworkProfile -> Value
toJSON DeleteNetworkProfile' {Text
networkProfileArn :: Text
$sel:networkProfileArn:DeleteNetworkProfile' :: DeleteNetworkProfile -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"NetworkProfileArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
networkProfileArn)
]
)
instance Core.ToPath DeleteNetworkProfile where
toPath :: DeleteNetworkProfile -> ByteString
toPath = ByteString -> DeleteNetworkProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteNetworkProfile where
toQuery :: DeleteNetworkProfile -> QueryString
toQuery = QueryString -> DeleteNetworkProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteNetworkProfileResponse = DeleteNetworkProfileResponse'
{
DeleteNetworkProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool
(DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool)
-> (DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool)
-> Eq DeleteNetworkProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool
$c/= :: DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool
== :: DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool
$c== :: DeleteNetworkProfileResponse
-> DeleteNetworkProfileResponse -> Bool
Prelude.Eq, ReadPrec [DeleteNetworkProfileResponse]
ReadPrec DeleteNetworkProfileResponse
Int -> ReadS DeleteNetworkProfileResponse
ReadS [DeleteNetworkProfileResponse]
(Int -> ReadS DeleteNetworkProfileResponse)
-> ReadS [DeleteNetworkProfileResponse]
-> ReadPrec DeleteNetworkProfileResponse
-> ReadPrec [DeleteNetworkProfileResponse]
-> Read DeleteNetworkProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteNetworkProfileResponse]
$creadListPrec :: ReadPrec [DeleteNetworkProfileResponse]
readPrec :: ReadPrec DeleteNetworkProfileResponse
$creadPrec :: ReadPrec DeleteNetworkProfileResponse
readList :: ReadS [DeleteNetworkProfileResponse]
$creadList :: ReadS [DeleteNetworkProfileResponse]
readsPrec :: Int -> ReadS DeleteNetworkProfileResponse
$creadsPrec :: Int -> ReadS DeleteNetworkProfileResponse
Prelude.Read, Int -> DeleteNetworkProfileResponse -> ShowS
[DeleteNetworkProfileResponse] -> ShowS
DeleteNetworkProfileResponse -> String
(Int -> DeleteNetworkProfileResponse -> ShowS)
-> (DeleteNetworkProfileResponse -> String)
-> ([DeleteNetworkProfileResponse] -> ShowS)
-> Show DeleteNetworkProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteNetworkProfileResponse] -> ShowS
$cshowList :: [DeleteNetworkProfileResponse] -> ShowS
show :: DeleteNetworkProfileResponse -> String
$cshow :: DeleteNetworkProfileResponse -> String
showsPrec :: Int -> DeleteNetworkProfileResponse -> ShowS
$cshowsPrec :: Int -> DeleteNetworkProfileResponse -> ShowS
Prelude.Show, (forall x.
DeleteNetworkProfileResponse -> Rep DeleteNetworkProfileResponse x)
-> (forall x.
Rep DeleteNetworkProfileResponse x -> DeleteNetworkProfileResponse)
-> Generic DeleteNetworkProfileResponse
forall x.
Rep DeleteNetworkProfileResponse x -> DeleteNetworkProfileResponse
forall x.
DeleteNetworkProfileResponse -> Rep DeleteNetworkProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteNetworkProfileResponse x -> DeleteNetworkProfileResponse
$cfrom :: forall x.
DeleteNetworkProfileResponse -> Rep DeleteNetworkProfileResponse x
Prelude.Generic)
newDeleteNetworkProfileResponse ::
Prelude.Int ->
DeleteNetworkProfileResponse
newDeleteNetworkProfileResponse :: Int -> DeleteNetworkProfileResponse
newDeleteNetworkProfileResponse Int
pHttpStatus_ =
DeleteNetworkProfileResponse' :: Int -> DeleteNetworkProfileResponse
DeleteNetworkProfileResponse'
{ $sel:httpStatus:DeleteNetworkProfileResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteNetworkProfileResponse_httpStatus :: Lens.Lens' DeleteNetworkProfileResponse Prelude.Int
deleteNetworkProfileResponse_httpStatus :: (Int -> f Int)
-> DeleteNetworkProfileResponse -> f DeleteNetworkProfileResponse
deleteNetworkProfileResponse_httpStatus = (DeleteNetworkProfileResponse -> Int)
-> (DeleteNetworkProfileResponse
-> Int -> DeleteNetworkProfileResponse)
-> Lens
DeleteNetworkProfileResponse DeleteNetworkProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteNetworkProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteNetworkProfileResponse' :: DeleteNetworkProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteNetworkProfileResponse
s@DeleteNetworkProfileResponse' {} Int
a -> DeleteNetworkProfileResponse
s {$sel:httpStatus:DeleteNetworkProfileResponse' :: Int
httpStatus = Int
a} :: DeleteNetworkProfileResponse)
instance Prelude.NFData DeleteNetworkProfileResponse