{-# 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.MigrationHubReFactorSpaces.CreateRoute
(
CreateRoute (..),
newCreateRoute,
createRoute_clientToken,
createRoute_defaultRoute,
createRoute_tags,
createRoute_uriPathRoute,
createRoute_applicationIdentifier,
createRoute_environmentIdentifier,
createRoute_routeType,
createRoute_serviceIdentifier,
CreateRouteResponse (..),
newCreateRouteResponse,
createRouteResponse_applicationId,
createRouteResponse_arn,
createRouteResponse_createdByAccountId,
createRouteResponse_createdTime,
createRouteResponse_lastUpdatedTime,
createRouteResponse_ownerAccountId,
createRouteResponse_routeId,
createRouteResponse_routeType,
createRouteResponse_serviceId,
createRouteResponse_state,
createRouteResponse_tags,
createRouteResponse_uriPathRoute,
createRouteResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubReFactorSpaces.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateRoute = CreateRoute'
{
CreateRoute -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateRoute -> Maybe DefaultRouteInput
defaultRoute :: Prelude.Maybe DefaultRouteInput,
CreateRoute -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
CreateRoute -> Maybe UriPathRouteInput
uriPathRoute :: Prelude.Maybe UriPathRouteInput,
CreateRoute -> Text
applicationIdentifier :: Prelude.Text,
CreateRoute -> Text
environmentIdentifier :: Prelude.Text,
CreateRoute -> RouteType
routeType :: RouteType,
CreateRoute -> Text
serviceIdentifier :: Prelude.Text
}
deriving (CreateRoute -> CreateRoute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRoute -> CreateRoute -> Bool
$c/= :: CreateRoute -> CreateRoute -> Bool
== :: CreateRoute -> CreateRoute -> Bool
$c== :: CreateRoute -> CreateRoute -> Bool
Prelude.Eq, Int -> CreateRoute -> ShowS
[CreateRoute] -> ShowS
CreateRoute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRoute] -> ShowS
$cshowList :: [CreateRoute] -> ShowS
show :: CreateRoute -> String
$cshow :: CreateRoute -> String
showsPrec :: Int -> CreateRoute -> ShowS
$cshowsPrec :: Int -> CreateRoute -> ShowS
Prelude.Show, forall x. Rep CreateRoute x -> CreateRoute
forall x. CreateRoute -> Rep CreateRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRoute x -> CreateRoute
$cfrom :: forall x. CreateRoute -> Rep CreateRoute x
Prelude.Generic)
newCreateRoute ::
Prelude.Text ->
Prelude.Text ->
RouteType ->
Prelude.Text ->
CreateRoute
newCreateRoute :: Text -> Text -> RouteType -> Text -> CreateRoute
newCreateRoute
Text
pApplicationIdentifier_
Text
pEnvironmentIdentifier_
RouteType
pRouteType_
Text
pServiceIdentifier_ =
CreateRoute'
{ $sel:clientToken:CreateRoute' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:defaultRoute:CreateRoute' :: Maybe DefaultRouteInput
defaultRoute = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRoute' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
$sel:uriPathRoute:CreateRoute' :: Maybe UriPathRouteInput
uriPathRoute = forall a. Maybe a
Prelude.Nothing,
$sel:applicationIdentifier:CreateRoute' :: Text
applicationIdentifier = Text
pApplicationIdentifier_,
$sel:environmentIdentifier:CreateRoute' :: Text
environmentIdentifier = Text
pEnvironmentIdentifier_,
$sel:routeType:CreateRoute' :: RouteType
routeType = RouteType
pRouteType_,
$sel:serviceIdentifier:CreateRoute' :: Text
serviceIdentifier = Text
pServiceIdentifier_
}
createRoute_clientToken :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text)
createRoute_clientToken :: Lens' CreateRoute (Maybe Text)
createRoute_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateRoute' :: CreateRoute -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateRoute
s@CreateRoute' {} Maybe Text
a -> CreateRoute
s {$sel:clientToken:CreateRoute' :: Maybe Text
clientToken = Maybe Text
a} :: CreateRoute)
createRoute_defaultRoute :: Lens.Lens' CreateRoute (Prelude.Maybe DefaultRouteInput)
createRoute_defaultRoute :: Lens' CreateRoute (Maybe DefaultRouteInput)
createRoute_defaultRoute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Maybe DefaultRouteInput
defaultRoute :: Maybe DefaultRouteInput
$sel:defaultRoute:CreateRoute' :: CreateRoute -> Maybe DefaultRouteInput
defaultRoute} -> Maybe DefaultRouteInput
defaultRoute) (\s :: CreateRoute
s@CreateRoute' {} Maybe DefaultRouteInput
a -> CreateRoute
s {$sel:defaultRoute:CreateRoute' :: Maybe DefaultRouteInput
defaultRoute = Maybe DefaultRouteInput
a} :: CreateRoute)
createRoute_tags :: Lens.Lens' CreateRoute (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRoute_tags :: Lens' CreateRoute (Maybe (HashMap Text Text))
createRoute_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:CreateRoute' :: CreateRoute -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: CreateRoute
s@CreateRoute' {} Maybe (Sensitive (HashMap Text Text))
a -> CreateRoute
s {$sel:tags:CreateRoute' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: CreateRoute) 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 a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createRoute_uriPathRoute :: Lens.Lens' CreateRoute (Prelude.Maybe UriPathRouteInput)
createRoute_uriPathRoute :: Lens' CreateRoute (Maybe UriPathRouteInput)
createRoute_uriPathRoute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Maybe UriPathRouteInput
uriPathRoute :: Maybe UriPathRouteInput
$sel:uriPathRoute:CreateRoute' :: CreateRoute -> Maybe UriPathRouteInput
uriPathRoute} -> Maybe UriPathRouteInput
uriPathRoute) (\s :: CreateRoute
s@CreateRoute' {} Maybe UriPathRouteInput
a -> CreateRoute
s {$sel:uriPathRoute:CreateRoute' :: Maybe UriPathRouteInput
uriPathRoute = Maybe UriPathRouteInput
a} :: CreateRoute)
createRoute_applicationIdentifier :: Lens.Lens' CreateRoute Prelude.Text
createRoute_applicationIdentifier :: Lens' CreateRoute Text
createRoute_applicationIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Text
applicationIdentifier :: Text
$sel:applicationIdentifier:CreateRoute' :: CreateRoute -> Text
applicationIdentifier} -> Text
applicationIdentifier) (\s :: CreateRoute
s@CreateRoute' {} Text
a -> CreateRoute
s {$sel:applicationIdentifier:CreateRoute' :: Text
applicationIdentifier = Text
a} :: CreateRoute)
createRoute_environmentIdentifier :: Lens.Lens' CreateRoute Prelude.Text
createRoute_environmentIdentifier :: Lens' CreateRoute Text
createRoute_environmentIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Text
environmentIdentifier :: Text
$sel:environmentIdentifier:CreateRoute' :: CreateRoute -> Text
environmentIdentifier} -> Text
environmentIdentifier) (\s :: CreateRoute
s@CreateRoute' {} Text
a -> CreateRoute
s {$sel:environmentIdentifier:CreateRoute' :: Text
environmentIdentifier = Text
a} :: CreateRoute)
createRoute_routeType :: Lens.Lens' CreateRoute RouteType
createRoute_routeType :: Lens' CreateRoute RouteType
createRoute_routeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {RouteType
routeType :: RouteType
$sel:routeType:CreateRoute' :: CreateRoute -> RouteType
routeType} -> RouteType
routeType) (\s :: CreateRoute
s@CreateRoute' {} RouteType
a -> CreateRoute
s {$sel:routeType:CreateRoute' :: RouteType
routeType = RouteType
a} :: CreateRoute)
createRoute_serviceIdentifier :: Lens.Lens' CreateRoute Prelude.Text
createRoute_serviceIdentifier :: Lens' CreateRoute Text
createRoute_serviceIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoute' {Text
serviceIdentifier :: Text
$sel:serviceIdentifier:CreateRoute' :: CreateRoute -> Text
serviceIdentifier} -> Text
serviceIdentifier) (\s :: CreateRoute
s@CreateRoute' {} Text
a -> CreateRoute
s {$sel:serviceIdentifier:CreateRoute' :: Text
serviceIdentifier = Text
a} :: CreateRoute)
instance Core.AWSRequest CreateRoute where
type AWSResponse CreateRoute = CreateRouteResponse
request :: (Service -> Service) -> CreateRoute -> Request CreateRoute
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 CreateRoute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRoute)))
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 ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe RouteType
-> Maybe Text
-> Maybe RouteState
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe UriPathRouteInput
-> Int
-> CreateRouteResponse
CreateRouteResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ApplicationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedByAccountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastUpdatedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OwnerAccountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RouteId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RouteType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ServiceId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"State")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"UriPathRoute")
forall (f :: * -> *) a b. Applicative f => 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))
)
instance Prelude.Hashable CreateRoute where
hashWithSalt :: Int -> CreateRoute -> Int
hashWithSalt Int
_salt CreateRoute' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe DefaultRouteInput
Maybe UriPathRouteInput
Text
RouteType
serviceIdentifier :: Text
routeType :: RouteType
environmentIdentifier :: Text
applicationIdentifier :: Text
uriPathRoute :: Maybe UriPathRouteInput
tags :: Maybe (Sensitive (HashMap Text Text))
defaultRoute :: Maybe DefaultRouteInput
clientToken :: Maybe Text
$sel:serviceIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:routeType:CreateRoute' :: CreateRoute -> RouteType
$sel:environmentIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:applicationIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:uriPathRoute:CreateRoute' :: CreateRoute -> Maybe UriPathRouteInput
$sel:tags:CreateRoute' :: CreateRoute -> Maybe (Sensitive (HashMap Text Text))
$sel:defaultRoute:CreateRoute' :: CreateRoute -> Maybe DefaultRouteInput
$sel:clientToken:CreateRoute' :: CreateRoute -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DefaultRouteInput
defaultRoute
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UriPathRouteInput
uriPathRoute
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
environmentIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RouteType
routeType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceIdentifier
instance Prelude.NFData CreateRoute where
rnf :: CreateRoute -> ()
rnf CreateRoute' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe DefaultRouteInput
Maybe UriPathRouteInput
Text
RouteType
serviceIdentifier :: Text
routeType :: RouteType
environmentIdentifier :: Text
applicationIdentifier :: Text
uriPathRoute :: Maybe UriPathRouteInput
tags :: Maybe (Sensitive (HashMap Text Text))
defaultRoute :: Maybe DefaultRouteInput
clientToken :: Maybe Text
$sel:serviceIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:routeType:CreateRoute' :: CreateRoute -> RouteType
$sel:environmentIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:applicationIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:uriPathRoute:CreateRoute' :: CreateRoute -> Maybe UriPathRouteInput
$sel:tags:CreateRoute' :: CreateRoute -> Maybe (Sensitive (HashMap Text Text))
$sel:defaultRoute:CreateRoute' :: CreateRoute -> Maybe DefaultRouteInput
$sel:clientToken:CreateRoute' :: CreateRoute -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DefaultRouteInput
defaultRoute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UriPathRouteInput
uriPathRoute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
environmentIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RouteType
routeType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceIdentifier
instance Data.ToHeaders CreateRoute where
toHeaders :: CreateRoute -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateRoute where
toJSON :: CreateRoute -> Value
toJSON CreateRoute' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe DefaultRouteInput
Maybe UriPathRouteInput
Text
RouteType
serviceIdentifier :: Text
routeType :: RouteType
environmentIdentifier :: Text
applicationIdentifier :: Text
uriPathRoute :: Maybe UriPathRouteInput
tags :: Maybe (Sensitive (HashMap Text Text))
defaultRoute :: Maybe DefaultRouteInput
clientToken :: Maybe Text
$sel:serviceIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:routeType:CreateRoute' :: CreateRoute -> RouteType
$sel:environmentIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:applicationIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:uriPathRoute:CreateRoute' :: CreateRoute -> Maybe UriPathRouteInput
$sel:tags:CreateRoute' :: CreateRoute -> Maybe (Sensitive (HashMap Text Text))
$sel:defaultRoute:CreateRoute' :: CreateRoute -> Maybe DefaultRouteInput
$sel:clientToken:CreateRoute' :: CreateRoute -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClientToken" 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
clientToken,
(Key
"DefaultRoute" 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 DefaultRouteInput
defaultRoute,
(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 (Sensitive (HashMap Text Text))
tags,
(Key
"UriPathRoute" 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 UriPathRouteInput
uriPathRoute,
forall a. a -> Maybe a
Prelude.Just (Key
"RouteType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RouteType
routeType),
forall a. a -> Maybe a
Prelude.Just
(Key
"ServiceIdentifier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceIdentifier)
]
)
instance Data.ToPath CreateRoute where
toPath :: CreateRoute -> ByteString
toPath CreateRoute' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe DefaultRouteInput
Maybe UriPathRouteInput
Text
RouteType
serviceIdentifier :: Text
routeType :: RouteType
environmentIdentifier :: Text
applicationIdentifier :: Text
uriPathRoute :: Maybe UriPathRouteInput
tags :: Maybe (Sensitive (HashMap Text Text))
defaultRoute :: Maybe DefaultRouteInput
clientToken :: Maybe Text
$sel:serviceIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:routeType:CreateRoute' :: CreateRoute -> RouteType
$sel:environmentIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:applicationIdentifier:CreateRoute' :: CreateRoute -> Text
$sel:uriPathRoute:CreateRoute' :: CreateRoute -> Maybe UriPathRouteInput
$sel:tags:CreateRoute' :: CreateRoute -> Maybe (Sensitive (HashMap Text Text))
$sel:defaultRoute:CreateRoute' :: CreateRoute -> Maybe DefaultRouteInput
$sel:clientToken:CreateRoute' :: CreateRoute -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/environments/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
environmentIdentifier,
ByteString
"/applications/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
applicationIdentifier,
ByteString
"/routes"
]
instance Data.ToQuery CreateRoute where
toQuery :: CreateRoute -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateRouteResponse = CreateRouteResponse'
{
CreateRouteResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe Text
createdByAccountId :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
CreateRouteResponse -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Data.POSIX,
CreateRouteResponse -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe Text
routeId :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe RouteType
routeType :: Prelude.Maybe RouteType,
CreateRouteResponse -> Maybe Text
serviceId :: Prelude.Maybe Prelude.Text,
CreateRouteResponse -> Maybe RouteState
state :: Prelude.Maybe RouteState,
CreateRouteResponse -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
CreateRouteResponse -> Maybe UriPathRouteInput
uriPathRoute :: Prelude.Maybe UriPathRouteInput,
CreateRouteResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRouteResponse -> CreateRouteResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRouteResponse -> CreateRouteResponse -> Bool
$c/= :: CreateRouteResponse -> CreateRouteResponse -> Bool
== :: CreateRouteResponse -> CreateRouteResponse -> Bool
$c== :: CreateRouteResponse -> CreateRouteResponse -> Bool
Prelude.Eq, Int -> CreateRouteResponse -> ShowS
[CreateRouteResponse] -> ShowS
CreateRouteResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRouteResponse] -> ShowS
$cshowList :: [CreateRouteResponse] -> ShowS
show :: CreateRouteResponse -> String
$cshow :: CreateRouteResponse -> String
showsPrec :: Int -> CreateRouteResponse -> ShowS
$cshowsPrec :: Int -> CreateRouteResponse -> ShowS
Prelude.Show, forall x. Rep CreateRouteResponse x -> CreateRouteResponse
forall x. CreateRouteResponse -> Rep CreateRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRouteResponse x -> CreateRouteResponse
$cfrom :: forall x. CreateRouteResponse -> Rep CreateRouteResponse x
Prelude.Generic)
newCreateRouteResponse ::
Prelude.Int ->
CreateRouteResponse
newCreateRouteResponse :: Int -> CreateRouteResponse
newCreateRouteResponse Int
pHttpStatus_ =
CreateRouteResponse'
{ $sel:applicationId:CreateRouteResponse' :: Maybe Text
applicationId =
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CreateRouteResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdByAccountId:CreateRouteResponse' :: Maybe Text
createdByAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:CreateRouteResponse' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTime:CreateRouteResponse' :: Maybe POSIX
lastUpdatedTime = forall a. Maybe a
Prelude.Nothing,
$sel:ownerAccountId:CreateRouteResponse' :: Maybe Text
ownerAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:routeId:CreateRouteResponse' :: Maybe Text
routeId = forall a. Maybe a
Prelude.Nothing,
$sel:routeType:CreateRouteResponse' :: Maybe RouteType
routeType = forall a. Maybe a
Prelude.Nothing,
$sel:serviceId:CreateRouteResponse' :: Maybe Text
serviceId = forall a. Maybe a
Prelude.Nothing,
$sel:state:CreateRouteResponse' :: Maybe RouteState
state = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRouteResponse' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
$sel:uriPathRoute:CreateRouteResponse' :: Maybe UriPathRouteInput
uriPathRoute = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRouteResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRouteResponse_applicationId :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_applicationId :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:applicationId:CreateRouteResponse' :: Maybe Text
applicationId = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_arn :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_arn :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:arn:CreateRouteResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_createdByAccountId :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_createdByAccountId :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_createdByAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
createdByAccountId :: Maybe Text
$sel:createdByAccountId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
createdByAccountId} -> Maybe Text
createdByAccountId) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:createdByAccountId:CreateRouteResponse' :: Maybe Text
createdByAccountId = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_createdTime :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.UTCTime)
createRouteResponse_createdTime :: Lens' CreateRouteResponse (Maybe UTCTime)
createRouteResponse_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:CreateRouteResponse' :: CreateRouteResponse -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe POSIX
a -> CreateRouteResponse
s {$sel:createdTime:CreateRouteResponse' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: CreateRouteResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
createRouteResponse_lastUpdatedTime :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.UTCTime)
createRouteResponse_lastUpdatedTime :: Lens' CreateRouteResponse (Maybe UTCTime)
createRouteResponse_lastUpdatedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:CreateRouteResponse' :: CreateRouteResponse -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe POSIX
a -> CreateRouteResponse
s {$sel:lastUpdatedTime:CreateRouteResponse' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: CreateRouteResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
createRouteResponse_ownerAccountId :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_ownerAccountId :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_ownerAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:ownerAccountId:CreateRouteResponse' :: Maybe Text
ownerAccountId = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_routeId :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_routeId :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_routeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
routeId :: Maybe Text
$sel:routeId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
routeId} -> Maybe Text
routeId) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:routeId:CreateRouteResponse' :: Maybe Text
routeId = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_routeType :: Lens.Lens' CreateRouteResponse (Prelude.Maybe RouteType)
createRouteResponse_routeType :: Lens' CreateRouteResponse (Maybe RouteType)
createRouteResponse_routeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe RouteType
routeType :: Maybe RouteType
$sel:routeType:CreateRouteResponse' :: CreateRouteResponse -> Maybe RouteType
routeType} -> Maybe RouteType
routeType) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe RouteType
a -> CreateRouteResponse
s {$sel:routeType:CreateRouteResponse' :: Maybe RouteType
routeType = Maybe RouteType
a} :: CreateRouteResponse)
createRouteResponse_serviceId :: Lens.Lens' CreateRouteResponse (Prelude.Maybe Prelude.Text)
createRouteResponse_serviceId :: Lens' CreateRouteResponse (Maybe Text)
createRouteResponse_serviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe Text
serviceId :: Maybe Text
$sel:serviceId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
serviceId} -> Maybe Text
serviceId) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe Text
a -> CreateRouteResponse
s {$sel:serviceId:CreateRouteResponse' :: Maybe Text
serviceId = Maybe Text
a} :: CreateRouteResponse)
createRouteResponse_state :: Lens.Lens' CreateRouteResponse (Prelude.Maybe RouteState)
createRouteResponse_state :: Lens' CreateRouteResponse (Maybe RouteState)
createRouteResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe RouteState
state :: Maybe RouteState
$sel:state:CreateRouteResponse' :: CreateRouteResponse -> Maybe RouteState
state} -> Maybe RouteState
state) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe RouteState
a -> CreateRouteResponse
s {$sel:state:CreateRouteResponse' :: Maybe RouteState
state = Maybe RouteState
a} :: CreateRouteResponse)
createRouteResponse_tags :: Lens.Lens' CreateRouteResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRouteResponse_tags :: Lens' CreateRouteResponse (Maybe (HashMap Text Text))
createRouteResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:CreateRouteResponse' :: CreateRouteResponse -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe (Sensitive (HashMap Text Text))
a -> CreateRouteResponse
s {$sel:tags:CreateRouteResponse' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: CreateRouteResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createRouteResponse_uriPathRoute :: Lens.Lens' CreateRouteResponse (Prelude.Maybe UriPathRouteInput)
createRouteResponse_uriPathRoute :: Lens' CreateRouteResponse (Maybe UriPathRouteInput)
createRouteResponse_uriPathRoute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Maybe UriPathRouteInput
uriPathRoute :: Maybe UriPathRouteInput
$sel:uriPathRoute:CreateRouteResponse' :: CreateRouteResponse -> Maybe UriPathRouteInput
uriPathRoute} -> Maybe UriPathRouteInput
uriPathRoute) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Maybe UriPathRouteInput
a -> CreateRouteResponse
s {$sel:uriPathRoute:CreateRouteResponse' :: Maybe UriPathRouteInput
uriPathRoute = Maybe UriPathRouteInput
a} :: CreateRouteResponse)
createRouteResponse_httpStatus :: Lens.Lens' CreateRouteResponse Prelude.Int
createRouteResponse_httpStatus :: Lens' CreateRouteResponse Int
createRouteResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRouteResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRouteResponse' :: CreateRouteResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRouteResponse
s@CreateRouteResponse' {} Int
a -> CreateRouteResponse
s {$sel:httpStatus:CreateRouteResponse' :: Int
httpStatus = Int
a} :: CreateRouteResponse)
instance Prelude.NFData CreateRouteResponse where
rnf :: CreateRouteResponse -> ()
rnf CreateRouteResponse' {Int
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe POSIX
Maybe RouteState
Maybe RouteType
Maybe UriPathRouteInput
httpStatus :: Int
uriPathRoute :: Maybe UriPathRouteInput
tags :: Maybe (Sensitive (HashMap Text Text))
state :: Maybe RouteState
serviceId :: Maybe Text
routeType :: Maybe RouteType
routeId :: Maybe Text
ownerAccountId :: Maybe Text
lastUpdatedTime :: Maybe POSIX
createdTime :: Maybe POSIX
createdByAccountId :: Maybe Text
arn :: Maybe Text
applicationId :: Maybe Text
$sel:httpStatus:CreateRouteResponse' :: CreateRouteResponse -> Int
$sel:uriPathRoute:CreateRouteResponse' :: CreateRouteResponse -> Maybe UriPathRouteInput
$sel:tags:CreateRouteResponse' :: CreateRouteResponse -> Maybe (Sensitive (HashMap Text Text))
$sel:state:CreateRouteResponse' :: CreateRouteResponse -> Maybe RouteState
$sel:serviceId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
$sel:routeType:CreateRouteResponse' :: CreateRouteResponse -> Maybe RouteType
$sel:routeId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
$sel:ownerAccountId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
$sel:lastUpdatedTime:CreateRouteResponse' :: CreateRouteResponse -> Maybe POSIX
$sel:createdTime:CreateRouteResponse' :: CreateRouteResponse -> Maybe POSIX
$sel:createdByAccountId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
$sel:arn:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
$sel:applicationId:CreateRouteResponse' :: CreateRouteResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdByAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteType
routeType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UriPathRouteInput
uriPathRoute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus