{-# 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.CloudFront.DeleteStreamingDistribution
(
DeleteStreamingDistribution (..),
newDeleteStreamingDistribution,
deleteStreamingDistribution_ifMatch,
deleteStreamingDistribution_id,
DeleteStreamingDistributionResponse (..),
newDeleteStreamingDistributionResponse,
)
where
import Amazonka.CloudFront.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 DeleteStreamingDistribution = DeleteStreamingDistribution'
{
DeleteStreamingDistribution -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
DeleteStreamingDistribution -> Text
id :: Prelude.Text
}
deriving (DeleteStreamingDistribution -> DeleteStreamingDistribution -> Bool
(DeleteStreamingDistribution
-> DeleteStreamingDistribution -> Bool)
-> (DeleteStreamingDistribution
-> DeleteStreamingDistribution -> Bool)
-> Eq DeleteStreamingDistribution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStreamingDistribution -> DeleteStreamingDistribution -> Bool
$c/= :: DeleteStreamingDistribution -> DeleteStreamingDistribution -> Bool
== :: DeleteStreamingDistribution -> DeleteStreamingDistribution -> Bool
$c== :: DeleteStreamingDistribution -> DeleteStreamingDistribution -> Bool
Prelude.Eq, ReadPrec [DeleteStreamingDistribution]
ReadPrec DeleteStreamingDistribution
Int -> ReadS DeleteStreamingDistribution
ReadS [DeleteStreamingDistribution]
(Int -> ReadS DeleteStreamingDistribution)
-> ReadS [DeleteStreamingDistribution]
-> ReadPrec DeleteStreamingDistribution
-> ReadPrec [DeleteStreamingDistribution]
-> Read DeleteStreamingDistribution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStreamingDistribution]
$creadListPrec :: ReadPrec [DeleteStreamingDistribution]
readPrec :: ReadPrec DeleteStreamingDistribution
$creadPrec :: ReadPrec DeleteStreamingDistribution
readList :: ReadS [DeleteStreamingDistribution]
$creadList :: ReadS [DeleteStreamingDistribution]
readsPrec :: Int -> ReadS DeleteStreamingDistribution
$creadsPrec :: Int -> ReadS DeleteStreamingDistribution
Prelude.Read, Int -> DeleteStreamingDistribution -> ShowS
[DeleteStreamingDistribution] -> ShowS
DeleteStreamingDistribution -> String
(Int -> DeleteStreamingDistribution -> ShowS)
-> (DeleteStreamingDistribution -> String)
-> ([DeleteStreamingDistribution] -> ShowS)
-> Show DeleteStreamingDistribution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStreamingDistribution] -> ShowS
$cshowList :: [DeleteStreamingDistribution] -> ShowS
show :: DeleteStreamingDistribution -> String
$cshow :: DeleteStreamingDistribution -> String
showsPrec :: Int -> DeleteStreamingDistribution -> ShowS
$cshowsPrec :: Int -> DeleteStreamingDistribution -> ShowS
Prelude.Show, (forall x.
DeleteStreamingDistribution -> Rep DeleteStreamingDistribution x)
-> (forall x.
Rep DeleteStreamingDistribution x -> DeleteStreamingDistribution)
-> Generic DeleteStreamingDistribution
forall x.
Rep DeleteStreamingDistribution x -> DeleteStreamingDistribution
forall x.
DeleteStreamingDistribution -> Rep DeleteStreamingDistribution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteStreamingDistribution x -> DeleteStreamingDistribution
$cfrom :: forall x.
DeleteStreamingDistribution -> Rep DeleteStreamingDistribution x
Prelude.Generic)
newDeleteStreamingDistribution ::
Prelude.Text ->
DeleteStreamingDistribution
newDeleteStreamingDistribution :: Text -> DeleteStreamingDistribution
newDeleteStreamingDistribution Text
pId_ =
DeleteStreamingDistribution' :: Maybe Text -> Text -> DeleteStreamingDistribution
DeleteStreamingDistribution'
{ $sel:ifMatch:DeleteStreamingDistribution' :: Maybe Text
ifMatch =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:DeleteStreamingDistribution' :: Text
id = Text
pId_
}
deleteStreamingDistribution_ifMatch :: Lens.Lens' DeleteStreamingDistribution (Prelude.Maybe Prelude.Text)
deleteStreamingDistribution_ifMatch :: (Maybe Text -> f (Maybe Text))
-> DeleteStreamingDistribution -> f DeleteStreamingDistribution
deleteStreamingDistribution_ifMatch = (DeleteStreamingDistribution -> Maybe Text)
-> (DeleteStreamingDistribution
-> Maybe Text -> DeleteStreamingDistribution)
-> Lens
DeleteStreamingDistribution
DeleteStreamingDistribution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingDistribution' {Maybe Text
ifMatch :: Maybe Text
$sel:ifMatch:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Maybe Text
ifMatch} -> Maybe Text
ifMatch) (\s :: DeleteStreamingDistribution
s@DeleteStreamingDistribution' {} Maybe Text
a -> DeleteStreamingDistribution
s {$sel:ifMatch:DeleteStreamingDistribution' :: Maybe Text
ifMatch = Maybe Text
a} :: DeleteStreamingDistribution)
deleteStreamingDistribution_id :: Lens.Lens' DeleteStreamingDistribution Prelude.Text
deleteStreamingDistribution_id :: (Text -> f Text)
-> DeleteStreamingDistribution -> f DeleteStreamingDistribution
deleteStreamingDistribution_id = (DeleteStreamingDistribution -> Text)
-> (DeleteStreamingDistribution
-> Text -> DeleteStreamingDistribution)
-> Lens
DeleteStreamingDistribution DeleteStreamingDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingDistribution' {Text
id :: Text
$sel:id:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Text
id} -> Text
id) (\s :: DeleteStreamingDistribution
s@DeleteStreamingDistribution' {} Text
a -> DeleteStreamingDistribution
s {$sel:id:DeleteStreamingDistribution' :: Text
id = Text
a} :: DeleteStreamingDistribution)
instance Core.AWSRequest DeleteStreamingDistribution where
type
AWSResponse DeleteStreamingDistribution =
DeleteStreamingDistributionResponse
request :: DeleteStreamingDistribution -> Request DeleteStreamingDistribution
request = Service
-> DeleteStreamingDistribution
-> Request DeleteStreamingDistribution
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteStreamingDistribution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteStreamingDistribution)))
response =
AWSResponse DeleteStreamingDistribution
-> Logger
-> Service
-> Proxy DeleteStreamingDistribution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteStreamingDistribution)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteStreamingDistribution
DeleteStreamingDistributionResponse
DeleteStreamingDistributionResponse'
instance Prelude.Hashable DeleteStreamingDistribution
instance Prelude.NFData DeleteStreamingDistribution
instance Core.ToHeaders DeleteStreamingDistribution where
toHeaders :: DeleteStreamingDistribution -> [Header]
toHeaders DeleteStreamingDistribution' {Maybe Text
Text
id :: Text
ifMatch :: Maybe Text
$sel:id:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Text
$sel:ifMatch:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Maybe Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat [HeaderName
"If-Match" HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
ifMatch]
instance Core.ToPath DeleteStreamingDistribution where
toPath :: DeleteStreamingDistribution -> ByteString
toPath DeleteStreamingDistribution' {Maybe Text
Text
id :: Text
ifMatch :: Maybe Text
$sel:id:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Text
$sel:ifMatch:DeleteStreamingDistribution' :: DeleteStreamingDistribution -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2020-05-31/streaming-distribution/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeleteStreamingDistribution where
toQuery :: DeleteStreamingDistribution -> QueryString
toQuery = QueryString -> DeleteStreamingDistribution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteStreamingDistributionResponse = DeleteStreamingDistributionResponse'
{
}
deriving (DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool
(DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool)
-> (DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool)
-> Eq DeleteStreamingDistributionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool
$c/= :: DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool
== :: DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool
$c== :: DeleteStreamingDistributionResponse
-> DeleteStreamingDistributionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteStreamingDistributionResponse]
ReadPrec DeleteStreamingDistributionResponse
Int -> ReadS DeleteStreamingDistributionResponse
ReadS [DeleteStreamingDistributionResponse]
(Int -> ReadS DeleteStreamingDistributionResponse)
-> ReadS [DeleteStreamingDistributionResponse]
-> ReadPrec DeleteStreamingDistributionResponse
-> ReadPrec [DeleteStreamingDistributionResponse]
-> Read DeleteStreamingDistributionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStreamingDistributionResponse]
$creadListPrec :: ReadPrec [DeleteStreamingDistributionResponse]
readPrec :: ReadPrec DeleteStreamingDistributionResponse
$creadPrec :: ReadPrec DeleteStreamingDistributionResponse
readList :: ReadS [DeleteStreamingDistributionResponse]
$creadList :: ReadS [DeleteStreamingDistributionResponse]
readsPrec :: Int -> ReadS DeleteStreamingDistributionResponse
$creadsPrec :: Int -> ReadS DeleteStreamingDistributionResponse
Prelude.Read, Int -> DeleteStreamingDistributionResponse -> ShowS
[DeleteStreamingDistributionResponse] -> ShowS
DeleteStreamingDistributionResponse -> String
(Int -> DeleteStreamingDistributionResponse -> ShowS)
-> (DeleteStreamingDistributionResponse -> String)
-> ([DeleteStreamingDistributionResponse] -> ShowS)
-> Show DeleteStreamingDistributionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStreamingDistributionResponse] -> ShowS
$cshowList :: [DeleteStreamingDistributionResponse] -> ShowS
show :: DeleteStreamingDistributionResponse -> String
$cshow :: DeleteStreamingDistributionResponse -> String
showsPrec :: Int -> DeleteStreamingDistributionResponse -> ShowS
$cshowsPrec :: Int -> DeleteStreamingDistributionResponse -> ShowS
Prelude.Show, (forall x.
DeleteStreamingDistributionResponse
-> Rep DeleteStreamingDistributionResponse x)
-> (forall x.
Rep DeleteStreamingDistributionResponse x
-> DeleteStreamingDistributionResponse)
-> Generic DeleteStreamingDistributionResponse
forall x.
Rep DeleteStreamingDistributionResponse x
-> DeleteStreamingDistributionResponse
forall x.
DeleteStreamingDistributionResponse
-> Rep DeleteStreamingDistributionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteStreamingDistributionResponse x
-> DeleteStreamingDistributionResponse
$cfrom :: forall x.
DeleteStreamingDistributionResponse
-> Rep DeleteStreamingDistributionResponse x
Prelude.Generic)
newDeleteStreamingDistributionResponse ::
DeleteStreamingDistributionResponse
newDeleteStreamingDistributionResponse :: DeleteStreamingDistributionResponse
newDeleteStreamingDistributionResponse =
DeleteStreamingDistributionResponse
DeleteStreamingDistributionResponse'
instance
Prelude.NFData
DeleteStreamingDistributionResponse