{-# 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.MediaPackageVOD.DeletePackagingConfiguration
(
DeletePackagingConfiguration (..),
newDeletePackagingConfiguration,
deletePackagingConfiguration_id,
DeletePackagingConfigurationResponse (..),
newDeletePackagingConfigurationResponse,
deletePackagingConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaPackageVOD.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeletePackagingConfiguration = DeletePackagingConfiguration'
{
DeletePackagingConfiguration -> Text
id :: Prelude.Text
}
deriving (DeletePackagingConfiguration
-> DeletePackagingConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePackagingConfiguration
-> DeletePackagingConfiguration -> Bool
$c/= :: DeletePackagingConfiguration
-> DeletePackagingConfiguration -> Bool
== :: DeletePackagingConfiguration
-> DeletePackagingConfiguration -> Bool
$c== :: DeletePackagingConfiguration
-> DeletePackagingConfiguration -> Bool
Prelude.Eq, ReadPrec [DeletePackagingConfiguration]
ReadPrec DeletePackagingConfiguration
Int -> ReadS DeletePackagingConfiguration
ReadS [DeletePackagingConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePackagingConfiguration]
$creadListPrec :: ReadPrec [DeletePackagingConfiguration]
readPrec :: ReadPrec DeletePackagingConfiguration
$creadPrec :: ReadPrec DeletePackagingConfiguration
readList :: ReadS [DeletePackagingConfiguration]
$creadList :: ReadS [DeletePackagingConfiguration]
readsPrec :: Int -> ReadS DeletePackagingConfiguration
$creadsPrec :: Int -> ReadS DeletePackagingConfiguration
Prelude.Read, Int -> DeletePackagingConfiguration -> ShowS
[DeletePackagingConfiguration] -> ShowS
DeletePackagingConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePackagingConfiguration] -> ShowS
$cshowList :: [DeletePackagingConfiguration] -> ShowS
show :: DeletePackagingConfiguration -> String
$cshow :: DeletePackagingConfiguration -> String
showsPrec :: Int -> DeletePackagingConfiguration -> ShowS
$cshowsPrec :: Int -> DeletePackagingConfiguration -> ShowS
Prelude.Show, forall x.
Rep DeletePackagingConfiguration x -> DeletePackagingConfiguration
forall x.
DeletePackagingConfiguration -> Rep DeletePackagingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePackagingConfiguration x -> DeletePackagingConfiguration
$cfrom :: forall x.
DeletePackagingConfiguration -> Rep DeletePackagingConfiguration x
Prelude.Generic)
newDeletePackagingConfiguration ::
Prelude.Text ->
DeletePackagingConfiguration
newDeletePackagingConfiguration :: Text -> DeletePackagingConfiguration
newDeletePackagingConfiguration Text
pId_ =
DeletePackagingConfiguration' {$sel:id:DeletePackagingConfiguration' :: Text
id = Text
pId_}
deletePackagingConfiguration_id :: Lens.Lens' DeletePackagingConfiguration Prelude.Text
deletePackagingConfiguration_id :: Lens' DeletePackagingConfiguration Text
deletePackagingConfiguration_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackagingConfiguration' {Text
id :: Text
$sel:id:DeletePackagingConfiguration' :: DeletePackagingConfiguration -> Text
id} -> Text
id) (\s :: DeletePackagingConfiguration
s@DeletePackagingConfiguration' {} Text
a -> DeletePackagingConfiguration
s {$sel:id:DeletePackagingConfiguration' :: Text
id = Text
a} :: DeletePackagingConfiguration)
instance Core.AWSRequest DeletePackagingConfiguration where
type
AWSResponse DeletePackagingConfiguration =
DeletePackagingConfigurationResponse
request :: (Service -> Service)
-> DeletePackagingConfiguration
-> Request DeletePackagingConfiguration
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeletePackagingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePackagingConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeletePackagingConfigurationResponse
DeletePackagingConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DeletePackagingConfiguration
where
hashWithSalt :: Int -> DeletePackagingConfiguration -> Int
hashWithSalt Int
_salt DeletePackagingConfiguration' {Text
id :: Text
$sel:id:DeletePackagingConfiguration' :: DeletePackagingConfiguration -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance Prelude.NFData DeletePackagingConfiguration where
rnf :: DeletePackagingConfiguration -> ()
rnf DeletePackagingConfiguration' {Text
id :: Text
$sel:id:DeletePackagingConfiguration' :: DeletePackagingConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance Data.ToHeaders DeletePackagingConfiguration where
toHeaders :: DeletePackagingConfiguration -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeletePackagingConfiguration where
toPath :: DeletePackagingConfiguration -> ByteString
toPath DeletePackagingConfiguration' {Text
id :: Text
$sel:id:DeletePackagingConfiguration' :: DeletePackagingConfiguration -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/packaging_configurations/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id]
instance Data.ToQuery DeletePackagingConfiguration where
toQuery :: DeletePackagingConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeletePackagingConfigurationResponse = DeletePackagingConfigurationResponse'
{
DeletePackagingConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeletePackagingConfigurationResponse
-> DeletePackagingConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePackagingConfigurationResponse
-> DeletePackagingConfigurationResponse -> Bool
$c/= :: DeletePackagingConfigurationResponse
-> DeletePackagingConfigurationResponse -> Bool
== :: DeletePackagingConfigurationResponse
-> DeletePackagingConfigurationResponse -> Bool
$c== :: DeletePackagingConfigurationResponse
-> DeletePackagingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeletePackagingConfigurationResponse]
ReadPrec DeletePackagingConfigurationResponse
Int -> ReadS DeletePackagingConfigurationResponse
ReadS [DeletePackagingConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePackagingConfigurationResponse]
$creadListPrec :: ReadPrec [DeletePackagingConfigurationResponse]
readPrec :: ReadPrec DeletePackagingConfigurationResponse
$creadPrec :: ReadPrec DeletePackagingConfigurationResponse
readList :: ReadS [DeletePackagingConfigurationResponse]
$creadList :: ReadS [DeletePackagingConfigurationResponse]
readsPrec :: Int -> ReadS DeletePackagingConfigurationResponse
$creadsPrec :: Int -> ReadS DeletePackagingConfigurationResponse
Prelude.Read, Int -> DeletePackagingConfigurationResponse -> ShowS
[DeletePackagingConfigurationResponse] -> ShowS
DeletePackagingConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePackagingConfigurationResponse] -> ShowS
$cshowList :: [DeletePackagingConfigurationResponse] -> ShowS
show :: DeletePackagingConfigurationResponse -> String
$cshow :: DeletePackagingConfigurationResponse -> String
showsPrec :: Int -> DeletePackagingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeletePackagingConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep DeletePackagingConfigurationResponse x
-> DeletePackagingConfigurationResponse
forall x.
DeletePackagingConfigurationResponse
-> Rep DeletePackagingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePackagingConfigurationResponse x
-> DeletePackagingConfigurationResponse
$cfrom :: forall x.
DeletePackagingConfigurationResponse
-> Rep DeletePackagingConfigurationResponse x
Prelude.Generic)
newDeletePackagingConfigurationResponse ::
Prelude.Int ->
DeletePackagingConfigurationResponse
newDeletePackagingConfigurationResponse :: Int -> DeletePackagingConfigurationResponse
newDeletePackagingConfigurationResponse Int
pHttpStatus_ =
DeletePackagingConfigurationResponse'
{ $sel:httpStatus:DeletePackagingConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deletePackagingConfigurationResponse_httpStatus :: Lens.Lens' DeletePackagingConfigurationResponse Prelude.Int
deletePackagingConfigurationResponse_httpStatus :: Lens' DeletePackagingConfigurationResponse Int
deletePackagingConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackagingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePackagingConfigurationResponse' :: DeletePackagingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeletePackagingConfigurationResponse
s@DeletePackagingConfigurationResponse' {} Int
a -> DeletePackagingConfigurationResponse
s {$sel:httpStatus:DeletePackagingConfigurationResponse' :: Int
httpStatus = Int
a} :: DeletePackagingConfigurationResponse)
instance
Prelude.NFData
DeletePackagingConfigurationResponse
where
rnf :: DeletePackagingConfigurationResponse -> ()
rnf DeletePackagingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePackagingConfigurationResponse' :: DeletePackagingConfigurationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus