import { DeepPartial, KnownMediaType, Initializer } from "@azure-tools/codegen"; import { Extensions } from "../common/extensions"; import { Languages } from "../common/languages"; import { Protocol } from "../common/metadata"; import { Schema } from "../common/schema"; import { GroupSchema } from "../common/schemas/object"; import { HttpMethod } from "./http-method"; import { ParameterLocation } from "./parameter-location"; import { SecurityRequirement } from "./security"; import { SerializationStyle } from "./serialization-style"; import { StatusCode } from "./status-code"; /** extended metadata for HTTP operation parameters */ export interface HttpParameter extends Protocol { /** the location that this parameter is placed in the http request */ in: `${ParameterLocation}`; /** the Serialization Style used for the parameter. */ style?: SerializationStyle; /** when set, 'form' style parameters generate separate parameters for each value of an array. */ explode?: boolean; /** when set, this indicates that the content of the parameter should not be subject to URI encoding rules. */ skipUriEncoding?: boolean; } export declare class HttpParameter extends Protocol { constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial); } /** HTTP operation protocol data */ export interface HttpRequest extends Protocol { /** A relative path to an individual endpoint. * * The field name MUST begin with a slash. * The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. * Path templating is allowed. * * When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. */ path: string; /** the base URI template for the operation. This will be a template that has Uri parameters to craft the base url to use. */ uri: string; /** the HTTP Method used to process this operation */ method: HttpMethod; } export declare class HttpRequest extends Protocol { } export interface HttpWithBodyRequest extends HttpRequest { /** a normalized value for the media type (ie, distills down to a well-known moniker (ie, 'json')) */ knownMediaType: KnownMediaType; /** must contain at least one media type to send for the body */ mediaTypes: Array; } export declare class HttpWithBodyRequest extends HttpRequest implements HttpWithBodyRequest { constructor(objectInitializer?: Partial); } export interface HttpBinaryRequest extends HttpWithBodyRequest { binary: true; } export declare class HttpBinaryRequest extends HttpWithBodyRequest implements HttpBinaryRequest { } export interface HttpMultipartRequest extends HttpWithBodyRequest { /** indicates that the HTTP Request should be a multipart request * * ie, that it has multiple requests in a single request. */ multipart: true; } export declare class HttpMultipartRequest extends HttpWithBodyRequest implements HttpMultipartRequest { multipart: true; } export interface HttpHeader extends Extensions { header: string; schema: Schema; language: Languages; } export declare class HttpHeader extends Initializer implements HttpHeader { header: string; schema: Schema; constructor(header: string, schema: Schema, objectInitializer?: DeepPartial); } export interface HttpResponse extends Protocol { /** the possible HTTP status codes that this response MUST match one of. */ statusCodes: Array; /** * canonical response type (ie, 'json'). */ knownMediaType?: KnownMediaType; /** * The possible media types that this response MUST match one of. */ mediaTypes?: Array; /** content returned by the service in the HTTP headers */ headers?: Array; /** sets of HTTP headers grouped together into a single schema */ headerGroups?: Array; } export declare class HttpResponse extends Protocol implements HttpResponse { } export interface HttpBinaryResponse extends HttpResponse { /** binary responses */ binary: true; } export declare class HttpBinaryResponse extends HttpResponse implements HttpBinaryResponse { } /** code model metadata for HTTP protocol */ export interface HttpModel extends Protocol { /** a collection of security requirements for the service */ security?: Array; } export declare class HttpModel extends Protocol implements HttpModel { } //# sourceMappingURL=http.d.ts.map