{-# 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.AppMesh.CreateVirtualService
(
CreateVirtualService (..),
newCreateVirtualService,
createVirtualService_clientToken,
createVirtualService_meshOwner,
createVirtualService_tags,
createVirtualService_meshName,
createVirtualService_spec,
createVirtualService_virtualServiceName,
CreateVirtualServiceResponse (..),
newCreateVirtualServiceResponse,
createVirtualServiceResponse_httpStatus,
createVirtualServiceResponse_virtualService,
)
where
import Amazonka.AppMesh.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateVirtualService = CreateVirtualService'
{
CreateVirtualService -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateVirtualService -> Maybe Text
meshOwner :: Prelude.Maybe Prelude.Text,
CreateVirtualService -> Maybe [TagRef]
tags :: Prelude.Maybe [TagRef],
CreateVirtualService -> Text
meshName :: Prelude.Text,
CreateVirtualService -> VirtualServiceSpec
spec :: VirtualServiceSpec,
CreateVirtualService -> Text
virtualServiceName :: Prelude.Text
}
deriving (CreateVirtualService -> CreateVirtualService -> Bool
(CreateVirtualService -> CreateVirtualService -> Bool)
-> (CreateVirtualService -> CreateVirtualService -> Bool)
-> Eq CreateVirtualService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVirtualService -> CreateVirtualService -> Bool
$c/= :: CreateVirtualService -> CreateVirtualService -> Bool
== :: CreateVirtualService -> CreateVirtualService -> Bool
$c== :: CreateVirtualService -> CreateVirtualService -> Bool
Prelude.Eq, ReadPrec [CreateVirtualService]
ReadPrec CreateVirtualService
Int -> ReadS CreateVirtualService
ReadS [CreateVirtualService]
(Int -> ReadS CreateVirtualService)
-> ReadS [CreateVirtualService]
-> ReadPrec CreateVirtualService
-> ReadPrec [CreateVirtualService]
-> Read CreateVirtualService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVirtualService]
$creadListPrec :: ReadPrec [CreateVirtualService]
readPrec :: ReadPrec CreateVirtualService
$creadPrec :: ReadPrec CreateVirtualService
readList :: ReadS [CreateVirtualService]
$creadList :: ReadS [CreateVirtualService]
readsPrec :: Int -> ReadS CreateVirtualService
$creadsPrec :: Int -> ReadS CreateVirtualService
Prelude.Read, Int -> CreateVirtualService -> ShowS
[CreateVirtualService] -> ShowS
CreateVirtualService -> String
(Int -> CreateVirtualService -> ShowS)
-> (CreateVirtualService -> String)
-> ([CreateVirtualService] -> ShowS)
-> Show CreateVirtualService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVirtualService] -> ShowS
$cshowList :: [CreateVirtualService] -> ShowS
show :: CreateVirtualService -> String
$cshow :: CreateVirtualService -> String
showsPrec :: Int -> CreateVirtualService -> ShowS
$cshowsPrec :: Int -> CreateVirtualService -> ShowS
Prelude.Show, (forall x. CreateVirtualService -> Rep CreateVirtualService x)
-> (forall x. Rep CreateVirtualService x -> CreateVirtualService)
-> Generic CreateVirtualService
forall x. Rep CreateVirtualService x -> CreateVirtualService
forall x. CreateVirtualService -> Rep CreateVirtualService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVirtualService x -> CreateVirtualService
$cfrom :: forall x. CreateVirtualService -> Rep CreateVirtualService x
Prelude.Generic)
newCreateVirtualService ::
Prelude.Text ->
VirtualServiceSpec ->
Prelude.Text ->
CreateVirtualService
newCreateVirtualService :: Text -> VirtualServiceSpec -> Text -> CreateVirtualService
newCreateVirtualService
Text
pMeshName_
VirtualServiceSpec
pSpec_
Text
pVirtualServiceName_ =
CreateVirtualService' :: Maybe Text
-> Maybe Text
-> Maybe [TagRef]
-> Text
-> VirtualServiceSpec
-> Text
-> CreateVirtualService
CreateVirtualService'
{ $sel:clientToken:CreateVirtualService' :: Maybe Text
clientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:meshOwner:CreateVirtualService' :: Maybe Text
meshOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateVirtualService' :: Maybe [TagRef]
tags = Maybe [TagRef]
forall a. Maybe a
Prelude.Nothing,
$sel:meshName:CreateVirtualService' :: Text
meshName = Text
pMeshName_,
$sel:spec:CreateVirtualService' :: VirtualServiceSpec
spec = VirtualServiceSpec
pSpec_,
$sel:virtualServiceName:CreateVirtualService' :: Text
virtualServiceName = Text
pVirtualServiceName_
}
createVirtualService_clientToken :: Lens.Lens' CreateVirtualService (Prelude.Maybe Prelude.Text)
createVirtualService_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateVirtualService -> f CreateVirtualService
createVirtualService_clientToken = (CreateVirtualService -> Maybe Text)
-> (CreateVirtualService -> Maybe Text -> CreateVirtualService)
-> Lens
CreateVirtualService CreateVirtualService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateVirtualService' :: CreateVirtualService -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateVirtualService
s@CreateVirtualService' {} Maybe Text
a -> CreateVirtualService
s {$sel:clientToken:CreateVirtualService' :: Maybe Text
clientToken = Maybe Text
a} :: CreateVirtualService)
createVirtualService_meshOwner :: Lens.Lens' CreateVirtualService (Prelude.Maybe Prelude.Text)
createVirtualService_meshOwner :: (Maybe Text -> f (Maybe Text))
-> CreateVirtualService -> f CreateVirtualService
createVirtualService_meshOwner = (CreateVirtualService -> Maybe Text)
-> (CreateVirtualService -> Maybe Text -> CreateVirtualService)
-> Lens
CreateVirtualService CreateVirtualService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {Maybe Text
meshOwner :: Maybe Text
$sel:meshOwner:CreateVirtualService' :: CreateVirtualService -> Maybe Text
meshOwner} -> Maybe Text
meshOwner) (\s :: CreateVirtualService
s@CreateVirtualService' {} Maybe Text
a -> CreateVirtualService
s {$sel:meshOwner:CreateVirtualService' :: Maybe Text
meshOwner = Maybe Text
a} :: CreateVirtualService)
createVirtualService_tags :: Lens.Lens' CreateVirtualService (Prelude.Maybe [TagRef])
createVirtualService_tags :: (Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateVirtualService -> f CreateVirtualService
createVirtualService_tags = (CreateVirtualService -> Maybe [TagRef])
-> (CreateVirtualService -> Maybe [TagRef] -> CreateVirtualService)
-> Lens
CreateVirtualService
CreateVirtualService
(Maybe [TagRef])
(Maybe [TagRef])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {Maybe [TagRef]
tags :: Maybe [TagRef]
$sel:tags:CreateVirtualService' :: CreateVirtualService -> Maybe [TagRef]
tags} -> Maybe [TagRef]
tags) (\s :: CreateVirtualService
s@CreateVirtualService' {} Maybe [TagRef]
a -> CreateVirtualService
s {$sel:tags:CreateVirtualService' :: Maybe [TagRef]
tags = Maybe [TagRef]
a} :: CreateVirtualService) ((Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateVirtualService -> f CreateVirtualService)
-> ((Maybe [TagRef] -> f (Maybe [TagRef]))
-> Maybe [TagRef] -> f (Maybe [TagRef]))
-> (Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateVirtualService
-> f CreateVirtualService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TagRef] [TagRef] [TagRef] [TagRef]
-> Iso
(Maybe [TagRef]) (Maybe [TagRef]) (Maybe [TagRef]) (Maybe [TagRef])
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 [TagRef] [TagRef] [TagRef] [TagRef]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createVirtualService_meshName :: Lens.Lens' CreateVirtualService Prelude.Text
createVirtualService_meshName :: (Text -> f Text) -> CreateVirtualService -> f CreateVirtualService
createVirtualService_meshName = (CreateVirtualService -> Text)
-> (CreateVirtualService -> Text -> CreateVirtualService)
-> Lens CreateVirtualService CreateVirtualService Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {Text
meshName :: Text
$sel:meshName:CreateVirtualService' :: CreateVirtualService -> Text
meshName} -> Text
meshName) (\s :: CreateVirtualService
s@CreateVirtualService' {} Text
a -> CreateVirtualService
s {$sel:meshName:CreateVirtualService' :: Text
meshName = Text
a} :: CreateVirtualService)
createVirtualService_spec :: Lens.Lens' CreateVirtualService VirtualServiceSpec
createVirtualService_spec :: (VirtualServiceSpec -> f VirtualServiceSpec)
-> CreateVirtualService -> f CreateVirtualService
createVirtualService_spec = (CreateVirtualService -> VirtualServiceSpec)
-> (CreateVirtualService
-> VirtualServiceSpec -> CreateVirtualService)
-> Lens
CreateVirtualService
CreateVirtualService
VirtualServiceSpec
VirtualServiceSpec
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {VirtualServiceSpec
spec :: VirtualServiceSpec
$sel:spec:CreateVirtualService' :: CreateVirtualService -> VirtualServiceSpec
spec} -> VirtualServiceSpec
spec) (\s :: CreateVirtualService
s@CreateVirtualService' {} VirtualServiceSpec
a -> CreateVirtualService
s {$sel:spec:CreateVirtualService' :: VirtualServiceSpec
spec = VirtualServiceSpec
a} :: CreateVirtualService)
createVirtualService_virtualServiceName :: Lens.Lens' CreateVirtualService Prelude.Text
createVirtualService_virtualServiceName :: (Text -> f Text) -> CreateVirtualService -> f CreateVirtualService
createVirtualService_virtualServiceName = (CreateVirtualService -> Text)
-> (CreateVirtualService -> Text -> CreateVirtualService)
-> Lens CreateVirtualService CreateVirtualService Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualService' {Text
virtualServiceName :: Text
$sel:virtualServiceName:CreateVirtualService' :: CreateVirtualService -> Text
virtualServiceName} -> Text
virtualServiceName) (\s :: CreateVirtualService
s@CreateVirtualService' {} Text
a -> CreateVirtualService
s {$sel:virtualServiceName:CreateVirtualService' :: Text
virtualServiceName = Text
a} :: CreateVirtualService)
instance Core.AWSRequest CreateVirtualService where
type
AWSResponse CreateVirtualService =
CreateVirtualServiceResponse
request :: CreateVirtualService -> Request CreateVirtualService
request = Service -> CreateVirtualService -> Request CreateVirtualService
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateVirtualService
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateVirtualService)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateVirtualService))
-> Logger
-> Service
-> Proxy CreateVirtualService
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateVirtualService)))
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 ->
Int -> VirtualServiceData -> CreateVirtualServiceResponse
CreateVirtualServiceResponse'
(Int -> VirtualServiceData -> CreateVirtualServiceResponse)
-> Either String Int
-> Either
String (VirtualServiceData -> CreateVirtualServiceResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (VirtualServiceData -> CreateVirtualServiceResponse)
-> Either String VirtualServiceData
-> Either String CreateVirtualServiceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String VirtualServiceData
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance Prelude.Hashable CreateVirtualService
instance Prelude.NFData CreateVirtualService
instance Core.ToHeaders CreateVirtualService where
toHeaders :: CreateVirtualService -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateVirtualService -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 CreateVirtualService where
toJSON :: CreateVirtualService -> Value
toJSON CreateVirtualService' {Maybe [TagRef]
Maybe Text
Text
VirtualServiceSpec
virtualServiceName :: Text
spec :: VirtualServiceSpec
meshName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualServiceName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:spec:CreateVirtualService' :: CreateVirtualService -> VirtualServiceSpec
$sel:meshName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:tags:CreateVirtualService' :: CreateVirtualService -> Maybe [TagRef]
$sel:meshOwner:CreateVirtualService' :: CreateVirtualService -> Maybe Text
$sel:clientToken:CreateVirtualService' :: CreateVirtualService -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"clientToken" 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
clientToken,
(Text
"tags" Text -> [TagRef] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([TagRef] -> Pair) -> Maybe [TagRef] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagRef]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"spec" Text -> VirtualServiceSpec -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VirtualServiceSpec
spec),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"virtualServiceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
virtualServiceName)
]
)
instance Core.ToPath CreateVirtualService where
toPath :: CreateVirtualService -> ByteString
toPath CreateVirtualService' {Maybe [TagRef]
Maybe Text
Text
VirtualServiceSpec
virtualServiceName :: Text
spec :: VirtualServiceSpec
meshName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualServiceName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:spec:CreateVirtualService' :: CreateVirtualService -> VirtualServiceSpec
$sel:meshName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:tags:CreateVirtualService' :: CreateVirtualService -> Maybe [TagRef]
$sel:meshOwner:CreateVirtualService' :: CreateVirtualService -> Maybe Text
$sel:clientToken:CreateVirtualService' :: CreateVirtualService -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v20190125/meshes/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
meshName,
ByteString
"/virtualServices"
]
instance Core.ToQuery CreateVirtualService where
toQuery :: CreateVirtualService -> QueryString
toQuery CreateVirtualService' {Maybe [TagRef]
Maybe Text
Text
VirtualServiceSpec
virtualServiceName :: Text
spec :: VirtualServiceSpec
meshName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualServiceName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:spec:CreateVirtualService' :: CreateVirtualService -> VirtualServiceSpec
$sel:meshName:CreateVirtualService' :: CreateVirtualService -> Text
$sel:tags:CreateVirtualService' :: CreateVirtualService -> Maybe [TagRef]
$sel:meshOwner:CreateVirtualService' :: CreateVirtualService -> Maybe Text
$sel:clientToken:CreateVirtualService' :: CreateVirtualService -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"meshOwner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
meshOwner]
data CreateVirtualServiceResponse = CreateVirtualServiceResponse'
{
CreateVirtualServiceResponse -> Int
httpStatus :: Prelude.Int,
CreateVirtualServiceResponse -> VirtualServiceData
virtualService :: VirtualServiceData
}
deriving (CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool
(CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool)
-> (CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool)
-> Eq CreateVirtualServiceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool
$c/= :: CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool
== :: CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool
$c== :: CreateVirtualServiceResponse
-> CreateVirtualServiceResponse -> Bool
Prelude.Eq, ReadPrec [CreateVirtualServiceResponse]
ReadPrec CreateVirtualServiceResponse
Int -> ReadS CreateVirtualServiceResponse
ReadS [CreateVirtualServiceResponse]
(Int -> ReadS CreateVirtualServiceResponse)
-> ReadS [CreateVirtualServiceResponse]
-> ReadPrec CreateVirtualServiceResponse
-> ReadPrec [CreateVirtualServiceResponse]
-> Read CreateVirtualServiceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVirtualServiceResponse]
$creadListPrec :: ReadPrec [CreateVirtualServiceResponse]
readPrec :: ReadPrec CreateVirtualServiceResponse
$creadPrec :: ReadPrec CreateVirtualServiceResponse
readList :: ReadS [CreateVirtualServiceResponse]
$creadList :: ReadS [CreateVirtualServiceResponse]
readsPrec :: Int -> ReadS CreateVirtualServiceResponse
$creadsPrec :: Int -> ReadS CreateVirtualServiceResponse
Prelude.Read, Int -> CreateVirtualServiceResponse -> ShowS
[CreateVirtualServiceResponse] -> ShowS
CreateVirtualServiceResponse -> String
(Int -> CreateVirtualServiceResponse -> ShowS)
-> (CreateVirtualServiceResponse -> String)
-> ([CreateVirtualServiceResponse] -> ShowS)
-> Show CreateVirtualServiceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVirtualServiceResponse] -> ShowS
$cshowList :: [CreateVirtualServiceResponse] -> ShowS
show :: CreateVirtualServiceResponse -> String
$cshow :: CreateVirtualServiceResponse -> String
showsPrec :: Int -> CreateVirtualServiceResponse -> ShowS
$cshowsPrec :: Int -> CreateVirtualServiceResponse -> ShowS
Prelude.Show, (forall x.
CreateVirtualServiceResponse -> Rep CreateVirtualServiceResponse x)
-> (forall x.
Rep CreateVirtualServiceResponse x -> CreateVirtualServiceResponse)
-> Generic CreateVirtualServiceResponse
forall x.
Rep CreateVirtualServiceResponse x -> CreateVirtualServiceResponse
forall x.
CreateVirtualServiceResponse -> Rep CreateVirtualServiceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVirtualServiceResponse x -> CreateVirtualServiceResponse
$cfrom :: forall x.
CreateVirtualServiceResponse -> Rep CreateVirtualServiceResponse x
Prelude.Generic)
newCreateVirtualServiceResponse ::
Prelude.Int ->
VirtualServiceData ->
CreateVirtualServiceResponse
newCreateVirtualServiceResponse :: Int -> VirtualServiceData -> CreateVirtualServiceResponse
newCreateVirtualServiceResponse
Int
pHttpStatus_
VirtualServiceData
pVirtualService_ =
CreateVirtualServiceResponse' :: Int -> VirtualServiceData -> CreateVirtualServiceResponse
CreateVirtualServiceResponse'
{ $sel:httpStatus:CreateVirtualServiceResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:virtualService:CreateVirtualServiceResponse' :: VirtualServiceData
virtualService = VirtualServiceData
pVirtualService_
}
createVirtualServiceResponse_httpStatus :: Lens.Lens' CreateVirtualServiceResponse Prelude.Int
createVirtualServiceResponse_httpStatus :: (Int -> f Int)
-> CreateVirtualServiceResponse -> f CreateVirtualServiceResponse
createVirtualServiceResponse_httpStatus = (CreateVirtualServiceResponse -> Int)
-> (CreateVirtualServiceResponse
-> Int -> CreateVirtualServiceResponse)
-> Lens
CreateVirtualServiceResponse CreateVirtualServiceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualServiceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateVirtualServiceResponse' :: CreateVirtualServiceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateVirtualServiceResponse
s@CreateVirtualServiceResponse' {} Int
a -> CreateVirtualServiceResponse
s {$sel:httpStatus:CreateVirtualServiceResponse' :: Int
httpStatus = Int
a} :: CreateVirtualServiceResponse)
createVirtualServiceResponse_virtualService :: Lens.Lens' CreateVirtualServiceResponse VirtualServiceData
createVirtualServiceResponse_virtualService :: (VirtualServiceData -> f VirtualServiceData)
-> CreateVirtualServiceResponse -> f CreateVirtualServiceResponse
createVirtualServiceResponse_virtualService = (CreateVirtualServiceResponse -> VirtualServiceData)
-> (CreateVirtualServiceResponse
-> VirtualServiceData -> CreateVirtualServiceResponse)
-> Lens
CreateVirtualServiceResponse
CreateVirtualServiceResponse
VirtualServiceData
VirtualServiceData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualServiceResponse' {VirtualServiceData
virtualService :: VirtualServiceData
$sel:virtualService:CreateVirtualServiceResponse' :: CreateVirtualServiceResponse -> VirtualServiceData
virtualService} -> VirtualServiceData
virtualService) (\s :: CreateVirtualServiceResponse
s@CreateVirtualServiceResponse' {} VirtualServiceData
a -> CreateVirtualServiceResponse
s {$sel:virtualService:CreateVirtualServiceResponse' :: VirtualServiceData
virtualService = VirtualServiceData
a} :: CreateVirtualServiceResponse)
instance Prelude.NFData CreateVirtualServiceResponse