{-# 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.AppRunner.CreateService
(
CreateService (..),
newCreateService,
createService_autoScalingConfigurationArn,
createService_encryptionConfiguration,
createService_healthCheckConfiguration,
createService_instanceConfiguration,
createService_networkConfiguration,
createService_observabilityConfiguration,
createService_tags,
createService_serviceName,
createService_sourceConfiguration,
CreateServiceResponse (..),
newCreateServiceResponse,
createServiceResponse_httpStatus,
createServiceResponse_service,
createServiceResponse_operationId,
)
where
import Amazonka.AppRunner.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateService = CreateService'
{
CreateService -> Maybe Text
autoScalingConfigurationArn :: Prelude.Maybe Prelude.Text,
CreateService -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
CreateService -> Maybe HealthCheckConfiguration
healthCheckConfiguration :: Prelude.Maybe HealthCheckConfiguration,
CreateService -> Maybe InstanceConfiguration
instanceConfiguration :: Prelude.Maybe InstanceConfiguration,
CreateService -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
CreateService -> Maybe ServiceObservabilityConfiguration
observabilityConfiguration :: Prelude.Maybe ServiceObservabilityConfiguration,
CreateService -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateService -> Text
serviceName :: Prelude.Text,
CreateService -> SourceConfiguration
sourceConfiguration :: SourceConfiguration
}
deriving (CreateService -> CreateService -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateService -> CreateService -> Bool
$c/= :: CreateService -> CreateService -> Bool
== :: CreateService -> CreateService -> Bool
$c== :: CreateService -> CreateService -> Bool
Prelude.Eq, Int -> CreateService -> ShowS
[CreateService] -> ShowS
CreateService -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateService] -> ShowS
$cshowList :: [CreateService] -> ShowS
show :: CreateService -> String
$cshow :: CreateService -> String
showsPrec :: Int -> CreateService -> ShowS
$cshowsPrec :: Int -> CreateService -> ShowS
Prelude.Show, forall x. Rep CreateService x -> CreateService
forall x. CreateService -> Rep CreateService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateService x -> CreateService
$cfrom :: forall x. CreateService -> Rep CreateService x
Prelude.Generic)
newCreateService ::
Prelude.Text ->
SourceConfiguration ->
CreateService
newCreateService :: Text -> SourceConfiguration -> CreateService
newCreateService Text
pServiceName_ SourceConfiguration
pSourceConfiguration_ =
CreateService'
{ $sel:autoScalingConfigurationArn:CreateService' :: Maybe Text
autoScalingConfigurationArn =
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfiguration:CreateService' :: Maybe EncryptionConfiguration
encryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckConfiguration:CreateService' :: Maybe HealthCheckConfiguration
healthCheckConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:instanceConfiguration:CreateService' :: Maybe InstanceConfiguration
instanceConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:networkConfiguration:CreateService' :: Maybe NetworkConfiguration
networkConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:observabilityConfiguration:CreateService' :: Maybe ServiceObservabilityConfiguration
observabilityConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateService' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:CreateService' :: Text
serviceName = Text
pServiceName_,
$sel:sourceConfiguration:CreateService' :: SourceConfiguration
sourceConfiguration = SourceConfiguration
pSourceConfiguration_
}
createService_autoScalingConfigurationArn :: Lens.Lens' CreateService (Prelude.Maybe Prelude.Text)
createService_autoScalingConfigurationArn :: Lens' CreateService (Maybe Text)
createService_autoScalingConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe Text
autoScalingConfigurationArn :: Maybe Text
$sel:autoScalingConfigurationArn:CreateService' :: CreateService -> Maybe Text
autoScalingConfigurationArn} -> Maybe Text
autoScalingConfigurationArn) (\s :: CreateService
s@CreateService' {} Maybe Text
a -> CreateService
s {$sel:autoScalingConfigurationArn:CreateService' :: Maybe Text
autoScalingConfigurationArn = Maybe Text
a} :: CreateService)
createService_encryptionConfiguration :: Lens.Lens' CreateService (Prelude.Maybe EncryptionConfiguration)
createService_encryptionConfiguration :: Lens' CreateService (Maybe EncryptionConfiguration)
createService_encryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:CreateService' :: CreateService -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: CreateService
s@CreateService' {} Maybe EncryptionConfiguration
a -> CreateService
s {$sel:encryptionConfiguration:CreateService' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: CreateService)
createService_healthCheckConfiguration :: Lens.Lens' CreateService (Prelude.Maybe HealthCheckConfiguration)
createService_healthCheckConfiguration :: Lens' CreateService (Maybe HealthCheckConfiguration)
createService_healthCheckConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe HealthCheckConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
$sel:healthCheckConfiguration:CreateService' :: CreateService -> Maybe HealthCheckConfiguration
healthCheckConfiguration} -> Maybe HealthCheckConfiguration
healthCheckConfiguration) (\s :: CreateService
s@CreateService' {} Maybe HealthCheckConfiguration
a -> CreateService
s {$sel:healthCheckConfiguration:CreateService' :: Maybe HealthCheckConfiguration
healthCheckConfiguration = Maybe HealthCheckConfiguration
a} :: CreateService)
createService_instanceConfiguration :: Lens.Lens' CreateService (Prelude.Maybe InstanceConfiguration)
createService_instanceConfiguration :: Lens' CreateService (Maybe InstanceConfiguration)
createService_instanceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe InstanceConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
$sel:instanceConfiguration:CreateService' :: CreateService -> Maybe InstanceConfiguration
instanceConfiguration} -> Maybe InstanceConfiguration
instanceConfiguration) (\s :: CreateService
s@CreateService' {} Maybe InstanceConfiguration
a -> CreateService
s {$sel:instanceConfiguration:CreateService' :: Maybe InstanceConfiguration
instanceConfiguration = Maybe InstanceConfiguration
a} :: CreateService)
createService_networkConfiguration :: Lens.Lens' CreateService (Prelude.Maybe NetworkConfiguration)
createService_networkConfiguration :: Lens' CreateService (Maybe NetworkConfiguration)
createService_networkConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:CreateService' :: CreateService -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: CreateService
s@CreateService' {} Maybe NetworkConfiguration
a -> CreateService
s {$sel:networkConfiguration:CreateService' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: CreateService)
createService_observabilityConfiguration :: Lens.Lens' CreateService (Prelude.Maybe ServiceObservabilityConfiguration)
createService_observabilityConfiguration :: Lens' CreateService (Maybe ServiceObservabilityConfiguration)
createService_observabilityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe ServiceObservabilityConfiguration
observabilityConfiguration :: Maybe ServiceObservabilityConfiguration
$sel:observabilityConfiguration:CreateService' :: CreateService -> Maybe ServiceObservabilityConfiguration
observabilityConfiguration} -> Maybe ServiceObservabilityConfiguration
observabilityConfiguration) (\s :: CreateService
s@CreateService' {} Maybe ServiceObservabilityConfiguration
a -> CreateService
s {$sel:observabilityConfiguration:CreateService' :: Maybe ServiceObservabilityConfiguration
observabilityConfiguration = Maybe ServiceObservabilityConfiguration
a} :: CreateService)
createService_tags :: Lens.Lens' CreateService (Prelude.Maybe [Tag])
createService_tags :: Lens' CreateService (Maybe [Tag])
createService_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateService' :: CreateService -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateService
s@CreateService' {} Maybe [Tag]
a -> CreateService
s {$sel:tags:CreateService' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateService) 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
createService_serviceName :: Lens.Lens' CreateService Prelude.Text
createService_serviceName :: Lens' CreateService Text
createService_serviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {Text
serviceName :: Text
$sel:serviceName:CreateService' :: CreateService -> Text
serviceName} -> Text
serviceName) (\s :: CreateService
s@CreateService' {} Text
a -> CreateService
s {$sel:serviceName:CreateService' :: Text
serviceName = Text
a} :: CreateService)
createService_sourceConfiguration :: Lens.Lens' CreateService SourceConfiguration
createService_sourceConfiguration :: Lens' CreateService SourceConfiguration
createService_sourceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateService' {SourceConfiguration
sourceConfiguration :: SourceConfiguration
$sel:sourceConfiguration:CreateService' :: CreateService -> SourceConfiguration
sourceConfiguration} -> SourceConfiguration
sourceConfiguration) (\s :: CreateService
s@CreateService' {} SourceConfiguration
a -> CreateService
s {$sel:sourceConfiguration:CreateService' :: SourceConfiguration
sourceConfiguration = SourceConfiguration
a} :: CreateService)
instance Core.AWSRequest CreateService where
type
AWSResponse CreateService =
CreateServiceResponse
request :: (Service -> Service) -> CreateService -> Request CreateService
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateService
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateService)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Service -> Text -> CreateServiceResponse
CreateServiceResponse'
forall (f :: * -> *) a b. Functor 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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Service")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"OperationId")
)
instance Prelude.Hashable CreateService where
hashWithSalt :: Int -> CreateService -> Int
hashWithSalt Int
_salt CreateService' {Maybe [Tag]
Maybe Text
Maybe EncryptionConfiguration
Maybe HealthCheckConfiguration
Maybe InstanceConfiguration
Maybe NetworkConfiguration
Maybe ServiceObservabilityConfiguration
Text
SourceConfiguration
sourceConfiguration :: SourceConfiguration
serviceName :: Text
tags :: Maybe [Tag]
observabilityConfiguration :: Maybe ServiceObservabilityConfiguration
networkConfiguration :: Maybe NetworkConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
autoScalingConfigurationArn :: Maybe Text
$sel:sourceConfiguration:CreateService' :: CreateService -> SourceConfiguration
$sel:serviceName:CreateService' :: CreateService -> Text
$sel:tags:CreateService' :: CreateService -> Maybe [Tag]
$sel:observabilityConfiguration:CreateService' :: CreateService -> Maybe ServiceObservabilityConfiguration
$sel:networkConfiguration:CreateService' :: CreateService -> Maybe NetworkConfiguration
$sel:instanceConfiguration:CreateService' :: CreateService -> Maybe InstanceConfiguration
$sel:healthCheckConfiguration:CreateService' :: CreateService -> Maybe HealthCheckConfiguration
$sel:encryptionConfiguration:CreateService' :: CreateService -> Maybe EncryptionConfiguration
$sel:autoScalingConfigurationArn:CreateService' :: CreateService -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
autoScalingConfigurationArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncryptionConfiguration
encryptionConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HealthCheckConfiguration
healthCheckConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceConfiguration
instanceConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkConfiguration
networkConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceObservabilityConfiguration
observabilityConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SourceConfiguration
sourceConfiguration
instance Prelude.NFData CreateService where
rnf :: CreateService -> ()
rnf CreateService' {Maybe [Tag]
Maybe Text
Maybe EncryptionConfiguration
Maybe HealthCheckConfiguration
Maybe InstanceConfiguration
Maybe NetworkConfiguration
Maybe ServiceObservabilityConfiguration
Text
SourceConfiguration
sourceConfiguration :: SourceConfiguration
serviceName :: Text
tags :: Maybe [Tag]
observabilityConfiguration :: Maybe ServiceObservabilityConfiguration
networkConfiguration :: Maybe NetworkConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
autoScalingConfigurationArn :: Maybe Text
$sel:sourceConfiguration:CreateService' :: CreateService -> SourceConfiguration
$sel:serviceName:CreateService' :: CreateService -> Text
$sel:tags:CreateService' :: CreateService -> Maybe [Tag]
$sel:observabilityConfiguration:CreateService' :: CreateService -> Maybe ServiceObservabilityConfiguration
$sel:networkConfiguration:CreateService' :: CreateService -> Maybe NetworkConfiguration
$sel:instanceConfiguration:CreateService' :: CreateService -> Maybe InstanceConfiguration
$sel:healthCheckConfiguration:CreateService' :: CreateService -> Maybe HealthCheckConfiguration
$sel:encryptionConfiguration:CreateService' :: CreateService -> Maybe EncryptionConfiguration
$sel:autoScalingConfigurationArn:CreateService' :: CreateService -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
autoScalingConfigurationArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncryptionConfiguration
encryptionConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HealthCheckConfiguration
healthCheckConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceConfiguration
instanceConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkConfiguration
networkConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceObservabilityConfiguration
observabilityConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SourceConfiguration
sourceConfiguration
instance Data.ToHeaders CreateService where
toHeaders :: CreateService -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"AppRunner.CreateService" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateService where
toJSON :: CreateService -> Value
toJSON CreateService' {Maybe [Tag]
Maybe Text
Maybe EncryptionConfiguration
Maybe HealthCheckConfiguration
Maybe InstanceConfiguration
Maybe NetworkConfiguration
Maybe ServiceObservabilityConfiguration
Text
SourceConfiguration
sourceConfiguration :: SourceConfiguration
serviceName :: Text
tags :: Maybe [Tag]
observabilityConfiguration :: Maybe ServiceObservabilityConfiguration
networkConfiguration :: Maybe NetworkConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
autoScalingConfigurationArn :: Maybe Text
$sel:sourceConfiguration:CreateService' :: CreateService -> SourceConfiguration
$sel:serviceName:CreateService' :: CreateService -> Text
$sel:tags:CreateService' :: CreateService -> Maybe [Tag]
$sel:observabilityConfiguration:CreateService' :: CreateService -> Maybe ServiceObservabilityConfiguration
$sel:networkConfiguration:CreateService' :: CreateService -> Maybe NetworkConfiguration
$sel:instanceConfiguration:CreateService' :: CreateService -> Maybe InstanceConfiguration
$sel:healthCheckConfiguration:CreateService' :: CreateService -> Maybe HealthCheckConfiguration
$sel:encryptionConfiguration:CreateService' :: CreateService -> Maybe EncryptionConfiguration
$sel:autoScalingConfigurationArn:CreateService' :: CreateService -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AutoScalingConfigurationArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
autoScalingConfigurationArn,
(Key
"EncryptionConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfiguration
encryptionConfiguration,
(Key
"HealthCheckConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckConfiguration
healthCheckConfiguration,
(Key
"InstanceConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceConfiguration
instanceConfiguration,
(Key
"NetworkConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkConfiguration
networkConfiguration,
(Key
"ObservabilityConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ServiceObservabilityConfiguration
observabilityConfiguration,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"ServiceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceName),
forall a. a -> Maybe a
Prelude.Just
(Key
"SourceConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SourceConfiguration
sourceConfiguration)
]
)
instance Data.ToPath CreateService where
toPath :: CreateService -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateService where
toQuery :: CreateService -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateServiceResponse = CreateServiceResponse'
{
CreateServiceResponse -> Int
httpStatus :: Prelude.Int,
CreateServiceResponse -> Service
service :: Service,
CreateServiceResponse -> Text
operationId :: Prelude.Text
}
deriving (CreateServiceResponse -> CreateServiceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServiceResponse -> CreateServiceResponse -> Bool
$c/= :: CreateServiceResponse -> CreateServiceResponse -> Bool
== :: CreateServiceResponse -> CreateServiceResponse -> Bool
$c== :: CreateServiceResponse -> CreateServiceResponse -> Bool
Prelude.Eq, Int -> CreateServiceResponse -> ShowS
[CreateServiceResponse] -> ShowS
CreateServiceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServiceResponse] -> ShowS
$cshowList :: [CreateServiceResponse] -> ShowS
show :: CreateServiceResponse -> String
$cshow :: CreateServiceResponse -> String
showsPrec :: Int -> CreateServiceResponse -> ShowS
$cshowsPrec :: Int -> CreateServiceResponse -> ShowS
Prelude.Show, forall x. Rep CreateServiceResponse x -> CreateServiceResponse
forall x. CreateServiceResponse -> Rep CreateServiceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServiceResponse x -> CreateServiceResponse
$cfrom :: forall x. CreateServiceResponse -> Rep CreateServiceResponse x
Prelude.Generic)
newCreateServiceResponse ::
Prelude.Int ->
Service ->
Prelude.Text ->
CreateServiceResponse
newCreateServiceResponse :: Int -> Service -> Text -> CreateServiceResponse
newCreateServiceResponse
Int
pHttpStatus_
Service
pService_
Text
pOperationId_ =
CreateServiceResponse'
{ $sel:httpStatus:CreateServiceResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:service:CreateServiceResponse' :: Service
service = Service
pService_,
$sel:operationId:CreateServiceResponse' :: Text
operationId = Text
pOperationId_
}
createServiceResponse_httpStatus :: Lens.Lens' CreateServiceResponse Prelude.Int
createServiceResponse_httpStatus :: Lens' CreateServiceResponse Int
createServiceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateServiceResponse' :: CreateServiceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateServiceResponse
s@CreateServiceResponse' {} Int
a -> CreateServiceResponse
s {$sel:httpStatus:CreateServiceResponse' :: Int
httpStatus = Int
a} :: CreateServiceResponse)
createServiceResponse_service :: Lens.Lens' CreateServiceResponse Service
createServiceResponse_service :: Lens' CreateServiceResponse Service
createServiceResponse_service = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceResponse' {Service
service :: Service
$sel:service:CreateServiceResponse' :: CreateServiceResponse -> Service
service} -> Service
service) (\s :: CreateServiceResponse
s@CreateServiceResponse' {} Service
a -> CreateServiceResponse
s {$sel:service:CreateServiceResponse' :: Service
service = Service
a} :: CreateServiceResponse)
createServiceResponse_operationId :: Lens.Lens' CreateServiceResponse Prelude.Text
createServiceResponse_operationId :: Lens' CreateServiceResponse Text
createServiceResponse_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceResponse' {Text
operationId :: Text
$sel:operationId:CreateServiceResponse' :: CreateServiceResponse -> Text
operationId} -> Text
operationId) (\s :: CreateServiceResponse
s@CreateServiceResponse' {} Text
a -> CreateServiceResponse
s {$sel:operationId:CreateServiceResponse' :: Text
operationId = Text
a} :: CreateServiceResponse)
instance Prelude.NFData CreateServiceResponse where
rnf :: CreateServiceResponse -> ()
rnf CreateServiceResponse' {Int
Text
Service
operationId :: Text
service :: Service
httpStatus :: Int
$sel:operationId:CreateServiceResponse' :: CreateServiceResponse -> Text
$sel:service:CreateServiceResponse' :: CreateServiceResponse -> Service
$sel:httpStatus:CreateServiceResponse' :: CreateServiceResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Service
service
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
operationId