{-# 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.ResetSnapshotAttribute
(
ResetSnapshotAttribute (..),
newResetSnapshotAttribute,
resetSnapshotAttribute_dryRun,
resetSnapshotAttribute_attribute,
resetSnapshotAttribute_snapshotId,
ResetSnapshotAttributeResponse (..),
newResetSnapshotAttributeResponse,
)
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 ResetSnapshotAttribute = ResetSnapshotAttribute'
{
ResetSnapshotAttribute -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
ResetSnapshotAttribute -> SnapshotAttributeName
attribute :: SnapshotAttributeName,
ResetSnapshotAttribute -> Text
snapshotId :: Prelude.Text
}
deriving (ResetSnapshotAttribute -> ResetSnapshotAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetSnapshotAttribute -> ResetSnapshotAttribute -> Bool
$c/= :: ResetSnapshotAttribute -> ResetSnapshotAttribute -> Bool
== :: ResetSnapshotAttribute -> ResetSnapshotAttribute -> Bool
$c== :: ResetSnapshotAttribute -> ResetSnapshotAttribute -> Bool
Prelude.Eq, ReadPrec [ResetSnapshotAttribute]
ReadPrec ResetSnapshotAttribute
Int -> ReadS ResetSnapshotAttribute
ReadS [ResetSnapshotAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetSnapshotAttribute]
$creadListPrec :: ReadPrec [ResetSnapshotAttribute]
readPrec :: ReadPrec ResetSnapshotAttribute
$creadPrec :: ReadPrec ResetSnapshotAttribute
readList :: ReadS [ResetSnapshotAttribute]
$creadList :: ReadS [ResetSnapshotAttribute]
readsPrec :: Int -> ReadS ResetSnapshotAttribute
$creadsPrec :: Int -> ReadS ResetSnapshotAttribute
Prelude.Read, Int -> ResetSnapshotAttribute -> ShowS
[ResetSnapshotAttribute] -> ShowS
ResetSnapshotAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetSnapshotAttribute] -> ShowS
$cshowList :: [ResetSnapshotAttribute] -> ShowS
show :: ResetSnapshotAttribute -> String
$cshow :: ResetSnapshotAttribute -> String
showsPrec :: Int -> ResetSnapshotAttribute -> ShowS
$cshowsPrec :: Int -> ResetSnapshotAttribute -> ShowS
Prelude.Show, forall x. Rep ResetSnapshotAttribute x -> ResetSnapshotAttribute
forall x. ResetSnapshotAttribute -> Rep ResetSnapshotAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResetSnapshotAttribute x -> ResetSnapshotAttribute
$cfrom :: forall x. ResetSnapshotAttribute -> Rep ResetSnapshotAttribute x
Prelude.Generic)
newResetSnapshotAttribute ::
SnapshotAttributeName ->
Prelude.Text ->
ResetSnapshotAttribute
newResetSnapshotAttribute :: SnapshotAttributeName -> Text -> ResetSnapshotAttribute
newResetSnapshotAttribute SnapshotAttributeName
pAttribute_ Text
pSnapshotId_ =
ResetSnapshotAttribute'
{ $sel:dryRun:ResetSnapshotAttribute' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:attribute:ResetSnapshotAttribute' :: SnapshotAttributeName
attribute = SnapshotAttributeName
pAttribute_,
$sel:snapshotId:ResetSnapshotAttribute' :: Text
snapshotId = Text
pSnapshotId_
}
resetSnapshotAttribute_dryRun :: Lens.Lens' ResetSnapshotAttribute (Prelude.Maybe Prelude.Bool)
resetSnapshotAttribute_dryRun :: Lens' ResetSnapshotAttribute (Maybe Bool)
resetSnapshotAttribute_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetSnapshotAttribute' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: ResetSnapshotAttribute
s@ResetSnapshotAttribute' {} Maybe Bool
a -> ResetSnapshotAttribute
s {$sel:dryRun:ResetSnapshotAttribute' :: Maybe Bool
dryRun = Maybe Bool
a} :: ResetSnapshotAttribute)
resetSnapshotAttribute_attribute :: Lens.Lens' ResetSnapshotAttribute SnapshotAttributeName
resetSnapshotAttribute_attribute :: Lens' ResetSnapshotAttribute SnapshotAttributeName
resetSnapshotAttribute_attribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetSnapshotAttribute' {SnapshotAttributeName
attribute :: SnapshotAttributeName
$sel:attribute:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> SnapshotAttributeName
attribute} -> SnapshotAttributeName
attribute) (\s :: ResetSnapshotAttribute
s@ResetSnapshotAttribute' {} SnapshotAttributeName
a -> ResetSnapshotAttribute
s {$sel:attribute:ResetSnapshotAttribute' :: SnapshotAttributeName
attribute = SnapshotAttributeName
a} :: ResetSnapshotAttribute)
resetSnapshotAttribute_snapshotId :: Lens.Lens' ResetSnapshotAttribute Prelude.Text
resetSnapshotAttribute_snapshotId :: Lens' ResetSnapshotAttribute Text
resetSnapshotAttribute_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetSnapshotAttribute' {Text
snapshotId :: Text
$sel:snapshotId:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Text
snapshotId} -> Text
snapshotId) (\s :: ResetSnapshotAttribute
s@ResetSnapshotAttribute' {} Text
a -> ResetSnapshotAttribute
s {$sel:snapshotId:ResetSnapshotAttribute' :: Text
snapshotId = Text
a} :: ResetSnapshotAttribute)
instance Core.AWSRequest ResetSnapshotAttribute where
type
AWSResponse ResetSnapshotAttribute =
ResetSnapshotAttributeResponse
request :: (Service -> Service)
-> ResetSnapshotAttribute -> Request ResetSnapshotAttribute
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 ResetSnapshotAttribute
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetSnapshotAttribute)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
ResetSnapshotAttributeResponse
ResetSnapshotAttributeResponse'
instance Prelude.Hashable ResetSnapshotAttribute where
hashWithSalt :: Int -> ResetSnapshotAttribute -> Int
hashWithSalt Int
_salt ResetSnapshotAttribute' {Maybe Bool
Text
SnapshotAttributeName
snapshotId :: Text
attribute :: SnapshotAttributeName
dryRun :: Maybe Bool
$sel:snapshotId:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Text
$sel:attribute:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> SnapshotAttributeName
$sel:dryRun:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SnapshotAttributeName
attribute
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
snapshotId
instance Prelude.NFData ResetSnapshotAttribute where
rnf :: ResetSnapshotAttribute -> ()
rnf ResetSnapshotAttribute' {Maybe Bool
Text
SnapshotAttributeName
snapshotId :: Text
attribute :: SnapshotAttributeName
dryRun :: Maybe Bool
$sel:snapshotId:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Text
$sel:attribute:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> SnapshotAttributeName
$sel:dryRun:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SnapshotAttributeName
attribute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
snapshotId
instance Data.ToHeaders ResetSnapshotAttribute where
toHeaders :: ResetSnapshotAttribute -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ResetSnapshotAttribute where
toPath :: ResetSnapshotAttribute -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ResetSnapshotAttribute where
toQuery :: ResetSnapshotAttribute -> QueryString
toQuery ResetSnapshotAttribute' {Maybe Bool
Text
SnapshotAttributeName
snapshotId :: Text
attribute :: SnapshotAttributeName
dryRun :: Maybe Bool
$sel:snapshotId:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Text
$sel:attribute:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> SnapshotAttributeName
$sel:dryRun:ResetSnapshotAttribute' :: ResetSnapshotAttribute -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ResetSnapshotAttribute" :: 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,
ByteString
"Attribute" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: SnapshotAttributeName
attribute,
ByteString
"SnapshotId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
snapshotId
]
data ResetSnapshotAttributeResponse = ResetSnapshotAttributeResponse'
{
}
deriving (ResetSnapshotAttributeResponse
-> ResetSnapshotAttributeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetSnapshotAttributeResponse
-> ResetSnapshotAttributeResponse -> Bool
$c/= :: ResetSnapshotAttributeResponse
-> ResetSnapshotAttributeResponse -> Bool
== :: ResetSnapshotAttributeResponse
-> ResetSnapshotAttributeResponse -> Bool
$c== :: ResetSnapshotAttributeResponse
-> ResetSnapshotAttributeResponse -> Bool
Prelude.Eq, ReadPrec [ResetSnapshotAttributeResponse]
ReadPrec ResetSnapshotAttributeResponse
Int -> ReadS ResetSnapshotAttributeResponse
ReadS [ResetSnapshotAttributeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetSnapshotAttributeResponse]
$creadListPrec :: ReadPrec [ResetSnapshotAttributeResponse]
readPrec :: ReadPrec ResetSnapshotAttributeResponse
$creadPrec :: ReadPrec ResetSnapshotAttributeResponse
readList :: ReadS [ResetSnapshotAttributeResponse]
$creadList :: ReadS [ResetSnapshotAttributeResponse]
readsPrec :: Int -> ReadS ResetSnapshotAttributeResponse
$creadsPrec :: Int -> ReadS ResetSnapshotAttributeResponse
Prelude.Read, Int -> ResetSnapshotAttributeResponse -> ShowS
[ResetSnapshotAttributeResponse] -> ShowS
ResetSnapshotAttributeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetSnapshotAttributeResponse] -> ShowS
$cshowList :: [ResetSnapshotAttributeResponse] -> ShowS
show :: ResetSnapshotAttributeResponse -> String
$cshow :: ResetSnapshotAttributeResponse -> String
showsPrec :: Int -> ResetSnapshotAttributeResponse -> ShowS
$cshowsPrec :: Int -> ResetSnapshotAttributeResponse -> ShowS
Prelude.Show, forall x.
Rep ResetSnapshotAttributeResponse x
-> ResetSnapshotAttributeResponse
forall x.
ResetSnapshotAttributeResponse
-> Rep ResetSnapshotAttributeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResetSnapshotAttributeResponse x
-> ResetSnapshotAttributeResponse
$cfrom :: forall x.
ResetSnapshotAttributeResponse
-> Rep ResetSnapshotAttributeResponse x
Prelude.Generic)
newResetSnapshotAttributeResponse ::
ResetSnapshotAttributeResponse
newResetSnapshotAttributeResponse :: ResetSnapshotAttributeResponse
newResetSnapshotAttributeResponse =
ResetSnapshotAttributeResponse
ResetSnapshotAttributeResponse'
instance
Prelude.NFData
ResetSnapshotAttributeResponse
where
rnf :: ResetSnapshotAttributeResponse -> ()
rnf ResetSnapshotAttributeResponse
_ = ()