UNPKG

@autorest/powershell

Version:
52 lines 3.12 kB
import { KnownMediaType } from '@azure-tools/codemodel-v3'; import { DeepPartial } from '@azure-tools/codegen'; import { Class, Expression, ExpressionOrLiteral, Field, Namespace, OneOrMoreStatements, TypeDeclaration, Variable } from '@azure-tools/codegen-csharp'; import { State } from '../generator'; import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration'; import { ObjectImplementation } from '../schema/object'; import { ModelProperty } from './property'; import { ObjectSchema } from '@autorest/codemodel'; import { VirtualProperty as NewVirtualProperty } from '../../utils/schema'; export declare function getVirtualPropertyName(vp?: NewVirtualProperty): string; export interface BackingField { field: Field; typeDeclaration: TypeDeclaration; className: string; } export declare class ModelClass extends Class implements EnhancedTypeDeclaration { deserializeFromContainerMember(mediaType: KnownMediaType, container: ExpressionOrLiteral, serializedName: string, defaultValue: Expression): Expression; deserializeFromNode(mediaType: KnownMediaType, node: ExpressionOrLiteral, defaultValue: Expression): Expression; serializeToNode(mediaType: KnownMediaType, value: ExpressionOrLiteral, serializedName: string, mode: Expression): Expression; get defaultOfType(): Expression; get convertObjectMethod(): string; /** emits an expression serialize this to a HttpContent */ serializeToContent(mediaType: KnownMediaType, value: ExpressionOrLiteral, mode: Expression): Expression; /** emits an expression to deserialize content from a string */ deserializeFromString(mediaType: KnownMediaType, content: ExpressionOrLiteral, defaultValue: Expression): Expression | undefined; /** emits an expression to deserialize content from a content/response */ deserializeFromResponse(mediaType: KnownMediaType, content: ExpressionOrLiteral, defaultValue: Expression): Expression | undefined; serializeToContainerMember(mediaType: KnownMediaType, value: ExpressionOrLiteral, container: Variable, serializedName: string, mode: Expression): OneOrMoreStatements; get isXmlAttribute(): boolean; isNullable: boolean; get isRequired(): boolean; isPolymorphic: boolean; get schema(): ObjectSchema; private readonly validationStatements; ownedProperties: ModelProperty[]; private pMap; constructor(namespace: Namespace, schemaWithFeatures: ObjectImplementation, state: State, objectInitializer?: DeepPartial<ModelClass>); private nested; private accessor; private createProperties; private addFormatAttributesToProperty; private addValidation; private additionalPropertiesType; private handleAllOf; private handleDiscriminator; private addHeaderDeserializer; private appendResourceGroupName; validateValue(eventListener: Variable, property: Variable): OneOrMoreStatements; validatePresence(eventListener: Variable, property: Variable): OneOrMoreStatements; addDiscriminator(discriminatorValue: string, modelClass: ModelClass): void; } //# sourceMappingURL=model-class.d.ts.map