{-# 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.EnableVpcClassicLinkDnsSupport
(
EnableVpcClassicLinkDnsSupport (..),
newEnableVpcClassicLinkDnsSupport,
enableVpcClassicLinkDnsSupport_vpcId,
EnableVpcClassicLinkDnsSupportResponse (..),
newEnableVpcClassicLinkDnsSupportResponse,
enableVpcClassicLinkDnsSupportResponse_return,
enableVpcClassicLinkDnsSupportResponse_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 EnableVpcClassicLinkDnsSupport = EnableVpcClassicLinkDnsSupport'
{
EnableVpcClassicLinkDnsSupport -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
}
deriving (EnableVpcClassicLinkDnsSupport
-> EnableVpcClassicLinkDnsSupport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableVpcClassicLinkDnsSupport
-> EnableVpcClassicLinkDnsSupport -> Bool
$c/= :: EnableVpcClassicLinkDnsSupport
-> EnableVpcClassicLinkDnsSupport -> Bool
== :: EnableVpcClassicLinkDnsSupport
-> EnableVpcClassicLinkDnsSupport -> Bool
$c== :: EnableVpcClassicLinkDnsSupport
-> EnableVpcClassicLinkDnsSupport -> Bool
Prelude.Eq, ReadPrec [EnableVpcClassicLinkDnsSupport]
ReadPrec EnableVpcClassicLinkDnsSupport
Int -> ReadS EnableVpcClassicLinkDnsSupport
ReadS [EnableVpcClassicLinkDnsSupport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableVpcClassicLinkDnsSupport]
$creadListPrec :: ReadPrec [EnableVpcClassicLinkDnsSupport]
readPrec :: ReadPrec EnableVpcClassicLinkDnsSupport
$creadPrec :: ReadPrec EnableVpcClassicLinkDnsSupport
readList :: ReadS [EnableVpcClassicLinkDnsSupport]
$creadList :: ReadS [EnableVpcClassicLinkDnsSupport]
readsPrec :: Int -> ReadS EnableVpcClassicLinkDnsSupport
$creadsPrec :: Int -> ReadS EnableVpcClassicLinkDnsSupport
Prelude.Read, Int -> EnableVpcClassicLinkDnsSupport -> ShowS
[EnableVpcClassicLinkDnsSupport] -> ShowS
EnableVpcClassicLinkDnsSupport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableVpcClassicLinkDnsSupport] -> ShowS
$cshowList :: [EnableVpcClassicLinkDnsSupport] -> ShowS
show :: EnableVpcClassicLinkDnsSupport -> String
$cshow :: EnableVpcClassicLinkDnsSupport -> String
showsPrec :: Int -> EnableVpcClassicLinkDnsSupport -> ShowS
$cshowsPrec :: Int -> EnableVpcClassicLinkDnsSupport -> ShowS
Prelude.Show, forall x.
Rep EnableVpcClassicLinkDnsSupport x
-> EnableVpcClassicLinkDnsSupport
forall x.
EnableVpcClassicLinkDnsSupport
-> Rep EnableVpcClassicLinkDnsSupport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableVpcClassicLinkDnsSupport x
-> EnableVpcClassicLinkDnsSupport
$cfrom :: forall x.
EnableVpcClassicLinkDnsSupport
-> Rep EnableVpcClassicLinkDnsSupport x
Prelude.Generic)
newEnableVpcClassicLinkDnsSupport ::
EnableVpcClassicLinkDnsSupport
newEnableVpcClassicLinkDnsSupport :: EnableVpcClassicLinkDnsSupport
newEnableVpcClassicLinkDnsSupport =
EnableVpcClassicLinkDnsSupport'
{ $sel:vpcId:EnableVpcClassicLinkDnsSupport' :: Maybe Text
vpcId =
forall a. Maybe a
Prelude.Nothing
}
enableVpcClassicLinkDnsSupport_vpcId :: Lens.Lens' EnableVpcClassicLinkDnsSupport (Prelude.Maybe Prelude.Text)
enableVpcClassicLinkDnsSupport_vpcId :: Lens' EnableVpcClassicLinkDnsSupport (Maybe Text)
enableVpcClassicLinkDnsSupport_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVpcClassicLinkDnsSupport' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:EnableVpcClassicLinkDnsSupport' :: EnableVpcClassicLinkDnsSupport -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: EnableVpcClassicLinkDnsSupport
s@EnableVpcClassicLinkDnsSupport' {} Maybe Text
a -> EnableVpcClassicLinkDnsSupport
s {$sel:vpcId:EnableVpcClassicLinkDnsSupport' :: Maybe Text
vpcId = Maybe Text
a} :: EnableVpcClassicLinkDnsSupport)
instance
Core.AWSRequest
EnableVpcClassicLinkDnsSupport
where
type
AWSResponse EnableVpcClassicLinkDnsSupport =
EnableVpcClassicLinkDnsSupportResponse
request :: (Service -> Service)
-> EnableVpcClassicLinkDnsSupport
-> Request EnableVpcClassicLinkDnsSupport
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 EnableVpcClassicLinkDnsSupport
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse EnableVpcClassicLinkDnsSupport)))
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 -> EnableVpcClassicLinkDnsSupportResponse
EnableVpcClassicLinkDnsSupportResponse'
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
"return")
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
EnableVpcClassicLinkDnsSupport
where
hashWithSalt :: Int -> EnableVpcClassicLinkDnsSupport -> Int
hashWithSalt
Int
_salt
EnableVpcClassicLinkDnsSupport' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:EnableVpcClassicLinkDnsSupport' :: EnableVpcClassicLinkDnsSupport -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
instance
Prelude.NFData
EnableVpcClassicLinkDnsSupport
where
rnf :: EnableVpcClassicLinkDnsSupport -> ()
rnf EnableVpcClassicLinkDnsSupport' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:EnableVpcClassicLinkDnsSupport' :: EnableVpcClassicLinkDnsSupport -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
instance
Data.ToHeaders
EnableVpcClassicLinkDnsSupport
where
toHeaders :: EnableVpcClassicLinkDnsSupport -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath EnableVpcClassicLinkDnsSupport where
toPath :: EnableVpcClassicLinkDnsSupport -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery EnableVpcClassicLinkDnsSupport where
toQuery :: EnableVpcClassicLinkDnsSupport -> QueryString
toQuery EnableVpcClassicLinkDnsSupport' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:EnableVpcClassicLinkDnsSupport' :: EnableVpcClassicLinkDnsSupport -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"EnableVpcClassicLinkDnsSupport" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"VpcId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
vpcId
]
data EnableVpcClassicLinkDnsSupportResponse = EnableVpcClassicLinkDnsSupportResponse'
{
EnableVpcClassicLinkDnsSupportResponse -> Maybe Bool
return' :: Prelude.Maybe Prelude.Bool,
EnableVpcClassicLinkDnsSupportResponse -> Int
httpStatus :: Prelude.Int
}
deriving (EnableVpcClassicLinkDnsSupportResponse
-> EnableVpcClassicLinkDnsSupportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableVpcClassicLinkDnsSupportResponse
-> EnableVpcClassicLinkDnsSupportResponse -> Bool
$c/= :: EnableVpcClassicLinkDnsSupportResponse
-> EnableVpcClassicLinkDnsSupportResponse -> Bool
== :: EnableVpcClassicLinkDnsSupportResponse
-> EnableVpcClassicLinkDnsSupportResponse -> Bool
$c== :: EnableVpcClassicLinkDnsSupportResponse
-> EnableVpcClassicLinkDnsSupportResponse -> Bool
Prelude.Eq, ReadPrec [EnableVpcClassicLinkDnsSupportResponse]
ReadPrec EnableVpcClassicLinkDnsSupportResponse
Int -> ReadS EnableVpcClassicLinkDnsSupportResponse
ReadS [EnableVpcClassicLinkDnsSupportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableVpcClassicLinkDnsSupportResponse]
$creadListPrec :: ReadPrec [EnableVpcClassicLinkDnsSupportResponse]
readPrec :: ReadPrec EnableVpcClassicLinkDnsSupportResponse
$creadPrec :: ReadPrec EnableVpcClassicLinkDnsSupportResponse
readList :: ReadS [EnableVpcClassicLinkDnsSupportResponse]
$creadList :: ReadS [EnableVpcClassicLinkDnsSupportResponse]
readsPrec :: Int -> ReadS EnableVpcClassicLinkDnsSupportResponse
$creadsPrec :: Int -> ReadS EnableVpcClassicLinkDnsSupportResponse
Prelude.Read, Int -> EnableVpcClassicLinkDnsSupportResponse -> ShowS
[EnableVpcClassicLinkDnsSupportResponse] -> ShowS
EnableVpcClassicLinkDnsSupportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableVpcClassicLinkDnsSupportResponse] -> ShowS
$cshowList :: [EnableVpcClassicLinkDnsSupportResponse] -> ShowS
show :: EnableVpcClassicLinkDnsSupportResponse -> String
$cshow :: EnableVpcClassicLinkDnsSupportResponse -> String
showsPrec :: Int -> EnableVpcClassicLinkDnsSupportResponse -> ShowS
$cshowsPrec :: Int -> EnableVpcClassicLinkDnsSupportResponse -> ShowS
Prelude.Show, forall x.
Rep EnableVpcClassicLinkDnsSupportResponse x
-> EnableVpcClassicLinkDnsSupportResponse
forall x.
EnableVpcClassicLinkDnsSupportResponse
-> Rep EnableVpcClassicLinkDnsSupportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableVpcClassicLinkDnsSupportResponse x
-> EnableVpcClassicLinkDnsSupportResponse
$cfrom :: forall x.
EnableVpcClassicLinkDnsSupportResponse
-> Rep EnableVpcClassicLinkDnsSupportResponse x
Prelude.Generic)
newEnableVpcClassicLinkDnsSupportResponse ::
Prelude.Int ->
EnableVpcClassicLinkDnsSupportResponse
newEnableVpcClassicLinkDnsSupportResponse :: Int -> EnableVpcClassicLinkDnsSupportResponse
newEnableVpcClassicLinkDnsSupportResponse
Int
pHttpStatus_ =
EnableVpcClassicLinkDnsSupportResponse'
{ $sel:return':EnableVpcClassicLinkDnsSupportResponse' :: Maybe Bool
return' =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:EnableVpcClassicLinkDnsSupportResponse' :: Int
httpStatus = Int
pHttpStatus_
}
enableVpcClassicLinkDnsSupportResponse_return :: Lens.Lens' EnableVpcClassicLinkDnsSupportResponse (Prelude.Maybe Prelude.Bool)
enableVpcClassicLinkDnsSupportResponse_return :: Lens' EnableVpcClassicLinkDnsSupportResponse (Maybe Bool)
enableVpcClassicLinkDnsSupportResponse_return = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVpcClassicLinkDnsSupportResponse' {Maybe Bool
return' :: Maybe Bool
$sel:return':EnableVpcClassicLinkDnsSupportResponse' :: EnableVpcClassicLinkDnsSupportResponse -> Maybe Bool
return'} -> Maybe Bool
return') (\s :: EnableVpcClassicLinkDnsSupportResponse
s@EnableVpcClassicLinkDnsSupportResponse' {} Maybe Bool
a -> EnableVpcClassicLinkDnsSupportResponse
s {$sel:return':EnableVpcClassicLinkDnsSupportResponse' :: Maybe Bool
return' = Maybe Bool
a} :: EnableVpcClassicLinkDnsSupportResponse)
enableVpcClassicLinkDnsSupportResponse_httpStatus :: Lens.Lens' EnableVpcClassicLinkDnsSupportResponse Prelude.Int
enableVpcClassicLinkDnsSupportResponse_httpStatus :: Lens' EnableVpcClassicLinkDnsSupportResponse Int
enableVpcClassicLinkDnsSupportResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVpcClassicLinkDnsSupportResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableVpcClassicLinkDnsSupportResponse' :: EnableVpcClassicLinkDnsSupportResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: EnableVpcClassicLinkDnsSupportResponse
s@EnableVpcClassicLinkDnsSupportResponse' {} Int
a -> EnableVpcClassicLinkDnsSupportResponse
s {$sel:httpStatus:EnableVpcClassicLinkDnsSupportResponse' :: Int
httpStatus = Int
a} :: EnableVpcClassicLinkDnsSupportResponse)
instance
Prelude.NFData
EnableVpcClassicLinkDnsSupportResponse
where
rnf :: EnableVpcClassicLinkDnsSupportResponse -> ()
rnf EnableVpcClassicLinkDnsSupportResponse' {Int
Maybe Bool
httpStatus :: Int
return' :: Maybe Bool
$sel:httpStatus:EnableVpcClassicLinkDnsSupportResponse' :: EnableVpcClassicLinkDnsSupportResponse -> Int
$sel:return':EnableVpcClassicLinkDnsSupportResponse' :: EnableVpcClassicLinkDnsSupportResponse -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
return'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus