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