{-# 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.EC2.DisableEbsEncryptionByDefault
(
DisableEbsEncryptionByDefault (..),
newDisableEbsEncryptionByDefault,
disableEbsEncryptionByDefault_dryRun,
DisableEbsEncryptionByDefaultResponse (..),
newDisableEbsEncryptionByDefaultResponse,
disableEbsEncryptionByDefaultResponse_ebsEncryptionByDefault,
disableEbsEncryptionByDefaultResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisableEbsEncryptionByDefault = DisableEbsEncryptionByDefault'
{
DisableEbsEncryptionByDefault -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool
}
deriving (DisableEbsEncryptionByDefault
-> DisableEbsEncryptionByDefault -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableEbsEncryptionByDefault
-> DisableEbsEncryptionByDefault -> Bool
$c/= :: DisableEbsEncryptionByDefault
-> DisableEbsEncryptionByDefault -> Bool
== :: DisableEbsEncryptionByDefault
-> DisableEbsEncryptionByDefault -> Bool
$c== :: DisableEbsEncryptionByDefault
-> DisableEbsEncryptionByDefault -> Bool
Prelude.Eq, ReadPrec [DisableEbsEncryptionByDefault]
ReadPrec DisableEbsEncryptionByDefault
Int -> ReadS DisableEbsEncryptionByDefault
ReadS [DisableEbsEncryptionByDefault]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableEbsEncryptionByDefault]
$creadListPrec :: ReadPrec [DisableEbsEncryptionByDefault]
readPrec :: ReadPrec DisableEbsEncryptionByDefault
$creadPrec :: ReadPrec DisableEbsEncryptionByDefault
readList :: ReadS [DisableEbsEncryptionByDefault]
$creadList :: ReadS [DisableEbsEncryptionByDefault]
readsPrec :: Int -> ReadS DisableEbsEncryptionByDefault
$creadsPrec :: Int -> ReadS DisableEbsEncryptionByDefault
Prelude.Read, Int -> DisableEbsEncryptionByDefault -> ShowS
[DisableEbsEncryptionByDefault] -> ShowS
DisableEbsEncryptionByDefault -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableEbsEncryptionByDefault] -> ShowS
$cshowList :: [DisableEbsEncryptionByDefault] -> ShowS
show :: DisableEbsEncryptionByDefault -> String
$cshow :: DisableEbsEncryptionByDefault -> String
showsPrec :: Int -> DisableEbsEncryptionByDefault -> ShowS
$cshowsPrec :: Int -> DisableEbsEncryptionByDefault -> ShowS
Prelude.Show, forall x.
Rep DisableEbsEncryptionByDefault x
-> DisableEbsEncryptionByDefault
forall x.
DisableEbsEncryptionByDefault
-> Rep DisableEbsEncryptionByDefault x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableEbsEncryptionByDefault x
-> DisableEbsEncryptionByDefault
$cfrom :: forall x.
DisableEbsEncryptionByDefault
-> Rep DisableEbsEncryptionByDefault x
Prelude.Generic)
newDisableEbsEncryptionByDefault ::
DisableEbsEncryptionByDefault
newDisableEbsEncryptionByDefault :: DisableEbsEncryptionByDefault
newDisableEbsEncryptionByDefault =
DisableEbsEncryptionByDefault'
{ $sel:dryRun:DisableEbsEncryptionByDefault' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing
}
disableEbsEncryptionByDefault_dryRun :: Lens.Lens' DisableEbsEncryptionByDefault (Prelude.Maybe Prelude.Bool)
disableEbsEncryptionByDefault_dryRun :: Lens' DisableEbsEncryptionByDefault (Maybe Bool)
disableEbsEncryptionByDefault_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableEbsEncryptionByDefault' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableEbsEncryptionByDefault' :: DisableEbsEncryptionByDefault -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DisableEbsEncryptionByDefault
s@DisableEbsEncryptionByDefault' {} Maybe Bool
a -> DisableEbsEncryptionByDefault
s {$sel:dryRun:DisableEbsEncryptionByDefault' :: Maybe Bool
dryRun = Maybe Bool
a} :: DisableEbsEncryptionByDefault)
instance
Core.AWSRequest
DisableEbsEncryptionByDefault
where
type
AWSResponse DisableEbsEncryptionByDefault =
DisableEbsEncryptionByDefaultResponse
request :: (Service -> Service)
-> DisableEbsEncryptionByDefault
-> Request DisableEbsEncryptionByDefault
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisableEbsEncryptionByDefault
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisableEbsEncryptionByDefault)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Bool -> Int -> DisableEbsEncryptionByDefaultResponse
DisableEbsEncryptionByDefaultResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ebsEncryptionByDefault")
forall (f :: * -> *) a b. Applicative f => 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
DisableEbsEncryptionByDefault
where
hashWithSalt :: Int -> DisableEbsEncryptionByDefault -> Int
hashWithSalt Int
_salt DisableEbsEncryptionByDefault' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableEbsEncryptionByDefault' :: DisableEbsEncryptionByDefault -> Maybe Bool
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
instance Prelude.NFData DisableEbsEncryptionByDefault where
rnf :: DisableEbsEncryptionByDefault -> ()
rnf DisableEbsEncryptionByDefault' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableEbsEncryptionByDefault' :: DisableEbsEncryptionByDefault -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
instance Data.ToHeaders DisableEbsEncryptionByDefault where
toHeaders :: DisableEbsEncryptionByDefault -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DisableEbsEncryptionByDefault where
toPath :: DisableEbsEncryptionByDefault -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DisableEbsEncryptionByDefault where
toQuery :: DisableEbsEncryptionByDefault -> QueryString
toQuery DisableEbsEncryptionByDefault' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableEbsEncryptionByDefault' :: DisableEbsEncryptionByDefault -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DisableEbsEncryptionByDefault" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun
]
data DisableEbsEncryptionByDefaultResponse = DisableEbsEncryptionByDefaultResponse'
{
DisableEbsEncryptionByDefaultResponse -> Maybe Bool
ebsEncryptionByDefault :: Prelude.Maybe Prelude.Bool,
DisableEbsEncryptionByDefaultResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisableEbsEncryptionByDefaultResponse
-> DisableEbsEncryptionByDefaultResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableEbsEncryptionByDefaultResponse
-> DisableEbsEncryptionByDefaultResponse -> Bool
$c/= :: DisableEbsEncryptionByDefaultResponse
-> DisableEbsEncryptionByDefaultResponse -> Bool
== :: DisableEbsEncryptionByDefaultResponse
-> DisableEbsEncryptionByDefaultResponse -> Bool
$c== :: DisableEbsEncryptionByDefaultResponse
-> DisableEbsEncryptionByDefaultResponse -> Bool
Prelude.Eq, ReadPrec [DisableEbsEncryptionByDefaultResponse]
ReadPrec DisableEbsEncryptionByDefaultResponse
Int -> ReadS DisableEbsEncryptionByDefaultResponse
ReadS [DisableEbsEncryptionByDefaultResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableEbsEncryptionByDefaultResponse]
$creadListPrec :: ReadPrec [DisableEbsEncryptionByDefaultResponse]
readPrec :: ReadPrec DisableEbsEncryptionByDefaultResponse
$creadPrec :: ReadPrec DisableEbsEncryptionByDefaultResponse
readList :: ReadS [DisableEbsEncryptionByDefaultResponse]
$creadList :: ReadS [DisableEbsEncryptionByDefaultResponse]
readsPrec :: Int -> ReadS DisableEbsEncryptionByDefaultResponse
$creadsPrec :: Int -> ReadS DisableEbsEncryptionByDefaultResponse
Prelude.Read, Int -> DisableEbsEncryptionByDefaultResponse -> ShowS
[DisableEbsEncryptionByDefaultResponse] -> ShowS
DisableEbsEncryptionByDefaultResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableEbsEncryptionByDefaultResponse] -> ShowS
$cshowList :: [DisableEbsEncryptionByDefaultResponse] -> ShowS
show :: DisableEbsEncryptionByDefaultResponse -> String
$cshow :: DisableEbsEncryptionByDefaultResponse -> String
showsPrec :: Int -> DisableEbsEncryptionByDefaultResponse -> ShowS
$cshowsPrec :: Int -> DisableEbsEncryptionByDefaultResponse -> ShowS
Prelude.Show, forall x.
Rep DisableEbsEncryptionByDefaultResponse x
-> DisableEbsEncryptionByDefaultResponse
forall x.
DisableEbsEncryptionByDefaultResponse
-> Rep DisableEbsEncryptionByDefaultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableEbsEncryptionByDefaultResponse x
-> DisableEbsEncryptionByDefaultResponse
$cfrom :: forall x.
DisableEbsEncryptionByDefaultResponse
-> Rep DisableEbsEncryptionByDefaultResponse x
Prelude.Generic)
newDisableEbsEncryptionByDefaultResponse ::
Prelude.Int ->
DisableEbsEncryptionByDefaultResponse
newDisableEbsEncryptionByDefaultResponse :: Int -> DisableEbsEncryptionByDefaultResponse
newDisableEbsEncryptionByDefaultResponse Int
pHttpStatus_ =
DisableEbsEncryptionByDefaultResponse'
{ $sel:ebsEncryptionByDefault:DisableEbsEncryptionByDefaultResponse' :: Maybe Bool
ebsEncryptionByDefault =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisableEbsEncryptionByDefaultResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disableEbsEncryptionByDefaultResponse_ebsEncryptionByDefault :: Lens.Lens' DisableEbsEncryptionByDefaultResponse (Prelude.Maybe Prelude.Bool)
disableEbsEncryptionByDefaultResponse_ebsEncryptionByDefault :: Lens' DisableEbsEncryptionByDefaultResponse (Maybe Bool)
disableEbsEncryptionByDefaultResponse_ebsEncryptionByDefault = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableEbsEncryptionByDefaultResponse' {Maybe Bool
ebsEncryptionByDefault :: Maybe Bool
$sel:ebsEncryptionByDefault:DisableEbsEncryptionByDefaultResponse' :: DisableEbsEncryptionByDefaultResponse -> Maybe Bool
ebsEncryptionByDefault} -> Maybe Bool
ebsEncryptionByDefault) (\s :: DisableEbsEncryptionByDefaultResponse
s@DisableEbsEncryptionByDefaultResponse' {} Maybe Bool
a -> DisableEbsEncryptionByDefaultResponse
s {$sel:ebsEncryptionByDefault:DisableEbsEncryptionByDefaultResponse' :: Maybe Bool
ebsEncryptionByDefault = Maybe Bool
a} :: DisableEbsEncryptionByDefaultResponse)
disableEbsEncryptionByDefaultResponse_httpStatus :: Lens.Lens' DisableEbsEncryptionByDefaultResponse Prelude.Int
disableEbsEncryptionByDefaultResponse_httpStatus :: Lens' DisableEbsEncryptionByDefaultResponse Int
disableEbsEncryptionByDefaultResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableEbsEncryptionByDefaultResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableEbsEncryptionByDefaultResponse' :: DisableEbsEncryptionByDefaultResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableEbsEncryptionByDefaultResponse
s@DisableEbsEncryptionByDefaultResponse' {} Int
a -> DisableEbsEncryptionByDefaultResponse
s {$sel:httpStatus:DisableEbsEncryptionByDefaultResponse' :: Int
httpStatus = Int
a} :: DisableEbsEncryptionByDefaultResponse)
instance
Prelude.NFData
DisableEbsEncryptionByDefaultResponse
where
rnf :: DisableEbsEncryptionByDefaultResponse -> ()
rnf DisableEbsEncryptionByDefaultResponse' {Int
Maybe Bool
httpStatus :: Int
ebsEncryptionByDefault :: Maybe Bool
$sel:httpStatus:DisableEbsEncryptionByDefaultResponse' :: DisableEbsEncryptionByDefaultResponse -> Int
$sel:ebsEncryptionByDefault:DisableEbsEncryptionByDefaultResponse' :: DisableEbsEncryptionByDefaultResponse -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ebsEncryptionByDefault
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus