{-# 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.CreateLoadBalancer
(
CreateLoadBalancer (..),
newCreateLoadBalancer,
createLoadBalancer_healthCheckPath,
createLoadBalancer_certificateName,
createLoadBalancer_certificateDomainName,
createLoadBalancer_certificateAlternativeNames,
createLoadBalancer_ipAddressType,
createLoadBalancer_tags,
createLoadBalancer_loadBalancerName,
createLoadBalancer_instancePort,
CreateLoadBalancerResponse (..),
newCreateLoadBalancerResponse,
createLoadBalancerResponse_operations,
createLoadBalancerResponse_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 CreateLoadBalancer = CreateLoadBalancer'
{
CreateLoadBalancer -> Maybe Text
healthCheckPath :: Prelude.Maybe Prelude.Text,
CreateLoadBalancer -> Maybe Text
certificateName :: Prelude.Maybe Prelude.Text,
CreateLoadBalancer -> Maybe Text
certificateDomainName :: Prelude.Maybe Prelude.Text,
CreateLoadBalancer -> Maybe [Text]
certificateAlternativeNames :: Prelude.Maybe [Prelude.Text],
CreateLoadBalancer -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CreateLoadBalancer -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateLoadBalancer -> Text
loadBalancerName :: Prelude.Text,
CreateLoadBalancer -> Int
instancePort :: Prelude.Int
}
deriving (CreateLoadBalancer -> CreateLoadBalancer -> Bool
(CreateLoadBalancer -> CreateLoadBalancer -> Bool)
-> (CreateLoadBalancer -> CreateLoadBalancer -> Bool)
-> Eq CreateLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
$c/= :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
== :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
$c== :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancer]
ReadPrec CreateLoadBalancer
Int -> ReadS CreateLoadBalancer
ReadS [CreateLoadBalancer]
(Int -> ReadS CreateLoadBalancer)
-> ReadS [CreateLoadBalancer]
-> ReadPrec CreateLoadBalancer
-> ReadPrec [CreateLoadBalancer]
-> Read CreateLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancer]
$creadListPrec :: ReadPrec [CreateLoadBalancer]
readPrec :: ReadPrec CreateLoadBalancer
$creadPrec :: ReadPrec CreateLoadBalancer
readList :: ReadS [CreateLoadBalancer]
$creadList :: ReadS [CreateLoadBalancer]
readsPrec :: Int -> ReadS CreateLoadBalancer
$creadsPrec :: Int -> ReadS CreateLoadBalancer
Prelude.Read, Int -> CreateLoadBalancer -> ShowS
[CreateLoadBalancer] -> ShowS
CreateLoadBalancer -> String
(Int -> CreateLoadBalancer -> ShowS)
-> (CreateLoadBalancer -> String)
-> ([CreateLoadBalancer] -> ShowS)
-> Show CreateLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancer] -> ShowS
$cshowList :: [CreateLoadBalancer] -> ShowS
show :: CreateLoadBalancer -> String
$cshow :: CreateLoadBalancer -> String
showsPrec :: Int -> CreateLoadBalancer -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancer -> ShowS
Prelude.Show, (forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x)
-> (forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer)
-> Generic CreateLoadBalancer
forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer
forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer
$cfrom :: forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x
Prelude.Generic)
newCreateLoadBalancer ::
Prelude.Text ->
Prelude.Int ->
CreateLoadBalancer
newCreateLoadBalancer :: Text -> Int -> CreateLoadBalancer
newCreateLoadBalancer
Text
pLoadBalancerName_
Int
pInstancePort_ =
CreateLoadBalancer' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe IpAddressType
-> Maybe [Tag]
-> Text
-> Int
-> CreateLoadBalancer
CreateLoadBalancer'
{ $sel:healthCheckPath:CreateLoadBalancer' :: Maybe Text
healthCheckPath =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateName:CreateLoadBalancer' :: Maybe Text
certificateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateDomainName:CreateLoadBalancer' :: Maybe Text
certificateDomainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateAlternativeNames:CreateLoadBalancer' :: Maybe [Text]
certificateAlternativeNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:CreateLoadBalancer' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateLoadBalancer' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:loadBalancerName:CreateLoadBalancer' :: Text
loadBalancerName = Text
pLoadBalancerName_,
$sel:instancePort:CreateLoadBalancer' :: Int
instancePort = Int
pInstancePort_
}
createLoadBalancer_healthCheckPath :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe Prelude.Text)
createLoadBalancer_healthCheckPath :: (Maybe Text -> f (Maybe Text))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_healthCheckPath = (CreateLoadBalancer -> Maybe Text)
-> (CreateLoadBalancer -> Maybe Text -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe Text
healthCheckPath :: Maybe Text
$sel:healthCheckPath:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
healthCheckPath} -> Maybe Text
healthCheckPath) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe Text
a -> CreateLoadBalancer
s {$sel:healthCheckPath:CreateLoadBalancer' :: Maybe Text
healthCheckPath = Maybe Text
a} :: CreateLoadBalancer)
createLoadBalancer_certificateName :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe Prelude.Text)
createLoadBalancer_certificateName :: (Maybe Text -> f (Maybe Text))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_certificateName = (CreateLoadBalancer -> Maybe Text)
-> (CreateLoadBalancer -> Maybe Text -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe Text
certificateName :: Maybe Text
$sel:certificateName:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
certificateName} -> Maybe Text
certificateName) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe Text
a -> CreateLoadBalancer
s {$sel:certificateName:CreateLoadBalancer' :: Maybe Text
certificateName = Maybe Text
a} :: CreateLoadBalancer)
createLoadBalancer_certificateDomainName :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe Prelude.Text)
createLoadBalancer_certificateDomainName :: (Maybe Text -> f (Maybe Text))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_certificateDomainName = (CreateLoadBalancer -> Maybe Text)
-> (CreateLoadBalancer -> Maybe Text -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe Text
certificateDomainName :: Maybe Text
$sel:certificateDomainName:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
certificateDomainName} -> Maybe Text
certificateDomainName) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe Text
a -> CreateLoadBalancer
s {$sel:certificateDomainName:CreateLoadBalancer' :: Maybe Text
certificateDomainName = Maybe Text
a} :: CreateLoadBalancer)
createLoadBalancer_certificateAlternativeNames :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe [Prelude.Text])
createLoadBalancer_certificateAlternativeNames :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_certificateAlternativeNames = (CreateLoadBalancer -> Maybe [Text])
-> (CreateLoadBalancer -> Maybe [Text] -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe [Text]
certificateAlternativeNames :: Maybe [Text]
$sel:certificateAlternativeNames:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
certificateAlternativeNames} -> Maybe [Text]
certificateAlternativeNames) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe [Text]
a -> CreateLoadBalancer
s {$sel:certificateAlternativeNames:CreateLoadBalancer' :: Maybe [Text]
certificateAlternativeNames = Maybe [Text]
a} :: CreateLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer
-> f CreateLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLoadBalancer_ipAddressType :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe IpAddressType)
createLoadBalancer_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_ipAddressType = (CreateLoadBalancer -> Maybe IpAddressType)
-> (CreateLoadBalancer
-> Maybe IpAddressType -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer
CreateLoadBalancer
(Maybe IpAddressType)
(Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe IpAddressType
a -> CreateLoadBalancer
s {$sel:ipAddressType:CreateLoadBalancer' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CreateLoadBalancer)
createLoadBalancer_tags :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe [Tag])
createLoadBalancer_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_tags = (CreateLoadBalancer -> Maybe [Tag])
-> (CreateLoadBalancer -> Maybe [Tag] -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe [Tag]
a -> CreateLoadBalancer
s {$sel:tags:CreateLoadBalancer' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateLoadBalancer) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateLoadBalancer
-> f CreateLoadBalancer
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
createLoadBalancer_loadBalancerName :: Lens.Lens' CreateLoadBalancer Prelude.Text
createLoadBalancer_loadBalancerName :: (Text -> f Text) -> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_loadBalancerName = (CreateLoadBalancer -> Text)
-> (CreateLoadBalancer -> Text -> CreateLoadBalancer)
-> Lens CreateLoadBalancer CreateLoadBalancer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Text
loadBalancerName :: Text
$sel:loadBalancerName:CreateLoadBalancer' :: CreateLoadBalancer -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Text
a -> CreateLoadBalancer
s {$sel:loadBalancerName:CreateLoadBalancer' :: Text
loadBalancerName = Text
a} :: CreateLoadBalancer)
createLoadBalancer_instancePort :: Lens.Lens' CreateLoadBalancer Prelude.Int
createLoadBalancer_instancePort :: (Int -> f Int) -> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_instancePort = (CreateLoadBalancer -> Int)
-> (CreateLoadBalancer -> Int -> CreateLoadBalancer)
-> Lens CreateLoadBalancer CreateLoadBalancer Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Int
instancePort :: Int
$sel:instancePort:CreateLoadBalancer' :: CreateLoadBalancer -> Int
instancePort} -> Int
instancePort) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Int
a -> CreateLoadBalancer
s {$sel:instancePort:CreateLoadBalancer' :: Int
instancePort = Int
a} :: CreateLoadBalancer)
instance Core.AWSRequest CreateLoadBalancer where
type
AWSResponse CreateLoadBalancer =
CreateLoadBalancerResponse
request :: CreateLoadBalancer -> Request CreateLoadBalancer
request = Service -> CreateLoadBalancer -> Request CreateLoadBalancer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLoadBalancer)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateLoadBalancer))
-> Logger
-> Service
-> Proxy CreateLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLoadBalancer)))
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 -> CreateLoadBalancerResponse
CreateLoadBalancerResponse'
(Maybe [Operation] -> Int -> CreateLoadBalancerResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> CreateLoadBalancerResponse)
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 -> CreateLoadBalancerResponse)
-> Either String Int -> Either String CreateLoadBalancerResponse
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 CreateLoadBalancer
instance Prelude.NFData CreateLoadBalancer
instance Core.ToHeaders CreateLoadBalancer where
toHeaders :: CreateLoadBalancer -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateLoadBalancer -> 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.CreateLoadBalancer" ::
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 CreateLoadBalancer where
toJSON :: CreateLoadBalancer -> Value
toJSON CreateLoadBalancer' {Int
Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe IpAddressType
Text
instancePort :: Int
loadBalancerName :: Text
tags :: Maybe [Tag]
ipAddressType :: Maybe IpAddressType
certificateAlternativeNames :: Maybe [Text]
certificateDomainName :: Maybe Text
certificateName :: Maybe Text
healthCheckPath :: Maybe Text
$sel:instancePort:CreateLoadBalancer' :: CreateLoadBalancer -> Int
$sel:loadBalancerName:CreateLoadBalancer' :: CreateLoadBalancer -> Text
$sel:tags:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Tag]
$sel:ipAddressType:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe IpAddressType
$sel:certificateAlternativeNames:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
$sel:certificateDomainName:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
$sel:certificateName:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
$sel:healthCheckPath:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"healthCheckPath" 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
healthCheckPath,
(Text
"certificateName" 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
certificateName,
(Text
"certificateDomainName" 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
certificateDomainName,
(Text
"certificateAlternativeNames" 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]
certificateAlternativeNames,
(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
"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
"loadBalancerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
loadBalancerName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"instancePort" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
instancePort)
]
)
instance Core.ToPath CreateLoadBalancer where
toPath :: CreateLoadBalancer -> ByteString
toPath = ByteString -> CreateLoadBalancer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateLoadBalancer where
toQuery :: CreateLoadBalancer -> QueryString
toQuery = QueryString -> CreateLoadBalancer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateLoadBalancerResponse = CreateLoadBalancerResponse'
{
CreateLoadBalancerResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
CreateLoadBalancerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
(CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool)
-> (CreateLoadBalancerResponse
-> CreateLoadBalancerResponse -> Bool)
-> Eq CreateLoadBalancerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
$c/= :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
== :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
$c== :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancerResponse]
ReadPrec CreateLoadBalancerResponse
Int -> ReadS CreateLoadBalancerResponse
ReadS [CreateLoadBalancerResponse]
(Int -> ReadS CreateLoadBalancerResponse)
-> ReadS [CreateLoadBalancerResponse]
-> ReadPrec CreateLoadBalancerResponse
-> ReadPrec [CreateLoadBalancerResponse]
-> Read CreateLoadBalancerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancerResponse]
$creadListPrec :: ReadPrec [CreateLoadBalancerResponse]
readPrec :: ReadPrec CreateLoadBalancerResponse
$creadPrec :: ReadPrec CreateLoadBalancerResponse
readList :: ReadS [CreateLoadBalancerResponse]
$creadList :: ReadS [CreateLoadBalancerResponse]
readsPrec :: Int -> ReadS CreateLoadBalancerResponse
$creadsPrec :: Int -> ReadS CreateLoadBalancerResponse
Prelude.Read, Int -> CreateLoadBalancerResponse -> ShowS
[CreateLoadBalancerResponse] -> ShowS
CreateLoadBalancerResponse -> String
(Int -> CreateLoadBalancerResponse -> ShowS)
-> (CreateLoadBalancerResponse -> String)
-> ([CreateLoadBalancerResponse] -> ShowS)
-> Show CreateLoadBalancerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancerResponse] -> ShowS
$cshowList :: [CreateLoadBalancerResponse] -> ShowS
show :: CreateLoadBalancerResponse -> String
$cshow :: CreateLoadBalancerResponse -> String
showsPrec :: Int -> CreateLoadBalancerResponse -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancerResponse -> ShowS
Prelude.Show, (forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x)
-> (forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse)
-> Generic CreateLoadBalancerResponse
forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse
forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse
$cfrom :: forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x
Prelude.Generic)
newCreateLoadBalancerResponse ::
Prelude.Int ->
CreateLoadBalancerResponse
newCreateLoadBalancerResponse :: Int -> CreateLoadBalancerResponse
newCreateLoadBalancerResponse Int
pHttpStatus_ =
CreateLoadBalancerResponse' :: Maybe [Operation] -> Int -> CreateLoadBalancerResponse
CreateLoadBalancerResponse'
{ $sel:operations:CreateLoadBalancerResponse' :: Maybe [Operation]
operations =
Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateLoadBalancerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createLoadBalancerResponse_operations :: Lens.Lens' CreateLoadBalancerResponse (Prelude.Maybe [Operation])
createLoadBalancerResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateLoadBalancerResponse -> f CreateLoadBalancerResponse
createLoadBalancerResponse_operations = (CreateLoadBalancerResponse -> Maybe [Operation])
-> (CreateLoadBalancerResponse
-> Maybe [Operation] -> CreateLoadBalancerResponse)
-> Lens
CreateLoadBalancerResponse
CreateLoadBalancerResponse
(Maybe [Operation])
(Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:CreateLoadBalancerResponse' :: CreateLoadBalancerResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: CreateLoadBalancerResponse
s@CreateLoadBalancerResponse' {} Maybe [Operation]
a -> CreateLoadBalancerResponse
s {$sel:operations:CreateLoadBalancerResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: CreateLoadBalancerResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
-> CreateLoadBalancerResponse -> f CreateLoadBalancerResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
-> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateLoadBalancerResponse
-> f CreateLoadBalancerResponse
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
createLoadBalancerResponse_httpStatus :: Lens.Lens' CreateLoadBalancerResponse Prelude.Int
createLoadBalancerResponse_httpStatus :: (Int -> f Int)
-> CreateLoadBalancerResponse -> f CreateLoadBalancerResponse
createLoadBalancerResponse_httpStatus = (CreateLoadBalancerResponse -> Int)
-> (CreateLoadBalancerResponse
-> Int -> CreateLoadBalancerResponse)
-> Lens
CreateLoadBalancerResponse CreateLoadBalancerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateLoadBalancerResponse' :: CreateLoadBalancerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateLoadBalancerResponse
s@CreateLoadBalancerResponse' {} Int
a -> CreateLoadBalancerResponse
s {$sel:httpStatus:CreateLoadBalancerResponse' :: Int
httpStatus = Int
a} :: CreateLoadBalancerResponse)
instance Prelude.NFData CreateLoadBalancerResponse