@microsoft.azure/autorest.incubator
Version:
AutoRest incubator project
29 lines • 1.81 kB
TypeScript
import { KnownMediaType } from '#common/media-types';
import { Expression, ExpressionOrLiteral } from '#csharp/code-dom/expression';
import { OneOrMoreStatements } from '#csharp/code-dom/statements/statement';
import { Variable } from '#csharp/code-dom/variable';
import { Schema } from '#csharp/lowlevel-generator/code-model';
import { EnhancedTypeDeclaration } from './extended-type-declaration';
/** A ETD for the c# string type. */
export declare class String implements EnhancedTypeDeclaration {
schema: Schema;
isRequired: boolean;
isXmlAttribute: boolean;
deserializeFromContainerMember(mediaType: KnownMediaType, container: ExpressionOrLiteral, serializedName: string, defaultValue: Expression): Expression;
deserializeFromNode(mediaType: KnownMediaType, node: ExpressionOrLiteral, defaultValue: Expression): Expression;
/** emits an expression serialize this to a HttpContent */
serializeToContent(mediaType: KnownMediaType, value: ExpressionOrLiteral): Expression;
serializeToNode(mediaType: KnownMediaType, value: ExpressionOrLiteral, serializedName: string): Expression;
/** emits an expression to deserialize content from a string */
deserializeFromString(mediaType: KnownMediaType, content: ExpressionOrLiteral, defaultValue: Expression): Expression | undefined;
serializeToContainerMember(mediaType: KnownMediaType, value: ExpressionOrLiteral, container: Variable, serializedName: string): OneOrMoreStatements;
constructor(schema: Schema, isRequired: boolean);
readonly declaration: string;
validateValue(property: Variable): string;
validatePresence(property: Variable): string;
private validateMinLength;
private validateMaxLength;
private validateRegex;
private validateEnum;
}
//# sourceMappingURL=string.d.ts.map