import { ResourceBase , ResourceTag } from '../resource' ; import { Value , List } from '../dataTypes' ; export class Duration { Value ! : Value < number > ; Unit ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class WeightedTarget { VirtualNode ! : Value < string > ; Weight ! : Value < number > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRouteMetadataMatchMethod { Suffix ? : Value < string > ; Regex ? : Value < string > ; Exact ? : Value < string > ; Prefix ? : Value < string > ; Range ? : MatchRange ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HeaderMatchMethod { Suffix ? : Value < string > ; Regex ? : Value < string > ; Exact ? : Value < string > ; Prefix ? : Value < string > ; Range ? : MatchRange ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RouteSpec { HttpRoute ? : HttpRoute ; Priority ? : Value < number > ; Http2Route ? : HttpRoute ; GrpcRoute ? : GrpcRoute ; TcpRoute ? : TcpRoute ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpPathMatch { Regex ? : Value < string > ; Exact ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRouteMetadata { Invert ? : Value < boolean > ; Name ! : Value < string > ; Match ? : GrpcRouteMetadataMatchMethod ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class QueryParameter { Name ! : Value < string > ; Match ? : HttpQueryParameterMatch ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRouteMatch { Path ? : HttpPathMatch ; Scheme ? : Value < string > ; Headers ? : List < HttpRouteHeader > ; Prefix ? : Value < string > ; Method ? : Value < string > ; QueryParameters ? : List < QueryParameter > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpQueryParameterMatch { Exact ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRouteAction { WeightedTargets ! : List < WeightedTarget > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRouteMatch { ServiceName ? : Value < string > ; Metadata ? : List < GrpcRouteMetadata > ; MethodName ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRoute { Action ! : HttpRouteAction ; Timeout ? : HttpTimeout ; RetryPolicy ? : HttpRetryPolicy ; Match ! : HttpRouteMatch ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TcpRouteAction { WeightedTargets ! : List < WeightedTarget > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRetryPolicy { MaxRetries ! : Value < number > ; PerRetryTimeout ! : Duration ; GrpcRetryEvents ? : List < Value < string > > ; HttpRetryEvents ? : List < Value < string > > ; TcpRetryEvents ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TcpRoute { Action ! : TcpRouteAction ; Timeout ? : TcpTimeout ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRetryPolicy { MaxRetries ! : Value < number > ; PerRetryTimeout ! : Duration ; HttpRetryEvents ? : List < Value < string > > ; TcpRetryEvents ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcTimeout { PerRequest ? : Duration ; Idle ? : Duration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GrpcRoute { Action ! : GrpcRouteAction ; Timeout ? : GrpcTimeout ; RetryPolicy ? : GrpcRetryPolicy ; Match ! : GrpcRouteMatch ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TcpTimeout { Idle ? : Duration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpTimeout { PerRequest ? : Duration ; Idle ? : Duration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRouteHeader { Invert ? : Value < boolean > ; Name ! : Value < string > ; Match ? : HeaderMatchMethod ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRouteAction { WeightedTargets ! : List < WeightedTarget > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class MatchRange { Start ! : Value < number > ; End ! : Value < number > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export interface RouteProperties { MeshName : Value < string > ; VirtualRouterName : Value < string > ; MeshOwner ? : Value < string > ; RouteName ? : Value < string > ; Spec : RouteSpec ; Tags ? : List < ResourceTag > ; } export default class Route extends ResourceBase < RouteProperties > { static Duration = Duration ; static WeightedTarget = WeightedTarget ; static GrpcRouteMetadataMatchMethod = GrpcRouteMetadataMatchMethod ; static HeaderMatchMethod = HeaderMatchMethod ; static RouteSpec = RouteSpec ; static HttpPathMatch = HttpPathMatch ; static GrpcRouteMetadata = GrpcRouteMetadata ; static QueryParameter = QueryParameter ; static HttpRouteMatch = HttpRouteMatch ; static HttpQueryParameterMatch = HttpQueryParameterMatch ; static GrpcRouteAction = GrpcRouteAction ; static GrpcRouteMatch = GrpcRouteMatch ; static HttpRoute = HttpRoute ; static TcpRouteAction = TcpRouteAction ; static GrpcRetryPolicy = GrpcRetryPolicy ; static TcpRoute = TcpRoute ; static HttpRetryPolicy = HttpRetryPolicy ; static GrpcTimeout = GrpcTimeout ; static GrpcRoute = GrpcRoute ; static TcpTimeout = TcpTimeout ; static HttpTimeout = HttpTimeout ; static HttpRouteHeader = HttpRouteHeader ; static HttpRouteAction = HttpRouteAction ; static MatchRange = MatchRange ; constructor ( properties ) { super ( 'AWS::AppMesh::Route' , properties ) ; } }