{-# 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.ReleaseAddress
(
ReleaseAddress (..),
newReleaseAddress,
releaseAddress_allocationId,
releaseAddress_dryRun,
releaseAddress_networkBorderGroup,
releaseAddress_publicIp,
ReleaseAddressResponse (..),
newReleaseAddressResponse,
)
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 ReleaseAddress = ReleaseAddress'
{
ReleaseAddress -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
ReleaseAddress -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
ReleaseAddress -> Maybe Text
networkBorderGroup :: Prelude.Maybe Prelude.Text,
ReleaseAddress -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text
}
deriving (ReleaseAddress -> ReleaseAddress -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReleaseAddress -> ReleaseAddress -> Bool
$c/= :: ReleaseAddress -> ReleaseAddress -> Bool
== :: ReleaseAddress -> ReleaseAddress -> Bool
$c== :: ReleaseAddress -> ReleaseAddress -> Bool
Prelude.Eq, ReadPrec [ReleaseAddress]
ReadPrec ReleaseAddress
Int -> ReadS ReleaseAddress
ReadS [ReleaseAddress]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReleaseAddress]
$creadListPrec :: ReadPrec [ReleaseAddress]
readPrec :: ReadPrec ReleaseAddress
$creadPrec :: ReadPrec ReleaseAddress
readList :: ReadS [ReleaseAddress]
$creadList :: ReadS [ReleaseAddress]
readsPrec :: Int -> ReadS ReleaseAddress
$creadsPrec :: Int -> ReadS ReleaseAddress
Prelude.Read, Int -> ReleaseAddress -> ShowS
[ReleaseAddress] -> ShowS
ReleaseAddress -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReleaseAddress] -> ShowS
$cshowList :: [ReleaseAddress] -> ShowS
show :: ReleaseAddress -> String
$cshow :: ReleaseAddress -> String
showsPrec :: Int -> ReleaseAddress -> ShowS
$cshowsPrec :: Int -> ReleaseAddress -> ShowS
Prelude.Show, forall x. Rep ReleaseAddress x -> ReleaseAddress
forall x. ReleaseAddress -> Rep ReleaseAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReleaseAddress x -> ReleaseAddress
$cfrom :: forall x. ReleaseAddress -> Rep ReleaseAddress x
Prelude.Generic)
newReleaseAddress ::
ReleaseAddress
newReleaseAddress :: ReleaseAddress
newReleaseAddress =
ReleaseAddress'
{ $sel:allocationId:ReleaseAddress' :: Maybe Text
allocationId = forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:ReleaseAddress' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:networkBorderGroup:ReleaseAddress' :: Maybe Text
networkBorderGroup = forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:ReleaseAddress' :: Maybe Text
publicIp = forall a. Maybe a
Prelude.Nothing
}
releaseAddress_allocationId :: Lens.Lens' ReleaseAddress (Prelude.Maybe Prelude.Text)
releaseAddress_allocationId :: Lens' ReleaseAddress (Maybe Text)
releaseAddress_allocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReleaseAddress' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:ReleaseAddress' :: ReleaseAddress -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: ReleaseAddress
s@ReleaseAddress' {} Maybe Text
a -> ReleaseAddress
s {$sel:allocationId:ReleaseAddress' :: Maybe Text
allocationId = Maybe Text
a} :: ReleaseAddress)
releaseAddress_dryRun :: Lens.Lens' ReleaseAddress (Prelude.Maybe Prelude.Bool)
releaseAddress_dryRun :: Lens' ReleaseAddress (Maybe Bool)
releaseAddress_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReleaseAddress' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:ReleaseAddress' :: ReleaseAddress -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: ReleaseAddress
s@ReleaseAddress' {} Maybe Bool
a -> ReleaseAddress
s {$sel:dryRun:ReleaseAddress' :: Maybe Bool
dryRun = Maybe Bool
a} :: ReleaseAddress)
releaseAddress_networkBorderGroup :: Lens.Lens' ReleaseAddress (Prelude.Maybe Prelude.Text)
releaseAddress_networkBorderGroup :: Lens' ReleaseAddress (Maybe Text)
releaseAddress_networkBorderGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReleaseAddress' {Maybe Text
networkBorderGroup :: Maybe Text
$sel:networkBorderGroup:ReleaseAddress' :: ReleaseAddress -> Maybe Text
networkBorderGroup} -> Maybe Text
networkBorderGroup) (\s :: ReleaseAddress
s@ReleaseAddress' {} Maybe Text
a -> ReleaseAddress
s {$sel:networkBorderGroup:ReleaseAddress' :: Maybe Text
networkBorderGroup = Maybe Text
a} :: ReleaseAddress)
releaseAddress_publicIp :: Lens.Lens' ReleaseAddress (Prelude.Maybe Prelude.Text)
releaseAddress_publicIp :: Lens' ReleaseAddress (Maybe Text)
releaseAddress_publicIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReleaseAddress' {Maybe Text
publicIp :: Maybe Text
$sel:publicIp:ReleaseAddress' :: ReleaseAddress -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: ReleaseAddress
s@ReleaseAddress' {} Maybe Text
a -> ReleaseAddress
s {$sel:publicIp:ReleaseAddress' :: Maybe Text
publicIp = Maybe Text
a} :: ReleaseAddress)
instance Core.AWSRequest ReleaseAddress where
type
AWSResponse ReleaseAddress =
ReleaseAddressResponse
request :: (Service -> Service) -> ReleaseAddress -> Request ReleaseAddress
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 ReleaseAddress
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ReleaseAddress)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull ReleaseAddressResponse
ReleaseAddressResponse'
instance Prelude.Hashable ReleaseAddress where
hashWithSalt :: Int -> ReleaseAddress -> Int
hashWithSalt Int
_salt ReleaseAddress' {Maybe Bool
Maybe Text
publicIp :: Maybe Text
networkBorderGroup :: Maybe Text
dryRun :: Maybe Bool
allocationId :: Maybe Text
$sel:publicIp:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:networkBorderGroup:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:dryRun:ReleaseAddress' :: ReleaseAddress -> Maybe Bool
$sel:allocationId:ReleaseAddress' :: ReleaseAddress -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
allocationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkBorderGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIp
instance Prelude.NFData ReleaseAddress where
rnf :: ReleaseAddress -> ()
rnf ReleaseAddress' {Maybe Bool
Maybe Text
publicIp :: Maybe Text
networkBorderGroup :: Maybe Text
dryRun :: Maybe Bool
allocationId :: Maybe Text
$sel:publicIp:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:networkBorderGroup:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:dryRun:ReleaseAddress' :: ReleaseAddress -> Maybe Bool
$sel:allocationId:ReleaseAddress' :: ReleaseAddress -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
allocationId
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Maybe Text
networkBorderGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicIp
instance Data.ToHeaders ReleaseAddress where
toHeaders :: ReleaseAddress -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ReleaseAddress where
toPath :: ReleaseAddress -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ReleaseAddress where
toQuery :: ReleaseAddress -> QueryString
toQuery ReleaseAddress' {Maybe Bool
Maybe Text
publicIp :: Maybe Text
networkBorderGroup :: Maybe Text
dryRun :: Maybe Bool
allocationId :: Maybe Text
$sel:publicIp:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:networkBorderGroup:ReleaseAddress' :: ReleaseAddress -> Maybe Text
$sel:dryRun:ReleaseAddress' :: ReleaseAddress -> Maybe Bool
$sel:allocationId:ReleaseAddress' :: ReleaseAddress -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ReleaseAddress" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"AllocationId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
allocationId,
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"NetworkBorderGroup" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
networkBorderGroup,
ByteString
"PublicIp" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
publicIp
]
data ReleaseAddressResponse = ReleaseAddressResponse'
{
}
deriving (ReleaseAddressResponse -> ReleaseAddressResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReleaseAddressResponse -> ReleaseAddressResponse -> Bool
$c/= :: ReleaseAddressResponse -> ReleaseAddressResponse -> Bool
== :: ReleaseAddressResponse -> ReleaseAddressResponse -> Bool
$c== :: ReleaseAddressResponse -> ReleaseAddressResponse -> Bool
Prelude.Eq, ReadPrec [ReleaseAddressResponse]
ReadPrec ReleaseAddressResponse
Int -> ReadS ReleaseAddressResponse
ReadS [ReleaseAddressResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReleaseAddressResponse]
$creadListPrec :: ReadPrec [ReleaseAddressResponse]
readPrec :: ReadPrec ReleaseAddressResponse
$creadPrec :: ReadPrec ReleaseAddressResponse
readList :: ReadS [ReleaseAddressResponse]
$creadList :: ReadS [ReleaseAddressResponse]
readsPrec :: Int -> ReadS ReleaseAddressResponse
$creadsPrec :: Int -> ReadS ReleaseAddressResponse
Prelude.Read, Int -> ReleaseAddressResponse -> ShowS
[ReleaseAddressResponse] -> ShowS
ReleaseAddressResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReleaseAddressResponse] -> ShowS
$cshowList :: [ReleaseAddressResponse] -> ShowS
show :: ReleaseAddressResponse -> String
$cshow :: ReleaseAddressResponse -> String
showsPrec :: Int -> ReleaseAddressResponse -> ShowS
$cshowsPrec :: Int -> ReleaseAddressResponse -> ShowS
Prelude.Show, forall x. Rep ReleaseAddressResponse x -> ReleaseAddressResponse
forall x. ReleaseAddressResponse -> Rep ReleaseAddressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReleaseAddressResponse x -> ReleaseAddressResponse
$cfrom :: forall x. ReleaseAddressResponse -> Rep ReleaseAddressResponse x
Prelude.Generic)
newReleaseAddressResponse ::
ReleaseAddressResponse
newReleaseAddressResponse :: ReleaseAddressResponse
newReleaseAddressResponse = ReleaseAddressResponse
ReleaseAddressResponse'
instance Prelude.NFData ReleaseAddressResponse where
rnf :: ReleaseAddressResponse -> ()
rnf ReleaseAddressResponse
_ = ()