import { Construct } from 'constructs';
import { CfnGatewayRoute } from './appmesh.generated';
import { HeaderMatch } from './header-match';
import { HttpRouteMethod } from './http-route-method';
import { HttpGatewayRoutePathMatch } from './http-route-path-match';
import { QueryParameterMatch } from './query-parameter-match';
import { IVirtualService } from './virtual-service';
/**
 * (experimental) Configuration for gateway route host name match.
 *
 * @experimental
 */
export interface GatewayRouteHostnameMatchConfig {
    /**
     * (experimental) GatewayRoute CFN configuration for host name match.
     *
     * @experimental
     */
    readonly hostnameMatch: CfnGatewayRoute.GatewayRouteHostnameMatchProperty;
}
/**
 * (experimental) Used to generate host name matching methods.
 *
 * @experimental
 */
export declare abstract class GatewayRouteHostnameMatch {
    /**
     * (experimental) The value of the host name must match the specified value exactly.
     *
     * @param name The exact host name to match on.
     * @experimental
     */
    static exactly(name: string): GatewayRouteHostnameMatch;
    /**
     * (experimental) The value of the host name with the given name must end with the specified characters.
     *
     * @param suffix The specified ending characters of the host name to match on.
     * @experimental
     */
    static endsWith(suffix: string): GatewayRouteHostnameMatch;
    /**
     * (experimental) Returns the gateway route host name match configuration.
     *
     * @experimental
     */
    abstract bind(scope: Construct): GatewayRouteHostnameMatchConfig;
}
/**
 * (experimental) The criterion for determining a request match for this GatewayRoute.
 *
 * @experimental
 */
export interface HttpGatewayRouteMatch {
    /**
     * (experimental) Specify how to match requests based on the 'path' part of their URL.
     *
     * @default - matches requests with any path
     * @experimental
     */
    readonly path?: HttpGatewayRoutePathMatch;
    /**
     * (experimental) Specifies the client request headers to match on.
     *
     * All specified headers
     * must match for the gateway route to match.
     *
     * @default - do not match on headers
     * @experimental
     */
    readonly headers?: HeaderMatch[];
    /**
     * (experimental) The gateway route host name to be matched on.
     *
     * @default - do not match on host name
     * @experimental
     */
    readonly hostname?: GatewayRouteHostnameMatch;
    /**
     * (experimental) The method to match on.
     *
     * @default - do not match on method
     * @experimental
     */
    readonly method?: HttpRouteMethod;
    /**
     * (experimental) The query parameters to match on.
     *
     * All specified query parameters must match for the route to match.
     *
     * @default - do not match on query parameters
     * @experimental
     */
    readonly queryParameters?: QueryParameterMatch[];
    /**
     * (experimental) When `true`, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
     *
     * When `false`, retains the original hostname from the request.
     *
     * @default true
     * @experimental
     */
    readonly rewriteRequestHostname?: boolean;
}
/**
 * (experimental) The criterion for determining a request match for this GatewayRoute.
 *
 * @experimental
 */
export interface GrpcGatewayRouteMatch {
    /**
     * (experimental) Create service name based gRPC gateway route match.
     *
     * @default - no matching on service name
     * @experimental
     */
    readonly serviceName?: string;
    /**
     * (experimental) Create host name based gRPC gateway route match.
     *
     * @default - no matching on host name
     * @experimental
     */
    readonly hostname?: GatewayRouteHostnameMatch;
    /**
     * (experimental) Create metadata based gRPC gateway route match.
     *
     * All specified metadata must match for the route to match.
     *
     * @default - no matching on metadata
     * @experimental
     */
    readonly metadata?: HeaderMatch[];
    /**
     * (experimental) When `true`, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
     *
     * When `false`, retains the original hostname from the request.
     *
     * @default true
     * @experimental
     */
    readonly rewriteRequestHostname?: boolean;
}
/**
 * (experimental) Properties specific for HTTP Based GatewayRoutes.
 *
 * @experimental
 */
export interface HttpGatewayRouteSpecOptions {
    /**
     * (experimental) The criterion for determining a request match for this GatewayRoute.
     *
     * When path match is defined, this may optionally determine the path rewrite configuration.
     *
     * @default - matches any path and automatically rewrites the path to '/'
     * @experimental
     */
    readonly match?: HttpGatewayRouteMatch;
    /**
     * (experimental) The VirtualService this GatewayRoute directs traffic to.
     *
     * @experimental
     */
    readonly routeTarget: IVirtualService;
}
/**
 * (experimental) Properties specific for a gRPC GatewayRoute.
 *
 * @experimental
 */
export interface GrpcGatewayRouteSpecOptions {
    /**
     * (experimental) The criterion for determining a request match for this GatewayRoute.
     *
     * @experimental
     */
    readonly match: GrpcGatewayRouteMatch;
    /**
     * (experimental) The VirtualService this GatewayRoute directs traffic to.
     *
     * @experimental
     */
    readonly routeTarget: IVirtualService;
}
/**
 * (experimental) All Properties for GatewayRoute Specs.
 *
 * @experimental
 */
export interface GatewayRouteSpecConfig {
    /**
     * (experimental) The spec for an http gateway route.
     *
     * @default - no http spec
     * @experimental
     */
    readonly httpSpecConfig?: CfnGatewayRoute.HttpGatewayRouteProperty;
    /**
     * (experimental) The spec for an http2 gateway route.
     *
     * @default - no http2 spec
     * @experimental
     */
    readonly http2SpecConfig?: CfnGatewayRoute.HttpGatewayRouteProperty;
    /**
     * (experimental) The spec for a grpc gateway route.
     *
     * @default - no grpc spec
     * @experimental
     */
    readonly grpcSpecConfig?: CfnGatewayRoute.GrpcGatewayRouteProperty;
}
/**
 * (experimental) Used to generate specs with different protocols for a GatewayRoute.
 *
 * @experimental
 */
export declare abstract class GatewayRouteSpec {
    /**
     * (experimental) Creates an HTTP Based GatewayRoute.
     *
     * @param options - no http gateway route.
     * @experimental
     */
    static http(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec;
    /**
     * (experimental) Creates an HTTP2 Based GatewayRoute.
     *
     * @param options - no http2 gateway route.
     * @experimental
     */
    static http2(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec;
    /**
     * (experimental) Creates an gRPC Based GatewayRoute.
     *
     * @param options - no grpc gateway route.
     * @experimental
     */
    static grpc(options: GrpcGatewayRouteSpecOptions): GatewayRouteSpec;
    /**
     * (experimental) Called when the GatewayRouteSpec type is initialized.
     *
     * Can be used to enforce
     * mutual exclusivity with future properties
     *
     * @experimental
     */
    abstract bind(scope: Construct): GatewayRouteSpecConfig;
}
