UNPKG

@microsoft.azure/autorest.incubator

Version:
54 lines 3.96 kB
import { Method } from '#csharp/code-dom/method'; import { Parameter } from '#csharp/code-dom/parameter'; import { OneOrMoreStatements } from '#csharp/code-dom/statements/statement'; import { EnhancedVariable } from '#csharp/lowlevel-generator/extended-variable'; import { EnhancedTypeDeclaration } from '#csharp/schema/extended-type-declaration'; import { State } from '../generator'; import { HttpOperationParameter, Schema } from '#csharp/lowlevel-generator/code-model'; import { KnownMediaType } from '#common/media-types'; import { ExpressionOrLiteral, Expression } from '#csharp/code-dom/expression'; import { Variable } from '#csharp/code-dom/variable'; /** represents a method parameter for an http operation (header/cookie/query/path) */ export declare class OperationParameter extends Parameter implements EnhancedVariable { typeDeclaration: EnhancedTypeDeclaration; param: HttpOperationParameter; constructor(parent: Method, param: HttpOperationParameter, state: State, objectInitializer?: Partial<OperationParameter>); /** emits an expression to deserialize a property from a member inside a container */ deserializeFromContainerMember(mediaType: KnownMediaType, container: ExpressionOrLiteral, serializedName: string): Expression; /** emits an expression to deserialze a container as the value itself. */ deserializeFromNode(mediaType: KnownMediaType, node: ExpressionOrLiteral): Expression; /** emits an expression serialize this to the value required by the container */ serializeToNode(mediaType: KnownMediaType, serializedName: string): Expression; /** emits an expression serialize this to a HttpContent */ serializeToContent(mediaType: KnownMediaType): Expression; /** emits the code required to serialize this into a container */ serializeToContainerMember(mediaType: KnownMediaType, container: Variable, serializedName: string): OneOrMoreStatements; readonly validatePresenceStatement: OneOrMoreStatements; readonly validationStatement: OneOrMoreStatements; } /** represents a method parameter for an http operation (body) */ export declare class OperationBodyParameter extends Parameter implements EnhancedVariable { /** emits an expression to deserialize a property from a member inside a container */ deserializeFromContainerMember(mediaType: KnownMediaType, container: ExpressionOrLiteral, serializedName: string): Expression; /** emits an expression to deserialze a container as the value itself. */ deserializeFromNode(mediaType: KnownMediaType, node: ExpressionOrLiteral): Expression; /** emits an expression serialize this to the value required by the container */ serializeToNode(mediaType: KnownMediaType, serializedName: string): Expression; /** emits an expression serialize this to a HttpContent */ serializeToContent(mediaType: KnownMediaType): Expression; /** emits the code required to serialize this into a container */ serializeToContainerMember(mediaType: KnownMediaType, container: Variable, serializedName: string): OneOrMoreStatements; readonly validatePresenceStatement: OneOrMoreStatements; readonly validationStatement: OneOrMoreStatements; mediaType: KnownMediaType; typeDeclaration: EnhancedTypeDeclaration; constructor(parent: Method, name: string, description: string, schema: Schema, required: boolean, state: State, objectInitializer?: Partial<OperationBodyParameter>); readonly jsonSerializationStatement: OneOrMoreStatements; readonly jsonDeserializationStatement: OneOrMoreStatements; } export declare class CallbackParameter extends Parameter { responseType: (EnhancedTypeDeclaration) | null; headerType: (EnhancedTypeDeclaration) | null; constructor(name: string, responseType: (EnhancedTypeDeclaration) | null, headerType: (EnhancedTypeDeclaration) | null, state: State, objectInitializer?: Partial<CallbackParameter>); } //# sourceMappingURL=parameter.d.ts.map