import { AccessFlags, CollectionFormat, DecoratorInfo, InitializedByFlags, SdkBuiltInKinds, SerializationOptions, UsageFlags } from "@azure-tools/typespec-client-generator-core";
import { DateTimeKnownEncoding, DurationKnownEncoding } from "@typespec/compiler";
import { InputConstant } from "./input-constant.js";
import { InputParameterScope } from "./input-parameter-scope.js";
import { InputServiceMethod } from "./input-service-method.js";
import { RequestLocation } from "./request-location.js";
/**
 * External type information for types that map to external library types.
 * @beta
 */
export interface InputExternalTypeMetadata {
    identity: string;
    package?: string;
    minVersion?: string;
}
/**
 * The input client type for the CSharp emitter.
 * @beta
 */
export interface InputClient extends DecoratedType {
    kind: "client";
    name: string;
    namespace: string;
    doc?: string;
    summary?: string;
    parameters?: InputParameter[];
    initializedBy?: InitializedByFlags;
    methods: InputServiceMethod[];
    apiVersions: string[];
    crossLanguageDefinitionId: string;
    parent?: InputClient;
    children?: InputClient[];
    isMultiServiceClient: boolean;
}
/**
 * The input namespace type for the CSharp emitter.
 * @beta
 */
export interface InputNamespace extends DecoratedType {
    name: string;
    fullName: string;
    namespaces: InputNamespace[];
}
interface DecoratedType {
    decorators?: DecoratorInfo[];
}
interface InputTypeBase extends DecoratedType {
    kind: string;
    summary?: string;
    doc?: string;
    deprecation?: string;
    external?: InputExternalTypeMetadata;
}
export type InputType = InputPrimitiveType | InputDateTimeType | InputDurationType | InputLiteralType | InputUnionType | InputModelType | InputEnumType | InputEnumValueType | InputArrayType | InputDictionaryType | InputNullableType;
export interface InputPrimitiveType extends InputTypeBase {
    kind: SdkBuiltInKinds;
    name: string;
    encode?: string;
    crossLanguageDefinitionId: string;
    baseType?: InputPrimitiveType;
}
export interface InputLiteralType extends InputTypeBase {
    kind: "constant";
    name: string;
    access?: AccessFlags;
    usage: UsageFlags;
    namespace: string;
    valueType: InputPrimitiveType;
    value: string | number | boolean | null;
}
export declare function isInputLiteralType(type: InputType): type is InputLiteralType;
export type InputDateTimeType = InputUtcDateTimeType | InputOffsetDateTimeType;
interface InputDateTimeTypeBase extends InputTypeBase {
    name: string;
    encode: DateTimeKnownEncoding | string;
    wireType: InputPrimitiveType;
    crossLanguageDefinitionId: string;
    baseType?: InputDateTimeType;
}
export interface InputUtcDateTimeType extends InputDateTimeTypeBase {
    kind: "utcDateTime";
}
export interface InputOffsetDateTimeType extends InputDateTimeTypeBase {
    kind: "offsetDateTime";
}
export interface InputDurationType extends InputTypeBase {
    kind: "duration";
    name: string;
    encode: DurationKnownEncoding | string;
    wireType: InputPrimitiveType;
    crossLanguageDefinitionId: string;
    baseType?: InputDurationType;
}
export interface InputUnionType extends InputTypeBase {
    kind: "union";
    name: string;
    variantTypes: InputType[];
    namespace: string;
}
export declare function isInputUnionType(type: InputType): type is InputUnionType;
/**
 * The input model type for the CSharp emitter.
 * @beta
 */
export interface InputModelType extends InputTypeBase {
    kind: "model";
    properties: InputModelProperty[];
    name: string;
    crossLanguageDefinitionId: string;
    access?: AccessFlags;
    usage: UsageFlags;
    namespace: string;
    additionalProperties?: InputType;
    discriminatorValue?: string;
    discriminatedSubtypes?: Record<string, InputModelType>;
    discriminatorProperty?: InputModelProperty;
    baseModel?: InputModelType;
    serializationOptions: SerializationOptions;
}
export interface InputPropertyTypeBase extends DecoratedType {
    type: InputType;
    name: string;
    doc?: string;
    summary?: string;
    isApiVersion: boolean;
    defaultValue?: InputConstant;
    optional: boolean;
    crossLanguageDefinitionId: string;
    readOnly: boolean;
    access?: AccessFlags;
}
export interface InputModelProperty extends InputPropertyTypeBase {
    kind: "property";
    discriminator: boolean;
    serializedName: string;
    serializationOptions: SerializationOptions;
    flatten: boolean;
    isHttpMetadata: boolean;
    encode?: string;
}
export type InputProperty = InputModelProperty | InputParameter;
export type InputHttpParameter = InputQueryParameter | InputPathParameter | InputHeaderParameter | InputBodyParameter;
export type InputParameter = InputMethodParameter | InputEndpointParameter | InputHttpParameter;
export interface InputMethodParameter extends InputPropertyTypeBase {
    kind: "method";
    location: RequestLocation;
    scope: InputParameterScope;
    serializedName: string;
}
export interface InputQueryParameter extends InputPropertyTypeBase {
    kind: "query";
    collectionFormat?: CollectionFormat;
    arraySerializationDelimiter?: string;
    explode: boolean;
    scope: InputParameterScope;
    serializedName: string;
    methodParameterSegments?: InputMethodParameter[];
}
export interface InputPathParameter extends InputPropertyTypeBase {
    kind: "path";
    explode: boolean;
    style: "simple" | "label" | "matrix" | "fragment" | "path";
    allowReserved: boolean;
    skipUrlEncoding: boolean;
    serverUrlTemplate?: string;
    scope: InputParameterScope;
    serializedName: string;
    methodParameterSegments?: InputMethodParameter[];
}
export interface InputHeaderParameter extends InputPropertyTypeBase {
    kind: "header";
    collectionFormat?: CollectionFormat;
    arraySerializationDelimiter?: string;
    isContentType: boolean;
    scope: InputParameterScope;
    serializedName: string;
    methodParameterSegments?: InputMethodParameter[];
}
export interface InputBodyParameter extends InputPropertyTypeBase {
    kind: "body";
    contentTypes: string[];
    defaultContentType: string;
    scope: InputParameterScope;
    serializedName: string;
    methodParameterSegments?: InputMethodParameter[];
}
export interface InputEndpointParameter extends InputPropertyTypeBase {
    kind: "endpoint";
    skipUrlEncoding: boolean;
    serverUrlTemplate?: string;
    scope: InputParameterScope;
    serializedName: string;
    isEndpoint: boolean;
    methodParameterSegments?: InputMethodParameter[];
}
export interface InputEnumType extends InputTypeBase {
    kind: "enum";
    name: string;
    crossLanguageDefinitionId: string;
    valueType: InputPrimitiveType;
    values: InputEnumValueType[];
    isFixed: boolean;
    isFlags: boolean;
    usage: UsageFlags;
    access?: AccessFlags;
    namespace: string;
}
export interface InputEnumValueType extends InputTypeBase {
    kind: "enumvalue";
    name: string;
    value: string | number;
    enumType: InputEnumType;
    valueType: InputPrimitiveType;
}
export interface InputNullableType extends InputTypeBase {
    kind: "nullable";
    type: InputType;
    namespace: string;
}
export interface InputArrayType extends InputTypeBase {
    kind: "array";
    name: string;
    valueType: InputType;
    crossLanguageDefinitionId: string;
}
export interface InputDictionaryType extends InputTypeBase {
    kind: "dict";
    keyType: InputType;
    valueType: InputType;
}
export {};
//# sourceMappingURL=input-type.d.ts.map