@azure-tools/typespec-java
Version:
TypeSpec library for emitting Java client from the TypeSpec REST protocol binding
30 lines • 1.66 kB
TypeScript
import { ChoiceValue, PrimitiveSchema, Schema, SchemaType, StringSchema, ValueSchema } from "@autorest/codemodel";
import { DeepPartial } from "@azure-tools/codegen";
import { SchemaUsage } from "./usage.js";
/** a schema that represents a choice of several values (ie, an 'enum') */
export interface ChoiceSchema<ChoiceType extends PrimitiveSchema = StringSchema> extends ValueSchema, SchemaUsage {
/** the schema type */
type: SchemaType.Choice;
/** the primitive type for the choices */
choiceType: ChoiceType;
/** the possible choices for in the set */
choices: Array<ChoiceValue>;
crossLanguageDefinitionId?: string;
}
export declare class ChoiceSchema<ChoiceType extends PrimitiveSchema = StringSchema> extends Schema implements ChoiceSchema<ChoiceType> {
constructor(name: string, description: string, objectInitializer?: DeepPartial<ChoiceSchema<ChoiceType>>);
}
/** a schema that represents a choice of several values (ie, an 'enum') */
export interface SealedChoiceSchema<ChoiceType extends PrimitiveSchema = StringSchema> extends ValueSchema, SchemaUsage {
/** the schema type */
type: SchemaType.SealedChoice;
/** the primitive type for the choices */
choiceType: ChoiceType;
/** the possible choices for in the set */
choices: Array<ChoiceValue>;
crossLanguageDefinitionId?: string;
}
export declare class SealedChoiceSchema<ChoiceType extends PrimitiveSchema = StringSchema> extends Schema implements SealedChoiceSchema<ChoiceType> {
constructor(name: string, description: string, objectInitializer?: DeepPartial<ChoiceSchema<ChoiceType>>);
}
//# sourceMappingURL=choice.d.ts.map