UNPKG

@autorest/powershell

Version:
30 lines 2.04 kB
import { KnownMediaType } from '@azure-tools/codemodel-v3'; import { Expression, ExpressionOrLiteral } from '@azure-tools/codegen-csharp'; import { BackedProperty } from '@azure-tools/codegen-csharp'; import { OneOrMoreStatements } from '@azure-tools/codegen-csharp'; import { Variable } from '@azure-tools/codegen-csharp'; import { EnhancedVariable } from '../extended-variable'; import { State } from '../generator'; import { DeepPartial } from '@azure-tools/codegen'; import { Schema as NewSchema } from '@autorest/codemodel'; 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, mode: Expression): Expression; /** emits an expression serialize this to a HttpContent */ serializeToContent(mediaType: KnownMediaType, mode: Expression): Expression; /** emits the code required to serialize this into a container */ serializeToContainerMember(mediaType: KnownMediaType, container: Variable, serializedName: string, mode: Expression): OneOrMoreStatements; validatePresenceStatement(eventListener: Variable): OneOrMoreStatements; validationStatement(eventListener: Variable): OneOrMoreStatements; private required; schema: NewSchema; serializedName: string; private typeDeclaration; language: any; constructor(name: string, schema: NewSchema, isRequired: boolean, serializedName: string, description: string, state: State, objectInitializer?: DeepPartial<ModelProperty>); } //# sourceMappingURL=property.d.ts.map