{-# 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.Lightsail.CreateInstances
(
CreateInstances (..),
newCreateInstances,
createInstances_customImageName,
createInstances_addOns,
createInstances_userData,
createInstances_ipAddressType,
createInstances_keyPairName,
createInstances_tags,
createInstances_instanceNames,
createInstances_availabilityZone,
createInstances_blueprintId,
createInstances_bundleId,
CreateInstancesResponse (..),
newCreateInstancesResponse,
createInstancesResponse_operations,
createInstancesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateInstances = CreateInstances'
{
CreateInstances -> Maybe Text
customImageName :: Prelude.Maybe Prelude.Text,
CreateInstances -> Maybe [AddOnRequest]
addOns :: Prelude.Maybe [AddOnRequest],
CreateInstances -> Maybe Text
userData :: Prelude.Maybe Prelude.Text,
CreateInstances -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CreateInstances -> Maybe Text
keyPairName :: Prelude.Maybe Prelude.Text,
CreateInstances -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateInstances -> [Text]
instanceNames :: [Prelude.Text],
CreateInstances -> Text
availabilityZone :: Prelude.Text,
CreateInstances -> Text
blueprintId :: Prelude.Text,
CreateInstances -> Text
bundleId :: Prelude.Text
}
deriving (CreateInstances -> CreateInstances -> Bool
(CreateInstances -> CreateInstances -> Bool)
-> (CreateInstances -> CreateInstances -> Bool)
-> Eq CreateInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInstances -> CreateInstances -> Bool
$c/= :: CreateInstances -> CreateInstances -> Bool
== :: CreateInstances -> CreateInstances -> Bool
$c== :: CreateInstances -> CreateInstances -> Bool
Prelude.Eq, ReadPrec [CreateInstances]
ReadPrec CreateInstances
Int -> ReadS CreateInstances
ReadS [CreateInstances]
(Int -> ReadS CreateInstances)
-> ReadS [CreateInstances]
-> ReadPrec CreateInstances
-> ReadPrec [CreateInstances]
-> Read CreateInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInstances]
$creadListPrec :: ReadPrec [CreateInstances]
readPrec :: ReadPrec CreateInstances
$creadPrec :: ReadPrec CreateInstances
readList :: ReadS [CreateInstances]
$creadList :: ReadS [CreateInstances]
readsPrec :: Int -> ReadS CreateInstances
$creadsPrec :: Int -> ReadS CreateInstances
Prelude.Read, Int -> CreateInstances -> ShowS
[CreateInstances] -> ShowS
CreateInstances -> String
(Int -> CreateInstances -> ShowS)
-> (CreateInstances -> String)
-> ([CreateInstances] -> ShowS)
-> Show CreateInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInstances] -> ShowS
$cshowList :: [CreateInstances] -> ShowS
show :: CreateInstances -> String
$cshow :: CreateInstances -> String
showsPrec :: Int -> CreateInstances -> ShowS
$cshowsPrec :: Int -> CreateInstances -> ShowS
Prelude.Show, (forall x. CreateInstances -> Rep CreateInstances x)
-> (forall x. Rep CreateInstances x -> CreateInstances)
-> Generic CreateInstances
forall x. Rep CreateInstances x -> CreateInstances
forall x. CreateInstances -> Rep CreateInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateInstances x -> CreateInstances
$cfrom :: forall x. CreateInstances -> Rep CreateInstances x
Prelude.Generic)
newCreateInstances ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateInstances
newCreateInstances :: Text -> Text -> Text -> CreateInstances
newCreateInstances
Text
pAvailabilityZone_
Text
pBlueprintId_
Text
pBundleId_ =
CreateInstances' :: Maybe Text
-> Maybe [AddOnRequest]
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe [Tag]
-> [Text]
-> Text
-> Text
-> Text
-> CreateInstances
CreateInstances'
{ $sel:customImageName:CreateInstances' :: Maybe Text
customImageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addOns:CreateInstances' :: Maybe [AddOnRequest]
addOns = Maybe [AddOnRequest]
forall a. Maybe a
Prelude.Nothing,
$sel:userData:CreateInstances' :: Maybe Text
userData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:CreateInstances' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
$sel:keyPairName:CreateInstances' :: Maybe Text
keyPairName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateInstances' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:instanceNames:CreateInstances' :: [Text]
instanceNames = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:availabilityZone:CreateInstances' :: Text
availabilityZone = Text
pAvailabilityZone_,
$sel:blueprintId:CreateInstances' :: Text
blueprintId = Text
pBlueprintId_,
$sel:bundleId:CreateInstances' :: Text
bundleId = Text
pBundleId_
}
createInstances_customImageName :: Lens.Lens' CreateInstances (Prelude.Maybe Prelude.Text)
createInstances_customImageName :: (Maybe Text -> f (Maybe Text))
-> CreateInstances -> f CreateInstances
createInstances_customImageName = (CreateInstances -> Maybe Text)
-> (CreateInstances -> Maybe Text -> CreateInstances)
-> Lens CreateInstances CreateInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe Text
customImageName :: Maybe Text
$sel:customImageName:CreateInstances' :: CreateInstances -> Maybe Text
customImageName} -> Maybe Text
customImageName) (\s :: CreateInstances
s@CreateInstances' {} Maybe Text
a -> CreateInstances
s {$sel:customImageName:CreateInstances' :: Maybe Text
customImageName = Maybe Text
a} :: CreateInstances)
createInstances_addOns :: Lens.Lens' CreateInstances (Prelude.Maybe [AddOnRequest])
createInstances_addOns :: (Maybe [AddOnRequest] -> f (Maybe [AddOnRequest]))
-> CreateInstances -> f CreateInstances
createInstances_addOns = (CreateInstances -> Maybe [AddOnRequest])
-> (CreateInstances -> Maybe [AddOnRequest] -> CreateInstances)
-> Lens
CreateInstances
CreateInstances
(Maybe [AddOnRequest])
(Maybe [AddOnRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe [AddOnRequest]
addOns :: Maybe [AddOnRequest]
$sel:addOns:CreateInstances' :: CreateInstances -> Maybe [AddOnRequest]
addOns} -> Maybe [AddOnRequest]
addOns) (\s :: CreateInstances
s@CreateInstances' {} Maybe [AddOnRequest]
a -> CreateInstances
s {$sel:addOns:CreateInstances' :: Maybe [AddOnRequest]
addOns = Maybe [AddOnRequest]
a} :: CreateInstances) ((Maybe [AddOnRequest] -> f (Maybe [AddOnRequest]))
-> CreateInstances -> f CreateInstances)
-> ((Maybe [AddOnRequest] -> f (Maybe [AddOnRequest]))
-> Maybe [AddOnRequest] -> f (Maybe [AddOnRequest]))
-> (Maybe [AddOnRequest] -> f (Maybe [AddOnRequest]))
-> CreateInstances
-> f CreateInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AddOnRequest] [AddOnRequest] [AddOnRequest] [AddOnRequest]
-> Iso
(Maybe [AddOnRequest])
(Maybe [AddOnRequest])
(Maybe [AddOnRequest])
(Maybe [AddOnRequest])
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 AnIso [AddOnRequest] [AddOnRequest] [AddOnRequest] [AddOnRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstances_userData :: Lens.Lens' CreateInstances (Prelude.Maybe Prelude.Text)
createInstances_userData :: (Maybe Text -> f (Maybe Text))
-> CreateInstances -> f CreateInstances
createInstances_userData = (CreateInstances -> Maybe Text)
-> (CreateInstances -> Maybe Text -> CreateInstances)
-> Lens CreateInstances CreateInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe Text
userData :: Maybe Text
$sel:userData:CreateInstances' :: CreateInstances -> Maybe Text
userData} -> Maybe Text
userData) (\s :: CreateInstances
s@CreateInstances' {} Maybe Text
a -> CreateInstances
s {$sel:userData:CreateInstances' :: Maybe Text
userData = Maybe Text
a} :: CreateInstances)
createInstances_ipAddressType :: Lens.Lens' CreateInstances (Prelude.Maybe IpAddressType)
createInstances_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> CreateInstances -> f CreateInstances
createInstances_ipAddressType = (CreateInstances -> Maybe IpAddressType)
-> (CreateInstances -> Maybe IpAddressType -> CreateInstances)
-> Lens
CreateInstances
CreateInstances
(Maybe IpAddressType)
(Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CreateInstances' :: CreateInstances -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CreateInstances
s@CreateInstances' {} Maybe IpAddressType
a -> CreateInstances
s {$sel:ipAddressType:CreateInstances' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CreateInstances)
createInstances_keyPairName :: Lens.Lens' CreateInstances (Prelude.Maybe Prelude.Text)
createInstances_keyPairName :: (Maybe Text -> f (Maybe Text))
-> CreateInstances -> f CreateInstances
createInstances_keyPairName = (CreateInstances -> Maybe Text)
-> (CreateInstances -> Maybe Text -> CreateInstances)
-> Lens CreateInstances CreateInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe Text
keyPairName :: Maybe Text
$sel:keyPairName:CreateInstances' :: CreateInstances -> Maybe Text
keyPairName} -> Maybe Text
keyPairName) (\s :: CreateInstances
s@CreateInstances' {} Maybe Text
a -> CreateInstances
s {$sel:keyPairName:CreateInstances' :: Maybe Text
keyPairName = Maybe Text
a} :: CreateInstances)
createInstances_tags :: Lens.Lens' CreateInstances (Prelude.Maybe [Tag])
createInstances_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInstances -> f CreateInstances
createInstances_tags = (CreateInstances -> Maybe [Tag])
-> (CreateInstances -> Maybe [Tag] -> CreateInstances)
-> Lens CreateInstances CreateInstances (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateInstances' :: CreateInstances -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateInstances
s@CreateInstances' {} Maybe [Tag]
a -> CreateInstances
s {$sel:tags:CreateInstances' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateInstances) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInstances -> f CreateInstances)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateInstances
-> f CreateInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstances_instanceNames :: Lens.Lens' CreateInstances [Prelude.Text]
createInstances_instanceNames :: ([Text] -> f [Text]) -> CreateInstances -> f CreateInstances
createInstances_instanceNames = (CreateInstances -> [Text])
-> (CreateInstances -> [Text] -> CreateInstances)
-> Lens CreateInstances CreateInstances [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {[Text]
instanceNames :: [Text]
$sel:instanceNames:CreateInstances' :: CreateInstances -> [Text]
instanceNames} -> [Text]
instanceNames) (\s :: CreateInstances
s@CreateInstances' {} [Text]
a -> CreateInstances
s {$sel:instanceNames:CreateInstances' :: [Text]
instanceNames = [Text]
a} :: CreateInstances) (([Text] -> f [Text]) -> CreateInstances -> f CreateInstances)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateInstances
-> f CreateInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstances_availabilityZone :: Lens.Lens' CreateInstances Prelude.Text
createInstances_availabilityZone :: (Text -> f Text) -> CreateInstances -> f CreateInstances
createInstances_availabilityZone = (CreateInstances -> Text)
-> (CreateInstances -> Text -> CreateInstances)
-> Lens CreateInstances CreateInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Text
availabilityZone :: Text
$sel:availabilityZone:CreateInstances' :: CreateInstances -> Text
availabilityZone} -> Text
availabilityZone) (\s :: CreateInstances
s@CreateInstances' {} Text
a -> CreateInstances
s {$sel:availabilityZone:CreateInstances' :: Text
availabilityZone = Text
a} :: CreateInstances)
createInstances_blueprintId :: Lens.Lens' CreateInstances Prelude.Text
createInstances_blueprintId :: (Text -> f Text) -> CreateInstances -> f CreateInstances
createInstances_blueprintId = (CreateInstances -> Text)
-> (CreateInstances -> Text -> CreateInstances)
-> Lens CreateInstances CreateInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Text
blueprintId :: Text
$sel:blueprintId:CreateInstances' :: CreateInstances -> Text
blueprintId} -> Text
blueprintId) (\s :: CreateInstances
s@CreateInstances' {} Text
a -> CreateInstances
s {$sel:blueprintId:CreateInstances' :: Text
blueprintId = Text
a} :: CreateInstances)
createInstances_bundleId :: Lens.Lens' CreateInstances Prelude.Text
createInstances_bundleId :: (Text -> f Text) -> CreateInstances -> f CreateInstances
createInstances_bundleId = (CreateInstances -> Text)
-> (CreateInstances -> Text -> CreateInstances)
-> Lens CreateInstances CreateInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstances' {Text
bundleId :: Text
$sel:bundleId:CreateInstances' :: CreateInstances -> Text
bundleId} -> Text
bundleId) (\s :: CreateInstances
s@CreateInstances' {} Text
a -> CreateInstances
s {$sel:bundleId:CreateInstances' :: Text
bundleId = Text
a} :: CreateInstances)
instance Core.AWSRequest CreateInstances where
type
AWSResponse CreateInstances =
CreateInstancesResponse
request :: CreateInstances -> Request CreateInstances
request = Service -> CreateInstances -> Request CreateInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateInstances
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateInstances)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateInstances))
-> Logger
-> Service
-> Proxy CreateInstances
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateInstances)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [Operation] -> Int -> CreateInstancesResponse
CreateInstancesResponse'
(Maybe [Operation] -> Int -> CreateInstancesResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> CreateInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateInstancesResponse)
-> Either String Int -> Either String CreateInstancesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateInstances
instance Prelude.NFData CreateInstances
instance Core.ToHeaders CreateInstances where
toHeaders :: CreateInstances -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateInstances -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.CreateInstances" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateInstances where
toJSON :: CreateInstances -> Value
toJSON CreateInstances' {[Text]
Maybe [AddOnRequest]
Maybe [Tag]
Maybe Text
Maybe IpAddressType
Text
bundleId :: Text
blueprintId :: Text
availabilityZone :: Text
instanceNames :: [Text]
tags :: Maybe [Tag]
keyPairName :: Maybe Text
ipAddressType :: Maybe IpAddressType
userData :: Maybe Text
addOns :: Maybe [AddOnRequest]
customImageName :: Maybe Text
$sel:bundleId:CreateInstances' :: CreateInstances -> Text
$sel:blueprintId:CreateInstances' :: CreateInstances -> Text
$sel:availabilityZone:CreateInstances' :: CreateInstances -> Text
$sel:instanceNames:CreateInstances' :: CreateInstances -> [Text]
$sel:tags:CreateInstances' :: CreateInstances -> Maybe [Tag]
$sel:keyPairName:CreateInstances' :: CreateInstances -> Maybe Text
$sel:ipAddressType:CreateInstances' :: CreateInstances -> Maybe IpAddressType
$sel:userData:CreateInstances' :: CreateInstances -> Maybe Text
$sel:addOns:CreateInstances' :: CreateInstances -> Maybe [AddOnRequest]
$sel:customImageName:CreateInstances' :: CreateInstances -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"customImageName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customImageName,
(Text
"addOns" Text -> [AddOnRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AddOnRequest] -> Pair) -> Maybe [AddOnRequest] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AddOnRequest]
addOns,
(Text
"userData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
userData,
(Text
"ipAddressType" Text -> IpAddressType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IpAddressType -> Pair) -> Maybe IpAddressType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpAddressType
ipAddressType,
(Text
"keyPairName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyPairName,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"instanceNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
instanceNames),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"availabilityZone" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
availabilityZone),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"blueprintId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
blueprintId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"bundleId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
bundleId)
]
)
instance Core.ToPath CreateInstances where
toPath :: CreateInstances -> ByteString
toPath = ByteString -> CreateInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateInstances where
toQuery :: CreateInstances -> QueryString
toQuery = QueryString -> CreateInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateInstancesResponse = CreateInstancesResponse'
{
CreateInstancesResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
CreateInstancesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateInstancesResponse -> CreateInstancesResponse -> Bool
(CreateInstancesResponse -> CreateInstancesResponse -> Bool)
-> (CreateInstancesResponse -> CreateInstancesResponse -> Bool)
-> Eq CreateInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInstancesResponse -> CreateInstancesResponse -> Bool
$c/= :: CreateInstancesResponse -> CreateInstancesResponse -> Bool
== :: CreateInstancesResponse -> CreateInstancesResponse -> Bool
$c== :: CreateInstancesResponse -> CreateInstancesResponse -> Bool
Prelude.Eq, ReadPrec [CreateInstancesResponse]
ReadPrec CreateInstancesResponse
Int -> ReadS CreateInstancesResponse
ReadS [CreateInstancesResponse]
(Int -> ReadS CreateInstancesResponse)
-> ReadS [CreateInstancesResponse]
-> ReadPrec CreateInstancesResponse
-> ReadPrec [CreateInstancesResponse]
-> Read CreateInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInstancesResponse]
$creadListPrec :: ReadPrec [CreateInstancesResponse]
readPrec :: ReadPrec CreateInstancesResponse
$creadPrec :: ReadPrec CreateInstancesResponse
readList :: ReadS [CreateInstancesResponse]
$creadList :: ReadS [CreateInstancesResponse]
readsPrec :: Int -> ReadS CreateInstancesResponse
$creadsPrec :: Int -> ReadS CreateInstancesResponse
Prelude.Read, Int -> CreateInstancesResponse -> ShowS
[CreateInstancesResponse] -> ShowS
CreateInstancesResponse -> String
(Int -> CreateInstancesResponse -> ShowS)
-> (CreateInstancesResponse -> String)
-> ([CreateInstancesResponse] -> ShowS)
-> Show CreateInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInstancesResponse] -> ShowS
$cshowList :: [CreateInstancesResponse] -> ShowS
show :: CreateInstancesResponse -> String
$cshow :: CreateInstancesResponse -> String
showsPrec :: Int -> CreateInstancesResponse -> ShowS
$cshowsPrec :: Int -> CreateInstancesResponse -> ShowS
Prelude.Show, (forall x.
CreateInstancesResponse -> Rep CreateInstancesResponse x)
-> (forall x.
Rep CreateInstancesResponse x -> CreateInstancesResponse)
-> Generic CreateInstancesResponse
forall x. Rep CreateInstancesResponse x -> CreateInstancesResponse
forall x. CreateInstancesResponse -> Rep CreateInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateInstancesResponse x -> CreateInstancesResponse
$cfrom :: forall x. CreateInstancesResponse -> Rep CreateInstancesResponse x
Prelude.Generic)
newCreateInstancesResponse ::
Prelude.Int ->
CreateInstancesResponse
newCreateInstancesResponse :: Int -> CreateInstancesResponse
newCreateInstancesResponse Int
pHttpStatus_ =
CreateInstancesResponse' :: Maybe [Operation] -> Int -> CreateInstancesResponse
CreateInstancesResponse'
{ $sel:operations:CreateInstancesResponse' :: Maybe [Operation]
operations =
Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createInstancesResponse_operations :: Lens.Lens' CreateInstancesResponse (Prelude.Maybe [Operation])
createInstancesResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateInstancesResponse -> f CreateInstancesResponse
createInstancesResponse_operations = (CreateInstancesResponse -> Maybe [Operation])
-> (CreateInstancesResponse
-> Maybe [Operation] -> CreateInstancesResponse)
-> Lens
CreateInstancesResponse
CreateInstancesResponse
(Maybe [Operation])
(Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:CreateInstancesResponse' :: CreateInstancesResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: CreateInstancesResponse
s@CreateInstancesResponse' {} Maybe [Operation]
a -> CreateInstancesResponse
s {$sel:operations:CreateInstancesResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: CreateInstancesResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
-> CreateInstancesResponse -> f CreateInstancesResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
-> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateInstancesResponse
-> f CreateInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
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 AnIso [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesResponse_httpStatus :: Lens.Lens' CreateInstancesResponse Prelude.Int
createInstancesResponse_httpStatus :: (Int -> f Int)
-> CreateInstancesResponse -> f CreateInstancesResponse
createInstancesResponse_httpStatus = (CreateInstancesResponse -> Int)
-> (CreateInstancesResponse -> Int -> CreateInstancesResponse)
-> Lens CreateInstancesResponse CreateInstancesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateInstancesResponse' :: CreateInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateInstancesResponse
s@CreateInstancesResponse' {} Int
a -> CreateInstancesResponse
s {$sel:httpStatus:CreateInstancesResponse' :: Int
httpStatus = Int
a} :: CreateInstancesResponse)
instance Prelude.NFData CreateInstancesResponse