{-# 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.DeleteSecurityConfiguration
(
DeleteSecurityConfiguration (..),
newDeleteSecurityConfiguration,
deleteSecurityConfiguration_name,
DeleteSecurityConfigurationResponse (..),
newDeleteSecurityConfigurationResponse,
deleteSecurityConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types
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 DeleteSecurityConfiguration = DeleteSecurityConfiguration'
{
DeleteSecurityConfiguration -> Text
name :: Prelude.Text
}
deriving (DeleteSecurityConfiguration -> DeleteSecurityConfiguration -> Bool
(DeleteSecurityConfiguration
-> DeleteSecurityConfiguration -> Bool)
-> (DeleteSecurityConfiguration
-> DeleteSecurityConfiguration -> Bool)
-> Eq DeleteSecurityConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSecurityConfiguration -> DeleteSecurityConfiguration -> Bool
$c/= :: DeleteSecurityConfiguration -> DeleteSecurityConfiguration -> Bool
== :: DeleteSecurityConfiguration -> DeleteSecurityConfiguration -> Bool
$c== :: DeleteSecurityConfiguration -> DeleteSecurityConfiguration -> Bool
Prelude.Eq, ReadPrec [DeleteSecurityConfiguration]
ReadPrec DeleteSecurityConfiguration
Int -> ReadS DeleteSecurityConfiguration
ReadS [DeleteSecurityConfiguration]
(Int -> ReadS DeleteSecurityConfiguration)
-> ReadS [DeleteSecurityConfiguration]
-> ReadPrec DeleteSecurityConfiguration
-> ReadPrec [DeleteSecurityConfiguration]
-> Read DeleteSecurityConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSecurityConfiguration]
$creadListPrec :: ReadPrec [DeleteSecurityConfiguration]
readPrec :: ReadPrec DeleteSecurityConfiguration
$creadPrec :: ReadPrec DeleteSecurityConfiguration
readList :: ReadS [DeleteSecurityConfiguration]
$creadList :: ReadS [DeleteSecurityConfiguration]
readsPrec :: Int -> ReadS DeleteSecurityConfiguration
$creadsPrec :: Int -> ReadS DeleteSecurityConfiguration
Prelude.Read, Int -> DeleteSecurityConfiguration -> ShowS
[DeleteSecurityConfiguration] -> ShowS
DeleteSecurityConfiguration -> String
(Int -> DeleteSecurityConfiguration -> ShowS)
-> (DeleteSecurityConfiguration -> String)
-> ([DeleteSecurityConfiguration] -> ShowS)
-> Show DeleteSecurityConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSecurityConfiguration] -> ShowS
$cshowList :: [DeleteSecurityConfiguration] -> ShowS
show :: DeleteSecurityConfiguration -> String
$cshow :: DeleteSecurityConfiguration -> String
showsPrec :: Int -> DeleteSecurityConfiguration -> ShowS
$cshowsPrec :: Int -> DeleteSecurityConfiguration -> ShowS
Prelude.Show, (forall x.
DeleteSecurityConfiguration -> Rep DeleteSecurityConfiguration x)
-> (forall x.
Rep DeleteSecurityConfiguration x -> DeleteSecurityConfiguration)
-> Generic DeleteSecurityConfiguration
forall x.
Rep DeleteSecurityConfiguration x -> DeleteSecurityConfiguration
forall x.
DeleteSecurityConfiguration -> Rep DeleteSecurityConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSecurityConfiguration x -> DeleteSecurityConfiguration
$cfrom :: forall x.
DeleteSecurityConfiguration -> Rep DeleteSecurityConfiguration x
Prelude.Generic)
newDeleteSecurityConfiguration ::
Prelude.Text ->
DeleteSecurityConfiguration
newDeleteSecurityConfiguration :: Text -> DeleteSecurityConfiguration
newDeleteSecurityConfiguration Text
pName_ =
DeleteSecurityConfiguration' :: Text -> DeleteSecurityConfiguration
DeleteSecurityConfiguration' {$sel:name:DeleteSecurityConfiguration' :: Text
name = Text
pName_}
deleteSecurityConfiguration_name :: Lens.Lens' DeleteSecurityConfiguration Prelude.Text
deleteSecurityConfiguration_name :: (Text -> f Text)
-> DeleteSecurityConfiguration -> f DeleteSecurityConfiguration
deleteSecurityConfiguration_name = (DeleteSecurityConfiguration -> Text)
-> (DeleteSecurityConfiguration
-> Text -> DeleteSecurityConfiguration)
-> Lens
DeleteSecurityConfiguration DeleteSecurityConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSecurityConfiguration' {Text
name :: Text
$sel:name:DeleteSecurityConfiguration' :: DeleteSecurityConfiguration -> Text
name} -> Text
name) (\s :: DeleteSecurityConfiguration
s@DeleteSecurityConfiguration' {} Text
a -> DeleteSecurityConfiguration
s {$sel:name:DeleteSecurityConfiguration' :: Text
name = Text
a} :: DeleteSecurityConfiguration)
instance Core.AWSRequest DeleteSecurityConfiguration where
type
AWSResponse DeleteSecurityConfiguration =
DeleteSecurityConfigurationResponse
request :: DeleteSecurityConfiguration -> Request DeleteSecurityConfiguration
request = Service
-> DeleteSecurityConfiguration
-> Request DeleteSecurityConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSecurityConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSecurityConfiguration)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteSecurityConfiguration))
-> Logger
-> Service
-> Proxy DeleteSecurityConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSecurityConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteSecurityConfigurationResponse
DeleteSecurityConfigurationResponse'
(Int -> DeleteSecurityConfigurationResponse)
-> Either String Int
-> Either String DeleteSecurityConfigurationResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteSecurityConfiguration
instance Prelude.NFData DeleteSecurityConfiguration
instance Core.ToHeaders DeleteSecurityConfiguration where
toHeaders :: DeleteSecurityConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteSecurityConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"ElasticMapReduce.DeleteSecurityConfiguration" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteSecurityConfiguration where
toJSON :: DeleteSecurityConfiguration -> Value
toJSON DeleteSecurityConfiguration' {Text
name :: Text
$sel:name:DeleteSecurityConfiguration' :: DeleteSecurityConfiguration -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)
instance Core.ToPath DeleteSecurityConfiguration where
toPath :: DeleteSecurityConfiguration -> ByteString
toPath = ByteString -> DeleteSecurityConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteSecurityConfiguration where
toQuery :: DeleteSecurityConfiguration -> QueryString
toQuery = QueryString -> DeleteSecurityConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSecurityConfigurationResponse = DeleteSecurityConfigurationResponse'
{
DeleteSecurityConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool
(DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool)
-> (DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool)
-> Eq DeleteSecurityConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool
$c/= :: DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool
== :: DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool
$c== :: DeleteSecurityConfigurationResponse
-> DeleteSecurityConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSecurityConfigurationResponse]
ReadPrec DeleteSecurityConfigurationResponse
Int -> ReadS DeleteSecurityConfigurationResponse
ReadS [DeleteSecurityConfigurationResponse]
(Int -> ReadS DeleteSecurityConfigurationResponse)
-> ReadS [DeleteSecurityConfigurationResponse]
-> ReadPrec DeleteSecurityConfigurationResponse
-> ReadPrec [DeleteSecurityConfigurationResponse]
-> Read DeleteSecurityConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSecurityConfigurationResponse]
$creadListPrec :: ReadPrec [DeleteSecurityConfigurationResponse]
readPrec :: ReadPrec DeleteSecurityConfigurationResponse
$creadPrec :: ReadPrec DeleteSecurityConfigurationResponse
readList :: ReadS [DeleteSecurityConfigurationResponse]
$creadList :: ReadS [DeleteSecurityConfigurationResponse]
readsPrec :: Int -> ReadS DeleteSecurityConfigurationResponse
$creadsPrec :: Int -> ReadS DeleteSecurityConfigurationResponse
Prelude.Read, Int -> DeleteSecurityConfigurationResponse -> ShowS
[DeleteSecurityConfigurationResponse] -> ShowS
DeleteSecurityConfigurationResponse -> String
(Int -> DeleteSecurityConfigurationResponse -> ShowS)
-> (DeleteSecurityConfigurationResponse -> String)
-> ([DeleteSecurityConfigurationResponse] -> ShowS)
-> Show DeleteSecurityConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSecurityConfigurationResponse] -> ShowS
$cshowList :: [DeleteSecurityConfigurationResponse] -> ShowS
show :: DeleteSecurityConfigurationResponse -> String
$cshow :: DeleteSecurityConfigurationResponse -> String
showsPrec :: Int -> DeleteSecurityConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeleteSecurityConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DeleteSecurityConfigurationResponse
-> Rep DeleteSecurityConfigurationResponse x)
-> (forall x.
Rep DeleteSecurityConfigurationResponse x
-> DeleteSecurityConfigurationResponse)
-> Generic DeleteSecurityConfigurationResponse
forall x.
Rep DeleteSecurityConfigurationResponse x
-> DeleteSecurityConfigurationResponse
forall x.
DeleteSecurityConfigurationResponse
-> Rep DeleteSecurityConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSecurityConfigurationResponse x
-> DeleteSecurityConfigurationResponse
$cfrom :: forall x.
DeleteSecurityConfigurationResponse
-> Rep DeleteSecurityConfigurationResponse x
Prelude.Generic)
newDeleteSecurityConfigurationResponse ::
Prelude.Int ->
DeleteSecurityConfigurationResponse
newDeleteSecurityConfigurationResponse :: Int -> DeleteSecurityConfigurationResponse
newDeleteSecurityConfigurationResponse Int
pHttpStatus_ =
DeleteSecurityConfigurationResponse' :: Int -> DeleteSecurityConfigurationResponse
DeleteSecurityConfigurationResponse'
{ $sel:httpStatus:DeleteSecurityConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSecurityConfigurationResponse_httpStatus :: Lens.Lens' DeleteSecurityConfigurationResponse Prelude.Int
deleteSecurityConfigurationResponse_httpStatus :: (Int -> f Int)
-> DeleteSecurityConfigurationResponse
-> f DeleteSecurityConfigurationResponse
deleteSecurityConfigurationResponse_httpStatus = (DeleteSecurityConfigurationResponse -> Int)
-> (DeleteSecurityConfigurationResponse
-> Int -> DeleteSecurityConfigurationResponse)
-> Lens
DeleteSecurityConfigurationResponse
DeleteSecurityConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSecurityConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSecurityConfigurationResponse' :: DeleteSecurityConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSecurityConfigurationResponse
s@DeleteSecurityConfigurationResponse' {} Int
a -> DeleteSecurityConfigurationResponse
s {$sel:httpStatus:DeleteSecurityConfigurationResponse' :: Int
httpStatus = Int
a} :: DeleteSecurityConfigurationResponse)
instance
Prelude.NFData
DeleteSecurityConfigurationResponse