{-# 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.AllocateHosts
(
AllocateHosts (..),
newAllocateHosts,
allocateHosts_autoPlacement,
allocateHosts_clientToken,
allocateHosts_hostRecovery,
allocateHosts_instanceFamily,
allocateHosts_instanceType,
allocateHosts_outpostArn,
allocateHosts_tagSpecifications,
allocateHosts_availabilityZone,
allocateHosts_quantity,
AllocateHostsResponse (..),
newAllocateHostsResponse,
allocateHostsResponse_hostIds,
allocateHostsResponse_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 AllocateHosts = AllocateHosts'
{
AllocateHosts -> Maybe AutoPlacement
autoPlacement :: Prelude.Maybe AutoPlacement,
AllocateHosts -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
AllocateHosts -> Maybe HostRecovery
hostRecovery :: Prelude.Maybe HostRecovery,
AllocateHosts -> Maybe Text
instanceFamily :: Prelude.Maybe Prelude.Text,
AllocateHosts -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
AllocateHosts -> Maybe Text
outpostArn :: Prelude.Maybe Prelude.Text,
AllocateHosts -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
AllocateHosts -> Text
availabilityZone :: Prelude.Text,
AllocateHosts -> Int
quantity :: Prelude.Int
}
deriving (AllocateHosts -> AllocateHosts -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AllocateHosts -> AllocateHosts -> Bool
$c/= :: AllocateHosts -> AllocateHosts -> Bool
== :: AllocateHosts -> AllocateHosts -> Bool
$c== :: AllocateHosts -> AllocateHosts -> Bool
Prelude.Eq, ReadPrec [AllocateHosts]
ReadPrec AllocateHosts
Int -> ReadS AllocateHosts
ReadS [AllocateHosts]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AllocateHosts]
$creadListPrec :: ReadPrec [AllocateHosts]
readPrec :: ReadPrec AllocateHosts
$creadPrec :: ReadPrec AllocateHosts
readList :: ReadS [AllocateHosts]
$creadList :: ReadS [AllocateHosts]
readsPrec :: Int -> ReadS AllocateHosts
$creadsPrec :: Int -> ReadS AllocateHosts
Prelude.Read, Int -> AllocateHosts -> ShowS
[AllocateHosts] -> ShowS
AllocateHosts -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AllocateHosts] -> ShowS
$cshowList :: [AllocateHosts] -> ShowS
show :: AllocateHosts -> String
$cshow :: AllocateHosts -> String
showsPrec :: Int -> AllocateHosts -> ShowS
$cshowsPrec :: Int -> AllocateHosts -> ShowS
Prelude.Show, forall x. Rep AllocateHosts x -> AllocateHosts
forall x. AllocateHosts -> Rep AllocateHosts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AllocateHosts x -> AllocateHosts
$cfrom :: forall x. AllocateHosts -> Rep AllocateHosts x
Prelude.Generic)
newAllocateHosts ::
Prelude.Text ->
Prelude.Int ->
AllocateHosts
newAllocateHosts :: Text -> Int -> AllocateHosts
newAllocateHosts Text
pAvailabilityZone_ Int
pQuantity_ =
AllocateHosts'
{ $sel:autoPlacement:AllocateHosts' :: Maybe AutoPlacement
autoPlacement = forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:AllocateHosts' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:hostRecovery:AllocateHosts' :: Maybe HostRecovery
hostRecovery = forall a. Maybe a
Prelude.Nothing,
$sel:instanceFamily:AllocateHosts' :: Maybe Text
instanceFamily = forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:AllocateHosts' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:outpostArn:AllocateHosts' :: Maybe Text
outpostArn = forall a. Maybe a
Prelude.Nothing,
$sel:tagSpecifications:AllocateHosts' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:AllocateHosts' :: Text
availabilityZone = Text
pAvailabilityZone_,
$sel:quantity:AllocateHosts' :: Int
quantity = Int
pQuantity_
}
allocateHosts_autoPlacement :: Lens.Lens' AllocateHosts (Prelude.Maybe AutoPlacement)
allocateHosts_autoPlacement :: Lens' AllocateHosts (Maybe AutoPlacement)
allocateHosts_autoPlacement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe AutoPlacement
autoPlacement :: Maybe AutoPlacement
$sel:autoPlacement:AllocateHosts' :: AllocateHosts -> Maybe AutoPlacement
autoPlacement} -> Maybe AutoPlacement
autoPlacement) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe AutoPlacement
a -> AllocateHosts
s {$sel:autoPlacement:AllocateHosts' :: Maybe AutoPlacement
autoPlacement = Maybe AutoPlacement
a} :: AllocateHosts)
allocateHosts_clientToken :: Lens.Lens' AllocateHosts (Prelude.Maybe Prelude.Text)
allocateHosts_clientToken :: Lens' AllocateHosts (Maybe Text)
allocateHosts_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:AllocateHosts' :: AllocateHosts -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe Text
a -> AllocateHosts
s {$sel:clientToken:AllocateHosts' :: Maybe Text
clientToken = Maybe Text
a} :: AllocateHosts)
allocateHosts_hostRecovery :: Lens.Lens' AllocateHosts (Prelude.Maybe HostRecovery)
allocateHosts_hostRecovery :: Lens' AllocateHosts (Maybe HostRecovery)
allocateHosts_hostRecovery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe HostRecovery
hostRecovery :: Maybe HostRecovery
$sel:hostRecovery:AllocateHosts' :: AllocateHosts -> Maybe HostRecovery
hostRecovery} -> Maybe HostRecovery
hostRecovery) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe HostRecovery
a -> AllocateHosts
s {$sel:hostRecovery:AllocateHosts' :: Maybe HostRecovery
hostRecovery = Maybe HostRecovery
a} :: AllocateHosts)
allocateHosts_instanceFamily :: Lens.Lens' AllocateHosts (Prelude.Maybe Prelude.Text)
allocateHosts_instanceFamily :: Lens' AllocateHosts (Maybe Text)
allocateHosts_instanceFamily = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe Text
instanceFamily :: Maybe Text
$sel:instanceFamily:AllocateHosts' :: AllocateHosts -> Maybe Text
instanceFamily} -> Maybe Text
instanceFamily) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe Text
a -> AllocateHosts
s {$sel:instanceFamily:AllocateHosts' :: Maybe Text
instanceFamily = Maybe Text
a} :: AllocateHosts)
allocateHosts_instanceType :: Lens.Lens' AllocateHosts (Prelude.Maybe Prelude.Text)
allocateHosts_instanceType :: Lens' AllocateHosts (Maybe Text)
allocateHosts_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:AllocateHosts' :: AllocateHosts -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe Text
a -> AllocateHosts
s {$sel:instanceType:AllocateHosts' :: Maybe Text
instanceType = Maybe Text
a} :: AllocateHosts)
allocateHosts_outpostArn :: Lens.Lens' AllocateHosts (Prelude.Maybe Prelude.Text)
allocateHosts_outpostArn :: Lens' AllocateHosts (Maybe Text)
allocateHosts_outpostArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe Text
outpostArn :: Maybe Text
$sel:outpostArn:AllocateHosts' :: AllocateHosts -> Maybe Text
outpostArn} -> Maybe Text
outpostArn) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe Text
a -> AllocateHosts
s {$sel:outpostArn:AllocateHosts' :: Maybe Text
outpostArn = Maybe Text
a} :: AllocateHosts)
allocateHosts_tagSpecifications :: Lens.Lens' AllocateHosts (Prelude.Maybe [TagSpecification])
allocateHosts_tagSpecifications :: Lens' AllocateHosts (Maybe [TagSpecification])
allocateHosts_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:AllocateHosts' :: AllocateHosts -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: AllocateHosts
s@AllocateHosts' {} Maybe [TagSpecification]
a -> AllocateHosts
s {$sel:tagSpecifications:AllocateHosts' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: AllocateHosts) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
allocateHosts_availabilityZone :: Lens.Lens' AllocateHosts Prelude.Text
allocateHosts_availabilityZone :: Lens' AllocateHosts Text
allocateHosts_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Text
availabilityZone :: Text
$sel:availabilityZone:AllocateHosts' :: AllocateHosts -> Text
availabilityZone} -> Text
availabilityZone) (\s :: AllocateHosts
s@AllocateHosts' {} Text
a -> AllocateHosts
s {$sel:availabilityZone:AllocateHosts' :: Text
availabilityZone = Text
a} :: AllocateHosts)
allocateHosts_quantity :: Lens.Lens' AllocateHosts Prelude.Int
allocateHosts_quantity :: Lens' AllocateHosts Int
allocateHosts_quantity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHosts' {Int
quantity :: Int
$sel:quantity:AllocateHosts' :: AllocateHosts -> Int
quantity} -> Int
quantity) (\s :: AllocateHosts
s@AllocateHosts' {} Int
a -> AllocateHosts
s {$sel:quantity:AllocateHosts' :: Int
quantity = Int
a} :: AllocateHosts)
instance Core.AWSRequest AllocateHosts where
type
AWSResponse AllocateHosts =
AllocateHostsResponse
request :: (Service -> Service) -> AllocateHosts -> Request AllocateHosts
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 AllocateHosts
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AllocateHosts)))
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 [Text] -> Int -> AllocateHostsResponse
AllocateHostsResponse'
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
"hostIdSet"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
)
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 AllocateHosts where
hashWithSalt :: Int -> AllocateHosts -> Int
hashWithSalt Int
_salt AllocateHosts' {Int
Maybe [TagSpecification]
Maybe Text
Maybe AutoPlacement
Maybe HostRecovery
Text
quantity :: Int
availabilityZone :: Text
tagSpecifications :: Maybe [TagSpecification]
outpostArn :: Maybe Text
instanceType :: Maybe Text
instanceFamily :: Maybe Text
hostRecovery :: Maybe HostRecovery
clientToken :: Maybe Text
autoPlacement :: Maybe AutoPlacement
$sel:quantity:AllocateHosts' :: AllocateHosts -> Int
$sel:availabilityZone:AllocateHosts' :: AllocateHosts -> Text
$sel:tagSpecifications:AllocateHosts' :: AllocateHosts -> Maybe [TagSpecification]
$sel:outpostArn:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceType:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceFamily:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:hostRecovery:AllocateHosts' :: AllocateHosts -> Maybe HostRecovery
$sel:clientToken:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:autoPlacement:AllocateHosts' :: AllocateHosts -> Maybe AutoPlacement
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoPlacement
autoPlacement
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HostRecovery
hostRecovery
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceFamily
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outpostArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
availabilityZone
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
quantity
instance Prelude.NFData AllocateHosts where
rnf :: AllocateHosts -> ()
rnf AllocateHosts' {Int
Maybe [TagSpecification]
Maybe Text
Maybe AutoPlacement
Maybe HostRecovery
Text
quantity :: Int
availabilityZone :: Text
tagSpecifications :: Maybe [TagSpecification]
outpostArn :: Maybe Text
instanceType :: Maybe Text
instanceFamily :: Maybe Text
hostRecovery :: Maybe HostRecovery
clientToken :: Maybe Text
autoPlacement :: Maybe AutoPlacement
$sel:quantity:AllocateHosts' :: AllocateHosts -> Int
$sel:availabilityZone:AllocateHosts' :: AllocateHosts -> Text
$sel:tagSpecifications:AllocateHosts' :: AllocateHosts -> Maybe [TagSpecification]
$sel:outpostArn:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceType:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceFamily:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:hostRecovery:AllocateHosts' :: AllocateHosts -> Maybe HostRecovery
$sel:clientToken:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:autoPlacement:AllocateHosts' :: AllocateHosts -> Maybe AutoPlacement
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoPlacement
autoPlacement
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HostRecovery
hostRecovery
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceFamily
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outpostArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagSpecification]
tagSpecifications
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
availabilityZone
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
quantity
instance Data.ToHeaders AllocateHosts where
toHeaders :: AllocateHosts -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath AllocateHosts where
toPath :: AllocateHosts -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery AllocateHosts where
toQuery :: AllocateHosts -> QueryString
toQuery AllocateHosts' {Int
Maybe [TagSpecification]
Maybe Text
Maybe AutoPlacement
Maybe HostRecovery
Text
quantity :: Int
availabilityZone :: Text
tagSpecifications :: Maybe [TagSpecification]
outpostArn :: Maybe Text
instanceType :: Maybe Text
instanceFamily :: Maybe Text
hostRecovery :: Maybe HostRecovery
clientToken :: Maybe Text
autoPlacement :: Maybe AutoPlacement
$sel:quantity:AllocateHosts' :: AllocateHosts -> Int
$sel:availabilityZone:AllocateHosts' :: AllocateHosts -> Text
$sel:tagSpecifications:AllocateHosts' :: AllocateHosts -> Maybe [TagSpecification]
$sel:outpostArn:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceType:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:instanceFamily:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:hostRecovery:AllocateHosts' :: AllocateHosts -> Maybe HostRecovery
$sel:clientToken:AllocateHosts' :: AllocateHosts -> Maybe Text
$sel:autoPlacement:AllocateHosts' :: AllocateHosts -> Maybe AutoPlacement
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"AllocateHosts" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"AutoPlacement" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe AutoPlacement
autoPlacement,
ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
ByteString
"HostRecovery" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe HostRecovery
hostRecovery,
ByteString
"InstanceFamily" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
instanceFamily,
ByteString
"InstanceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
instanceType,
ByteString
"OutpostArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
outpostArn,
forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagSpecification"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
),
ByteString
"AvailabilityZone" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
availabilityZone,
ByteString
"Quantity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
quantity
]
data AllocateHostsResponse = AllocateHostsResponse'
{
AllocateHostsResponse -> Maybe [Text]
hostIds :: Prelude.Maybe [Prelude.Text],
AllocateHostsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AllocateHostsResponse -> AllocateHostsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AllocateHostsResponse -> AllocateHostsResponse -> Bool
$c/= :: AllocateHostsResponse -> AllocateHostsResponse -> Bool
== :: AllocateHostsResponse -> AllocateHostsResponse -> Bool
$c== :: AllocateHostsResponse -> AllocateHostsResponse -> Bool
Prelude.Eq, ReadPrec [AllocateHostsResponse]
ReadPrec AllocateHostsResponse
Int -> ReadS AllocateHostsResponse
ReadS [AllocateHostsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AllocateHostsResponse]
$creadListPrec :: ReadPrec [AllocateHostsResponse]
readPrec :: ReadPrec AllocateHostsResponse
$creadPrec :: ReadPrec AllocateHostsResponse
readList :: ReadS [AllocateHostsResponse]
$creadList :: ReadS [AllocateHostsResponse]
readsPrec :: Int -> ReadS AllocateHostsResponse
$creadsPrec :: Int -> ReadS AllocateHostsResponse
Prelude.Read, Int -> AllocateHostsResponse -> ShowS
[AllocateHostsResponse] -> ShowS
AllocateHostsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AllocateHostsResponse] -> ShowS
$cshowList :: [AllocateHostsResponse] -> ShowS
show :: AllocateHostsResponse -> String
$cshow :: AllocateHostsResponse -> String
showsPrec :: Int -> AllocateHostsResponse -> ShowS
$cshowsPrec :: Int -> AllocateHostsResponse -> ShowS
Prelude.Show, forall x. Rep AllocateHostsResponse x -> AllocateHostsResponse
forall x. AllocateHostsResponse -> Rep AllocateHostsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AllocateHostsResponse x -> AllocateHostsResponse
$cfrom :: forall x. AllocateHostsResponse -> Rep AllocateHostsResponse x
Prelude.Generic)
newAllocateHostsResponse ::
Prelude.Int ->
AllocateHostsResponse
newAllocateHostsResponse :: Int -> AllocateHostsResponse
newAllocateHostsResponse Int
pHttpStatus_ =
AllocateHostsResponse'
{ $sel:hostIds:AllocateHostsResponse' :: Maybe [Text]
hostIds = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AllocateHostsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
allocateHostsResponse_hostIds :: Lens.Lens' AllocateHostsResponse (Prelude.Maybe [Prelude.Text])
allocateHostsResponse_hostIds :: Lens' AllocateHostsResponse (Maybe [Text])
allocateHostsResponse_hostIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHostsResponse' {Maybe [Text]
hostIds :: Maybe [Text]
$sel:hostIds:AllocateHostsResponse' :: AllocateHostsResponse -> Maybe [Text]
hostIds} -> Maybe [Text]
hostIds) (\s :: AllocateHostsResponse
s@AllocateHostsResponse' {} Maybe [Text]
a -> AllocateHostsResponse
s {$sel:hostIds:AllocateHostsResponse' :: Maybe [Text]
hostIds = Maybe [Text]
a} :: AllocateHostsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
allocateHostsResponse_httpStatus :: Lens.Lens' AllocateHostsResponse Prelude.Int
allocateHostsResponse_httpStatus :: Lens' AllocateHostsResponse Int
allocateHostsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllocateHostsResponse' {Int
httpStatus :: Int
$sel:httpStatus:AllocateHostsResponse' :: AllocateHostsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AllocateHostsResponse
s@AllocateHostsResponse' {} Int
a -> AllocateHostsResponse
s {$sel:httpStatus:AllocateHostsResponse' :: Int
httpStatus = Int
a} :: AllocateHostsResponse)
instance Prelude.NFData AllocateHostsResponse where
rnf :: AllocateHostsResponse -> ()
rnf AllocateHostsResponse' {Int
Maybe [Text]
httpStatus :: Int
hostIds :: Maybe [Text]
$sel:httpStatus:AllocateHostsResponse' :: AllocateHostsResponse -> Int
$sel:hostIds:AllocateHostsResponse' :: AllocateHostsResponse -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
hostIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus