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