UNPKG

@microsoft.azure/autorest.incubator

Version:
30 lines 1.95 kB
import { BackedProperty } from '#csharp/code-dom/property'; import { OneOrMoreStatements } from '#csharp/code-dom/statements/statement'; import { State } from '../generator'; import { ModelClass } from './model-class'; import { Schema, Property } from '#csharp/lowlevel-generator/code-model'; import { EnhancedVariable } from '#csharp/lowlevel-generator/extended-variable'; import { KnownMediaType } from '#common/media-types'; import { ExpressionOrLiteral, Expression } from '#csharp/code-dom/expression'; import { Variable } from '#csharp/code-dom/variable'; export declare class ModelProperty extends BackedProperty 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; private required; IsHeaderProperty: boolean; schema: Schema; serializedName: string; private typeDeclaration; constructor(parent: ModelClass, property: Property, serializedName: string, state: State, objectInitializer?: Partial<ModelProperty>); readonly validatePresenceStatement: OneOrMoreStatements; readonly validationStatement: OneOrMoreStatements; } //# sourceMappingURL=property.d.ts.map