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