{-# 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.CreateGatewayRoute
(
CreateGatewayRoute (..),
newCreateGatewayRoute,
createGatewayRoute_clientToken,
createGatewayRoute_meshOwner,
createGatewayRoute_tags,
createGatewayRoute_gatewayRouteName,
createGatewayRoute_meshName,
createGatewayRoute_spec,
createGatewayRoute_virtualGatewayName,
CreateGatewayRouteResponse (..),
newCreateGatewayRouteResponse,
createGatewayRouteResponse_httpStatus,
createGatewayRouteResponse_gatewayRoute,
)
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 CreateGatewayRoute = CreateGatewayRoute'
{
CreateGatewayRoute -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateGatewayRoute -> Maybe Text
meshOwner :: Prelude.Maybe Prelude.Text,
CreateGatewayRoute -> Maybe [TagRef]
tags :: Prelude.Maybe [TagRef],
CreateGatewayRoute -> Text
gatewayRouteName :: Prelude.Text,
CreateGatewayRoute -> Text
meshName :: Prelude.Text,
CreateGatewayRoute -> GatewayRouteSpec
spec :: GatewayRouteSpec,
CreateGatewayRoute -> Text
virtualGatewayName :: Prelude.Text
}
deriving (CreateGatewayRoute -> CreateGatewayRoute -> Bool
(CreateGatewayRoute -> CreateGatewayRoute -> Bool)
-> (CreateGatewayRoute -> CreateGatewayRoute -> Bool)
-> Eq CreateGatewayRoute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGatewayRoute -> CreateGatewayRoute -> Bool
$c/= :: CreateGatewayRoute -> CreateGatewayRoute -> Bool
== :: CreateGatewayRoute -> CreateGatewayRoute -> Bool
$c== :: CreateGatewayRoute -> CreateGatewayRoute -> Bool
Prelude.Eq, ReadPrec [CreateGatewayRoute]
ReadPrec CreateGatewayRoute
Int -> ReadS CreateGatewayRoute
ReadS [CreateGatewayRoute]
(Int -> ReadS CreateGatewayRoute)
-> ReadS [CreateGatewayRoute]
-> ReadPrec CreateGatewayRoute
-> ReadPrec [CreateGatewayRoute]
-> Read CreateGatewayRoute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGatewayRoute]
$creadListPrec :: ReadPrec [CreateGatewayRoute]
readPrec :: ReadPrec CreateGatewayRoute
$creadPrec :: ReadPrec CreateGatewayRoute
readList :: ReadS [CreateGatewayRoute]
$creadList :: ReadS [CreateGatewayRoute]
readsPrec :: Int -> ReadS CreateGatewayRoute
$creadsPrec :: Int -> ReadS CreateGatewayRoute
Prelude.Read, Int -> CreateGatewayRoute -> ShowS
[CreateGatewayRoute] -> ShowS
CreateGatewayRoute -> String
(Int -> CreateGatewayRoute -> ShowS)
-> (CreateGatewayRoute -> String)
-> ([CreateGatewayRoute] -> ShowS)
-> Show CreateGatewayRoute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGatewayRoute] -> ShowS
$cshowList :: [CreateGatewayRoute] -> ShowS
show :: CreateGatewayRoute -> String
$cshow :: CreateGatewayRoute -> String
showsPrec :: Int -> CreateGatewayRoute -> ShowS
$cshowsPrec :: Int -> CreateGatewayRoute -> ShowS
Prelude.Show, (forall x. CreateGatewayRoute -> Rep CreateGatewayRoute x)
-> (forall x. Rep CreateGatewayRoute x -> CreateGatewayRoute)
-> Generic CreateGatewayRoute
forall x. Rep CreateGatewayRoute x -> CreateGatewayRoute
forall x. CreateGatewayRoute -> Rep CreateGatewayRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGatewayRoute x -> CreateGatewayRoute
$cfrom :: forall x. CreateGatewayRoute -> Rep CreateGatewayRoute x
Prelude.Generic)
newCreateGatewayRoute ::
Prelude.Text ->
Prelude.Text ->
GatewayRouteSpec ->
Prelude.Text ->
CreateGatewayRoute
newCreateGatewayRoute :: Text -> Text -> GatewayRouteSpec -> Text -> CreateGatewayRoute
newCreateGatewayRoute
Text
pGatewayRouteName_
Text
pMeshName_
GatewayRouteSpec
pSpec_
Text
pVirtualGatewayName_ =
CreateGatewayRoute' :: Maybe Text
-> Maybe Text
-> Maybe [TagRef]
-> Text
-> Text
-> GatewayRouteSpec
-> Text
-> CreateGatewayRoute
CreateGatewayRoute'
{ $sel:clientToken:CreateGatewayRoute' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:meshOwner:CreateGatewayRoute' :: Maybe Text
meshOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateGatewayRoute' :: Maybe [TagRef]
tags = Maybe [TagRef]
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayRouteName:CreateGatewayRoute' :: Text
gatewayRouteName = Text
pGatewayRouteName_,
$sel:meshName:CreateGatewayRoute' :: Text
meshName = Text
pMeshName_,
$sel:spec:CreateGatewayRoute' :: GatewayRouteSpec
spec = GatewayRouteSpec
pSpec_,
$sel:virtualGatewayName:CreateGatewayRoute' :: Text
virtualGatewayName = Text
pVirtualGatewayName_
}
createGatewayRoute_clientToken :: Lens.Lens' CreateGatewayRoute (Prelude.Maybe Prelude.Text)
createGatewayRoute_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_clientToken = (CreateGatewayRoute -> Maybe Text)
-> (CreateGatewayRoute -> Maybe Text -> CreateGatewayRoute)
-> Lens
CreateGatewayRoute CreateGatewayRoute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Maybe Text
a -> CreateGatewayRoute
s {$sel:clientToken:CreateGatewayRoute' :: Maybe Text
clientToken = Maybe Text
a} :: CreateGatewayRoute)
createGatewayRoute_meshOwner :: Lens.Lens' CreateGatewayRoute (Prelude.Maybe Prelude.Text)
createGatewayRoute_meshOwner :: (Maybe Text -> f (Maybe Text))
-> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_meshOwner = (CreateGatewayRoute -> Maybe Text)
-> (CreateGatewayRoute -> Maybe Text -> CreateGatewayRoute)
-> Lens
CreateGatewayRoute CreateGatewayRoute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Maybe Text
meshOwner :: Maybe Text
$sel:meshOwner:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe Text
meshOwner} -> Maybe Text
meshOwner) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Maybe Text
a -> CreateGatewayRoute
s {$sel:meshOwner:CreateGatewayRoute' :: Maybe Text
meshOwner = Maybe Text
a} :: CreateGatewayRoute)
createGatewayRoute_tags :: Lens.Lens' CreateGatewayRoute (Prelude.Maybe [TagRef])
createGatewayRoute_tags :: (Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_tags = (CreateGatewayRoute -> Maybe [TagRef])
-> (CreateGatewayRoute -> Maybe [TagRef] -> CreateGatewayRoute)
-> Lens
CreateGatewayRoute
CreateGatewayRoute
(Maybe [TagRef])
(Maybe [TagRef])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Maybe [TagRef]
tags :: Maybe [TagRef]
$sel:tags:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe [TagRef]
tags} -> Maybe [TagRef]
tags) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Maybe [TagRef]
a -> CreateGatewayRoute
s {$sel:tags:CreateGatewayRoute' :: Maybe [TagRef]
tags = Maybe [TagRef]
a} :: CreateGatewayRoute) ((Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateGatewayRoute -> f CreateGatewayRoute)
-> ((Maybe [TagRef] -> f (Maybe [TagRef]))
-> Maybe [TagRef] -> f (Maybe [TagRef]))
-> (Maybe [TagRef] -> f (Maybe [TagRef]))
-> CreateGatewayRoute
-> f CreateGatewayRoute
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
createGatewayRoute_gatewayRouteName :: Lens.Lens' CreateGatewayRoute Prelude.Text
createGatewayRoute_gatewayRouteName :: (Text -> f Text) -> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_gatewayRouteName = (CreateGatewayRoute -> Text)
-> (CreateGatewayRoute -> Text -> CreateGatewayRoute)
-> Lens CreateGatewayRoute CreateGatewayRoute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Text
gatewayRouteName :: Text
$sel:gatewayRouteName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
gatewayRouteName} -> Text
gatewayRouteName) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Text
a -> CreateGatewayRoute
s {$sel:gatewayRouteName:CreateGatewayRoute' :: Text
gatewayRouteName = Text
a} :: CreateGatewayRoute)
createGatewayRoute_meshName :: Lens.Lens' CreateGatewayRoute Prelude.Text
createGatewayRoute_meshName :: (Text -> f Text) -> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_meshName = (CreateGatewayRoute -> Text)
-> (CreateGatewayRoute -> Text -> CreateGatewayRoute)
-> Lens CreateGatewayRoute CreateGatewayRoute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Text
meshName :: Text
$sel:meshName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
meshName} -> Text
meshName) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Text
a -> CreateGatewayRoute
s {$sel:meshName:CreateGatewayRoute' :: Text
meshName = Text
a} :: CreateGatewayRoute)
createGatewayRoute_spec :: Lens.Lens' CreateGatewayRoute GatewayRouteSpec
createGatewayRoute_spec :: (GatewayRouteSpec -> f GatewayRouteSpec)
-> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_spec = (CreateGatewayRoute -> GatewayRouteSpec)
-> (CreateGatewayRoute -> GatewayRouteSpec -> CreateGatewayRoute)
-> Lens
CreateGatewayRoute
CreateGatewayRoute
GatewayRouteSpec
GatewayRouteSpec
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {GatewayRouteSpec
spec :: GatewayRouteSpec
$sel:spec:CreateGatewayRoute' :: CreateGatewayRoute -> GatewayRouteSpec
spec} -> GatewayRouteSpec
spec) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} GatewayRouteSpec
a -> CreateGatewayRoute
s {$sel:spec:CreateGatewayRoute' :: GatewayRouteSpec
spec = GatewayRouteSpec
a} :: CreateGatewayRoute)
createGatewayRoute_virtualGatewayName :: Lens.Lens' CreateGatewayRoute Prelude.Text
createGatewayRoute_virtualGatewayName :: (Text -> f Text) -> CreateGatewayRoute -> f CreateGatewayRoute
createGatewayRoute_virtualGatewayName = (CreateGatewayRoute -> Text)
-> (CreateGatewayRoute -> Text -> CreateGatewayRoute)
-> Lens CreateGatewayRoute CreateGatewayRoute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRoute' {Text
virtualGatewayName :: Text
$sel:virtualGatewayName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
virtualGatewayName} -> Text
virtualGatewayName) (\s :: CreateGatewayRoute
s@CreateGatewayRoute' {} Text
a -> CreateGatewayRoute
s {$sel:virtualGatewayName:CreateGatewayRoute' :: Text
virtualGatewayName = Text
a} :: CreateGatewayRoute)
instance Core.AWSRequest CreateGatewayRoute where
type
AWSResponse CreateGatewayRoute =
CreateGatewayRouteResponse
request :: CreateGatewayRoute -> Request CreateGatewayRoute
request = Service -> CreateGatewayRoute -> Request CreateGatewayRoute
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateGatewayRoute
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateGatewayRoute)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateGatewayRoute))
-> Logger
-> Service
-> Proxy CreateGatewayRoute
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateGatewayRoute)))
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 -> GatewayRouteData -> CreateGatewayRouteResponse
CreateGatewayRouteResponse'
(Int -> GatewayRouteData -> CreateGatewayRouteResponse)
-> Either String Int
-> Either String (GatewayRouteData -> CreateGatewayRouteResponse)
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 (GatewayRouteData -> CreateGatewayRouteResponse)
-> Either String GatewayRouteData
-> Either String CreateGatewayRouteResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String GatewayRouteData
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance Prelude.Hashable CreateGatewayRoute
instance Prelude.NFData CreateGatewayRoute
instance Core.ToHeaders CreateGatewayRoute where
toHeaders :: CreateGatewayRoute -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateGatewayRoute -> 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 CreateGatewayRoute where
toJSON :: CreateGatewayRoute -> Value
toJSON CreateGatewayRoute' {Maybe [TagRef]
Maybe Text
Text
GatewayRouteSpec
virtualGatewayName :: Text
spec :: GatewayRouteSpec
meshName :: Text
gatewayRouteName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:spec:CreateGatewayRoute' :: CreateGatewayRoute -> GatewayRouteSpec
$sel:meshName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:gatewayRouteName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:tags:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe [TagRef]
$sel:meshOwner:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe Text
$sel:clientToken:CreateGatewayRoute' :: CreateGatewayRoute -> 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
"gatewayRouteName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayRouteName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"spec" Text -> GatewayRouteSpec -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= GatewayRouteSpec
spec)
]
)
instance Core.ToPath CreateGatewayRoute where
toPath :: CreateGatewayRoute -> ByteString
toPath CreateGatewayRoute' {Maybe [TagRef]
Maybe Text
Text
GatewayRouteSpec
virtualGatewayName :: Text
spec :: GatewayRouteSpec
meshName :: Text
gatewayRouteName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:spec:CreateGatewayRoute' :: CreateGatewayRoute -> GatewayRouteSpec
$sel:meshName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:gatewayRouteName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:tags:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe [TagRef]
$sel:meshOwner:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe Text
$sel:clientToken:CreateGatewayRoute' :: CreateGatewayRoute -> 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
"/virtualGateway/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
virtualGatewayName,
ByteString
"/gatewayRoutes"
]
instance Core.ToQuery CreateGatewayRoute where
toQuery :: CreateGatewayRoute -> QueryString
toQuery CreateGatewayRoute' {Maybe [TagRef]
Maybe Text
Text
GatewayRouteSpec
virtualGatewayName :: Text
spec :: GatewayRouteSpec
meshName :: Text
gatewayRouteName :: Text
tags :: Maybe [TagRef]
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:spec:CreateGatewayRoute' :: CreateGatewayRoute -> GatewayRouteSpec
$sel:meshName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:gatewayRouteName:CreateGatewayRoute' :: CreateGatewayRoute -> Text
$sel:tags:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe [TagRef]
$sel:meshOwner:CreateGatewayRoute' :: CreateGatewayRoute -> Maybe Text
$sel:clientToken:CreateGatewayRoute' :: CreateGatewayRoute -> 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 CreateGatewayRouteResponse = CreateGatewayRouteResponse'
{
CreateGatewayRouteResponse -> Int
httpStatus :: Prelude.Int,
CreateGatewayRouteResponse -> GatewayRouteData
gatewayRoute :: GatewayRouteData
}
deriving (CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool
(CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool)
-> (CreateGatewayRouteResponse
-> CreateGatewayRouteResponse -> Bool)
-> Eq CreateGatewayRouteResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool
$c/= :: CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool
== :: CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool
$c== :: CreateGatewayRouteResponse -> CreateGatewayRouteResponse -> Bool
Prelude.Eq, ReadPrec [CreateGatewayRouteResponse]
ReadPrec CreateGatewayRouteResponse
Int -> ReadS CreateGatewayRouteResponse
ReadS [CreateGatewayRouteResponse]
(Int -> ReadS CreateGatewayRouteResponse)
-> ReadS [CreateGatewayRouteResponse]
-> ReadPrec CreateGatewayRouteResponse
-> ReadPrec [CreateGatewayRouteResponse]
-> Read CreateGatewayRouteResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGatewayRouteResponse]
$creadListPrec :: ReadPrec [CreateGatewayRouteResponse]
readPrec :: ReadPrec CreateGatewayRouteResponse
$creadPrec :: ReadPrec CreateGatewayRouteResponse
readList :: ReadS [CreateGatewayRouteResponse]
$creadList :: ReadS [CreateGatewayRouteResponse]
readsPrec :: Int -> ReadS CreateGatewayRouteResponse
$creadsPrec :: Int -> ReadS CreateGatewayRouteResponse
Prelude.Read, Int -> CreateGatewayRouteResponse -> ShowS
[CreateGatewayRouteResponse] -> ShowS
CreateGatewayRouteResponse -> String
(Int -> CreateGatewayRouteResponse -> ShowS)
-> (CreateGatewayRouteResponse -> String)
-> ([CreateGatewayRouteResponse] -> ShowS)
-> Show CreateGatewayRouteResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGatewayRouteResponse] -> ShowS
$cshowList :: [CreateGatewayRouteResponse] -> ShowS
show :: CreateGatewayRouteResponse -> String
$cshow :: CreateGatewayRouteResponse -> String
showsPrec :: Int -> CreateGatewayRouteResponse -> ShowS
$cshowsPrec :: Int -> CreateGatewayRouteResponse -> ShowS
Prelude.Show, (forall x.
CreateGatewayRouteResponse -> Rep CreateGatewayRouteResponse x)
-> (forall x.
Rep CreateGatewayRouteResponse x -> CreateGatewayRouteResponse)
-> Generic CreateGatewayRouteResponse
forall x.
Rep CreateGatewayRouteResponse x -> CreateGatewayRouteResponse
forall x.
CreateGatewayRouteResponse -> Rep CreateGatewayRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateGatewayRouteResponse x -> CreateGatewayRouteResponse
$cfrom :: forall x.
CreateGatewayRouteResponse -> Rep CreateGatewayRouteResponse x
Prelude.Generic)
newCreateGatewayRouteResponse ::
Prelude.Int ->
GatewayRouteData ->
CreateGatewayRouteResponse
newCreateGatewayRouteResponse :: Int -> GatewayRouteData -> CreateGatewayRouteResponse
newCreateGatewayRouteResponse
Int
pHttpStatus_
GatewayRouteData
pGatewayRoute_ =
CreateGatewayRouteResponse' :: Int -> GatewayRouteData -> CreateGatewayRouteResponse
CreateGatewayRouteResponse'
{ $sel:httpStatus:CreateGatewayRouteResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:gatewayRoute:CreateGatewayRouteResponse' :: GatewayRouteData
gatewayRoute = GatewayRouteData
pGatewayRoute_
}
createGatewayRouteResponse_httpStatus :: Lens.Lens' CreateGatewayRouteResponse Prelude.Int
createGatewayRouteResponse_httpStatus :: (Int -> f Int)
-> CreateGatewayRouteResponse -> f CreateGatewayRouteResponse
createGatewayRouteResponse_httpStatus = (CreateGatewayRouteResponse -> Int)
-> (CreateGatewayRouteResponse
-> Int -> CreateGatewayRouteResponse)
-> Lens
CreateGatewayRouteResponse CreateGatewayRouteResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRouteResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateGatewayRouteResponse' :: CreateGatewayRouteResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateGatewayRouteResponse
s@CreateGatewayRouteResponse' {} Int
a -> CreateGatewayRouteResponse
s {$sel:httpStatus:CreateGatewayRouteResponse' :: Int
httpStatus = Int
a} :: CreateGatewayRouteResponse)
createGatewayRouteResponse_gatewayRoute :: Lens.Lens' CreateGatewayRouteResponse GatewayRouteData
createGatewayRouteResponse_gatewayRoute :: (GatewayRouteData -> f GatewayRouteData)
-> CreateGatewayRouteResponse -> f CreateGatewayRouteResponse
createGatewayRouteResponse_gatewayRoute = (CreateGatewayRouteResponse -> GatewayRouteData)
-> (CreateGatewayRouteResponse
-> GatewayRouteData -> CreateGatewayRouteResponse)
-> Lens
CreateGatewayRouteResponse
CreateGatewayRouteResponse
GatewayRouteData
GatewayRouteData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGatewayRouteResponse' {GatewayRouteData
gatewayRoute :: GatewayRouteData
$sel:gatewayRoute:CreateGatewayRouteResponse' :: CreateGatewayRouteResponse -> GatewayRouteData
gatewayRoute} -> GatewayRouteData
gatewayRoute) (\s :: CreateGatewayRouteResponse
s@CreateGatewayRouteResponse' {} GatewayRouteData
a -> CreateGatewayRouteResponse
s {$sel:gatewayRoute:CreateGatewayRouteResponse' :: GatewayRouteData
gatewayRoute = GatewayRouteData
a} :: CreateGatewayRouteResponse)
instance Prelude.NFData CreateGatewayRouteResponse