{-# 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.EMR.RemoveManagedScalingPolicy
(
RemoveManagedScalingPolicy (..),
newRemoveManagedScalingPolicy,
removeManagedScalingPolicy_clusterId,
RemoveManagedScalingPolicyResponse (..),
newRemoveManagedScalingPolicyResponse,
removeManagedScalingPolicyResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMR.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveManagedScalingPolicy = RemoveManagedScalingPolicy'
{
RemoveManagedScalingPolicy -> Text
clusterId :: Prelude.Text
}
deriving (RemoveManagedScalingPolicy -> RemoveManagedScalingPolicy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveManagedScalingPolicy -> RemoveManagedScalingPolicy -> Bool
$c/= :: RemoveManagedScalingPolicy -> RemoveManagedScalingPolicy -> Bool
== :: RemoveManagedScalingPolicy -> RemoveManagedScalingPolicy -> Bool
$c== :: RemoveManagedScalingPolicy -> RemoveManagedScalingPolicy -> Bool
Prelude.Eq, ReadPrec [RemoveManagedScalingPolicy]
ReadPrec RemoveManagedScalingPolicy
Int -> ReadS RemoveManagedScalingPolicy
ReadS [RemoveManagedScalingPolicy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveManagedScalingPolicy]
$creadListPrec :: ReadPrec [RemoveManagedScalingPolicy]
readPrec :: ReadPrec RemoveManagedScalingPolicy
$creadPrec :: ReadPrec RemoveManagedScalingPolicy
readList :: ReadS [RemoveManagedScalingPolicy]
$creadList :: ReadS [RemoveManagedScalingPolicy]
readsPrec :: Int -> ReadS RemoveManagedScalingPolicy
$creadsPrec :: Int -> ReadS RemoveManagedScalingPolicy
Prelude.Read, Int -> RemoveManagedScalingPolicy -> ShowS
[RemoveManagedScalingPolicy] -> ShowS
RemoveManagedScalingPolicy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveManagedScalingPolicy] -> ShowS
$cshowList :: [RemoveManagedScalingPolicy] -> ShowS
show :: RemoveManagedScalingPolicy -> String
$cshow :: RemoveManagedScalingPolicy -> String
showsPrec :: Int -> RemoveManagedScalingPolicy -> ShowS
$cshowsPrec :: Int -> RemoveManagedScalingPolicy -> ShowS
Prelude.Show, forall x.
Rep RemoveManagedScalingPolicy x -> RemoveManagedScalingPolicy
forall x.
RemoveManagedScalingPolicy -> Rep RemoveManagedScalingPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveManagedScalingPolicy x -> RemoveManagedScalingPolicy
$cfrom :: forall x.
RemoveManagedScalingPolicy -> Rep RemoveManagedScalingPolicy x
Prelude.Generic)
newRemoveManagedScalingPolicy ::
Prelude.Text ->
RemoveManagedScalingPolicy
newRemoveManagedScalingPolicy :: Text -> RemoveManagedScalingPolicy
newRemoveManagedScalingPolicy Text
pClusterId_ =
RemoveManagedScalingPolicy'
{ $sel:clusterId:RemoveManagedScalingPolicy' :: Text
clusterId =
Text
pClusterId_
}
removeManagedScalingPolicy_clusterId :: Lens.Lens' RemoveManagedScalingPolicy Prelude.Text
removeManagedScalingPolicy_clusterId :: Lens' RemoveManagedScalingPolicy Text
removeManagedScalingPolicy_clusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveManagedScalingPolicy' {Text
clusterId :: Text
$sel:clusterId:RemoveManagedScalingPolicy' :: RemoveManagedScalingPolicy -> Text
clusterId} -> Text
clusterId) (\s :: RemoveManagedScalingPolicy
s@RemoveManagedScalingPolicy' {} Text
a -> RemoveManagedScalingPolicy
s {$sel:clusterId:RemoveManagedScalingPolicy' :: Text
clusterId = Text
a} :: RemoveManagedScalingPolicy)
instance Core.AWSRequest RemoveManagedScalingPolicy where
type
AWSResponse RemoveManagedScalingPolicy =
RemoveManagedScalingPolicyResponse
request :: (Service -> Service)
-> RemoveManagedScalingPolicy -> Request RemoveManagedScalingPolicy
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RemoveManagedScalingPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveManagedScalingPolicy)))
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 -> RemoveManagedScalingPolicyResponse
RemoveManagedScalingPolicyResponse'
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 RemoveManagedScalingPolicy where
hashWithSalt :: Int -> RemoveManagedScalingPolicy -> Int
hashWithSalt Int
_salt RemoveManagedScalingPolicy' {Text
clusterId :: Text
$sel:clusterId:RemoveManagedScalingPolicy' :: RemoveManagedScalingPolicy -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterId
instance Prelude.NFData RemoveManagedScalingPolicy where
rnf :: RemoveManagedScalingPolicy -> ()
rnf RemoveManagedScalingPolicy' {Text
clusterId :: Text
$sel:clusterId:RemoveManagedScalingPolicy' :: RemoveManagedScalingPolicy -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
clusterId
instance Data.ToHeaders RemoveManagedScalingPolicy where
toHeaders :: RemoveManagedScalingPolicy -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"ElasticMapReduce.RemoveManagedScalingPolicy" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON RemoveManagedScalingPolicy where
toJSON :: RemoveManagedScalingPolicy -> Value
toJSON RemoveManagedScalingPolicy' {Text
clusterId :: Text
$sel:clusterId:RemoveManagedScalingPolicy' :: RemoveManagedScalingPolicy -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"ClusterId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clusterId)]
)
instance Data.ToPath RemoveManagedScalingPolicy where
toPath :: RemoveManagedScalingPolicy -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RemoveManagedScalingPolicy where
toQuery :: RemoveManagedScalingPolicy -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveManagedScalingPolicyResponse = RemoveManagedScalingPolicyResponse'
{
RemoveManagedScalingPolicyResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RemoveManagedScalingPolicyResponse
-> RemoveManagedScalingPolicyResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveManagedScalingPolicyResponse
-> RemoveManagedScalingPolicyResponse -> Bool
$c/= :: RemoveManagedScalingPolicyResponse
-> RemoveManagedScalingPolicyResponse -> Bool
== :: RemoveManagedScalingPolicyResponse
-> RemoveManagedScalingPolicyResponse -> Bool
$c== :: RemoveManagedScalingPolicyResponse
-> RemoveManagedScalingPolicyResponse -> Bool
Prelude.Eq, ReadPrec [RemoveManagedScalingPolicyResponse]
ReadPrec RemoveManagedScalingPolicyResponse
Int -> ReadS RemoveManagedScalingPolicyResponse
ReadS [RemoveManagedScalingPolicyResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveManagedScalingPolicyResponse]
$creadListPrec :: ReadPrec [RemoveManagedScalingPolicyResponse]
readPrec :: ReadPrec RemoveManagedScalingPolicyResponse
$creadPrec :: ReadPrec RemoveManagedScalingPolicyResponse
readList :: ReadS [RemoveManagedScalingPolicyResponse]
$creadList :: ReadS [RemoveManagedScalingPolicyResponse]
readsPrec :: Int -> ReadS RemoveManagedScalingPolicyResponse
$creadsPrec :: Int -> ReadS RemoveManagedScalingPolicyResponse
Prelude.Read, Int -> RemoveManagedScalingPolicyResponse -> ShowS
[RemoveManagedScalingPolicyResponse] -> ShowS
RemoveManagedScalingPolicyResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveManagedScalingPolicyResponse] -> ShowS
$cshowList :: [RemoveManagedScalingPolicyResponse] -> ShowS
show :: RemoveManagedScalingPolicyResponse -> String
$cshow :: RemoveManagedScalingPolicyResponse -> String
showsPrec :: Int -> RemoveManagedScalingPolicyResponse -> ShowS
$cshowsPrec :: Int -> RemoveManagedScalingPolicyResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveManagedScalingPolicyResponse x
-> RemoveManagedScalingPolicyResponse
forall x.
RemoveManagedScalingPolicyResponse
-> Rep RemoveManagedScalingPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveManagedScalingPolicyResponse x
-> RemoveManagedScalingPolicyResponse
$cfrom :: forall x.
RemoveManagedScalingPolicyResponse
-> Rep RemoveManagedScalingPolicyResponse x
Prelude.Generic)
newRemoveManagedScalingPolicyResponse ::
Prelude.Int ->
RemoveManagedScalingPolicyResponse
newRemoveManagedScalingPolicyResponse :: Int -> RemoveManagedScalingPolicyResponse
newRemoveManagedScalingPolicyResponse Int
pHttpStatus_ =
RemoveManagedScalingPolicyResponse'
{ $sel:httpStatus:RemoveManagedScalingPolicyResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
removeManagedScalingPolicyResponse_httpStatus :: Lens.Lens' RemoveManagedScalingPolicyResponse Prelude.Int
removeManagedScalingPolicyResponse_httpStatus :: Lens' RemoveManagedScalingPolicyResponse Int
removeManagedScalingPolicyResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveManagedScalingPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveManagedScalingPolicyResponse' :: RemoveManagedScalingPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveManagedScalingPolicyResponse
s@RemoveManagedScalingPolicyResponse' {} Int
a -> RemoveManagedScalingPolicyResponse
s {$sel:httpStatus:RemoveManagedScalingPolicyResponse' :: Int
httpStatus = Int
a} :: RemoveManagedScalingPolicyResponse)
instance
Prelude.NFData
RemoveManagedScalingPolicyResponse
where
rnf :: RemoveManagedScalingPolicyResponse -> ()
rnf RemoveManagedScalingPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveManagedScalingPolicyResponse' :: RemoveManagedScalingPolicyResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus