{-# 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.DeletePrefetchSchedule
(
DeletePrefetchSchedule (..),
newDeletePrefetchSchedule,
deletePrefetchSchedule_name,
deletePrefetchSchedule_playbackConfigurationName,
DeletePrefetchScheduleResponse (..),
newDeletePrefetchScheduleResponse,
deletePrefetchScheduleResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaTailor.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeletePrefetchSchedule = DeletePrefetchSchedule'
{
DeletePrefetchSchedule -> Text
name :: Prelude.Text,
DeletePrefetchSchedule -> Text
playbackConfigurationName :: Prelude.Text
}
deriving (DeletePrefetchSchedule -> DeletePrefetchSchedule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePrefetchSchedule -> DeletePrefetchSchedule -> Bool
$c/= :: DeletePrefetchSchedule -> DeletePrefetchSchedule -> Bool
== :: DeletePrefetchSchedule -> DeletePrefetchSchedule -> Bool
$c== :: DeletePrefetchSchedule -> DeletePrefetchSchedule -> Bool
Prelude.Eq, ReadPrec [DeletePrefetchSchedule]
ReadPrec DeletePrefetchSchedule
Int -> ReadS DeletePrefetchSchedule
ReadS [DeletePrefetchSchedule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePrefetchSchedule]
$creadListPrec :: ReadPrec [DeletePrefetchSchedule]
readPrec :: ReadPrec DeletePrefetchSchedule
$creadPrec :: ReadPrec DeletePrefetchSchedule
readList :: ReadS [DeletePrefetchSchedule]
$creadList :: ReadS [DeletePrefetchSchedule]
readsPrec :: Int -> ReadS DeletePrefetchSchedule
$creadsPrec :: Int -> ReadS DeletePrefetchSchedule
Prelude.Read, Int -> DeletePrefetchSchedule -> ShowS
[DeletePrefetchSchedule] -> ShowS
DeletePrefetchSchedule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePrefetchSchedule] -> ShowS
$cshowList :: [DeletePrefetchSchedule] -> ShowS
show :: DeletePrefetchSchedule -> String
$cshow :: DeletePrefetchSchedule -> String
showsPrec :: Int -> DeletePrefetchSchedule -> ShowS
$cshowsPrec :: Int -> DeletePrefetchSchedule -> ShowS
Prelude.Show, forall x. Rep DeletePrefetchSchedule x -> DeletePrefetchSchedule
forall x. DeletePrefetchSchedule -> Rep DeletePrefetchSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePrefetchSchedule x -> DeletePrefetchSchedule
$cfrom :: forall x. DeletePrefetchSchedule -> Rep DeletePrefetchSchedule x
Prelude.Generic)
newDeletePrefetchSchedule ::
Prelude.Text ->
Prelude.Text ->
DeletePrefetchSchedule
newDeletePrefetchSchedule :: Text -> Text -> DeletePrefetchSchedule
newDeletePrefetchSchedule
Text
pName_
Text
pPlaybackConfigurationName_ =
DeletePrefetchSchedule'
{ $sel:name:DeletePrefetchSchedule' :: Text
name = Text
pName_,
$sel:playbackConfigurationName:DeletePrefetchSchedule' :: Text
playbackConfigurationName =
Text
pPlaybackConfigurationName_
}
deletePrefetchSchedule_name :: Lens.Lens' DeletePrefetchSchedule Prelude.Text
deletePrefetchSchedule_name :: Lens' DeletePrefetchSchedule Text
deletePrefetchSchedule_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePrefetchSchedule' {Text
name :: Text
$sel:name:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
name} -> Text
name) (\s :: DeletePrefetchSchedule
s@DeletePrefetchSchedule' {} Text
a -> DeletePrefetchSchedule
s {$sel:name:DeletePrefetchSchedule' :: Text
name = Text
a} :: DeletePrefetchSchedule)
deletePrefetchSchedule_playbackConfigurationName :: Lens.Lens' DeletePrefetchSchedule Prelude.Text
deletePrefetchSchedule_playbackConfigurationName :: Lens' DeletePrefetchSchedule Text
deletePrefetchSchedule_playbackConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePrefetchSchedule' {Text
playbackConfigurationName :: Text
$sel:playbackConfigurationName:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
playbackConfigurationName} -> Text
playbackConfigurationName) (\s :: DeletePrefetchSchedule
s@DeletePrefetchSchedule' {} Text
a -> DeletePrefetchSchedule
s {$sel:playbackConfigurationName:DeletePrefetchSchedule' :: Text
playbackConfigurationName = Text
a} :: DeletePrefetchSchedule)
instance Core.AWSRequest DeletePrefetchSchedule where
type
AWSResponse DeletePrefetchSchedule =
DeletePrefetchScheduleResponse
request :: (Service -> Service)
-> DeletePrefetchSchedule -> Request DeletePrefetchSchedule
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 DeletePrefetchSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePrefetchSchedule)))
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 -> DeletePrefetchScheduleResponse
DeletePrefetchScheduleResponse'
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 DeletePrefetchSchedule where
hashWithSalt :: Int -> DeletePrefetchSchedule -> Int
hashWithSalt Int
_salt DeletePrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
$sel:name:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
playbackConfigurationName
instance Prelude.NFData DeletePrefetchSchedule where
rnf :: DeletePrefetchSchedule -> ()
rnf DeletePrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
$sel:name:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
playbackConfigurationName
instance Data.ToHeaders DeletePrefetchSchedule where
toHeaders :: DeletePrefetchSchedule -> 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 DeletePrefetchSchedule where
toPath :: DeletePrefetchSchedule -> ByteString
toPath DeletePrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
$sel:name:DeletePrefetchSchedule' :: DeletePrefetchSchedule -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/prefetchSchedule/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
playbackConfigurationName,
ByteString
"/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
name
]
instance Data.ToQuery DeletePrefetchSchedule where
toQuery :: DeletePrefetchSchedule -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeletePrefetchScheduleResponse = DeletePrefetchScheduleResponse'
{
DeletePrefetchScheduleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeletePrefetchScheduleResponse
-> DeletePrefetchScheduleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePrefetchScheduleResponse
-> DeletePrefetchScheduleResponse -> Bool
$c/= :: DeletePrefetchScheduleResponse
-> DeletePrefetchScheduleResponse -> Bool
== :: DeletePrefetchScheduleResponse
-> DeletePrefetchScheduleResponse -> Bool
$c== :: DeletePrefetchScheduleResponse
-> DeletePrefetchScheduleResponse -> Bool
Prelude.Eq, ReadPrec [DeletePrefetchScheduleResponse]
ReadPrec DeletePrefetchScheduleResponse
Int -> ReadS DeletePrefetchScheduleResponse
ReadS [DeletePrefetchScheduleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePrefetchScheduleResponse]
$creadListPrec :: ReadPrec [DeletePrefetchScheduleResponse]
readPrec :: ReadPrec DeletePrefetchScheduleResponse
$creadPrec :: ReadPrec DeletePrefetchScheduleResponse
readList :: ReadS [DeletePrefetchScheduleResponse]
$creadList :: ReadS [DeletePrefetchScheduleResponse]
readsPrec :: Int -> ReadS DeletePrefetchScheduleResponse
$creadsPrec :: Int -> ReadS DeletePrefetchScheduleResponse
Prelude.Read, Int -> DeletePrefetchScheduleResponse -> ShowS
[DeletePrefetchScheduleResponse] -> ShowS
DeletePrefetchScheduleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePrefetchScheduleResponse] -> ShowS
$cshowList :: [DeletePrefetchScheduleResponse] -> ShowS
show :: DeletePrefetchScheduleResponse -> String
$cshow :: DeletePrefetchScheduleResponse -> String
showsPrec :: Int -> DeletePrefetchScheduleResponse -> ShowS
$cshowsPrec :: Int -> DeletePrefetchScheduleResponse -> ShowS
Prelude.Show, forall x.
Rep DeletePrefetchScheduleResponse x
-> DeletePrefetchScheduleResponse
forall x.
DeletePrefetchScheduleResponse
-> Rep DeletePrefetchScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePrefetchScheduleResponse x
-> DeletePrefetchScheduleResponse
$cfrom :: forall x.
DeletePrefetchScheduleResponse
-> Rep DeletePrefetchScheduleResponse x
Prelude.Generic)
newDeletePrefetchScheduleResponse ::
Prelude.Int ->
DeletePrefetchScheduleResponse
newDeletePrefetchScheduleResponse :: Int -> DeletePrefetchScheduleResponse
newDeletePrefetchScheduleResponse Int
pHttpStatus_ =
DeletePrefetchScheduleResponse'
{ $sel:httpStatus:DeletePrefetchScheduleResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deletePrefetchScheduleResponse_httpStatus :: Lens.Lens' DeletePrefetchScheduleResponse Prelude.Int
deletePrefetchScheduleResponse_httpStatus :: Lens' DeletePrefetchScheduleResponse Int
deletePrefetchScheduleResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePrefetchScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePrefetchScheduleResponse' :: DeletePrefetchScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeletePrefetchScheduleResponse
s@DeletePrefetchScheduleResponse' {} Int
a -> DeletePrefetchScheduleResponse
s {$sel:httpStatus:DeletePrefetchScheduleResponse' :: Int
httpStatus = Int
a} :: DeletePrefetchScheduleResponse)
instance
Prelude.NFData
DeletePrefetchScheduleResponse
where
rnf :: DeletePrefetchScheduleResponse -> ()
rnf DeletePrefetchScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePrefetchScheduleResponse' :: DeletePrefetchScheduleResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus