import { Client, ClientOptions } from './client.js';
import { PackageContent, PackageType } from './module.js';
import { ParameterGroup } from './param.js';
import { ResponseEnvelope } from './result.js';
/** Docs contains the values used in doc comment generation. */
export interface Docs {
    /** the high level summary */
    summary?: string;
    /** detailed description */
    description?: string;
}
/** defines types used in generated code but do not go across the wire */
export type SdkType = ArmClientOptions | ClientOptions | ParameterGroup | ResponseEnvelope | TokenCredential;
/** defines types that go across the wire */
export type WireType = Any | Constant | ConstantDef | ConstantValue | EncodedBytes | ETag | Interface | Literal | Map | Model | MultipartContent | PolymorphicModel | RawJSON | ReadCloser | ReadSeekCloser | Scalar | Slice | String | Time;
/** defines a type within the Go type system */
export type Type = SdkType | WireType;
/** the Go any type */
export interface Any {
    kind: 'any';
}
/** an arm.ClientOptions type from azcore */
export interface ArmClientOptions extends QualifiedType {
    kind: 'armClientOptions';
}
/** a const type definition used for enums */
export interface Constant {
    kind: 'constant';
    /** the const type name */
    name: string;
    /** any docs for the const type */
    docs: Docs;
    /** the package to which this type belongs */
    pkg: PackageContent;
    /** the underlying type of the const */
    type: ConstantType;
    /** the possible values for this const */
    values: Array<ConstantValue>;
    /** the name of the func that returns the set of values */
    valuesFuncName: string;
}
/** the underlying type of a const */
export type ConstantType = 'bool' | 'float32' | 'float64' | 'int32' | 'int64' | 'string';
/** a const enum value definition */
export interface ConstantValue {
    kind: 'constantValue';
    /** the const value name */
    name: string;
    /** any docs for the const value */
    docs: Docs;
    /** the const to which this value belongs */
    type: Constant;
    /** the value for this const */
    value: ConstantValueType;
}
/** a non-enum constant (e.g. const foo string = "bar") */
export interface ConstantDef {
    kind: 'constantDef';
    /** the name of the constant */
    name: string;
    /** the type and value of the constant */
    literal: Literal<String>;
}
/** the underlying type of a const value */
export type ConstantValueType = boolean | number | string;
/** a byte slice that's base64 encoded */
export interface EncodedBytes {
    kind: 'encodedBytes';
    /** indicates what kind of base64-encoding to use */
    encoding: BytesEncoding;
}
/** the types of base64 encoding */
export type BytesEncoding = 'Std' | 'URL';
/** an azcore.ETag type */
export interface ETag extends QualifiedType {
    kind: 'etag';
}
/** a Go interface type used for discriminated types */
export interface Interface {
    kind: 'interface';
    /** the name of the interface (e.g. FishClassification) */
    name: string;
    /** any docs for the interface */
    docs: Docs;
    /** contains possible concrete type instances (e.g. Flounder, Carp) */
    possibleTypes: Array<PolymorphicModel>;
    /** contains the name of the discriminator field in the JSON (e.g. "fishtype") */
    discriminatorField: string;
    /** does this polymorphic type have a parent (e.g. SalmonClassification has parent FishClassification) */
    parent?: Interface;
    /**  this is the "root" type in the list of polymorphic types (e.g. Fish for FishClassification) */
    rootType: PolymorphicModel;
    /** the package to which this type belongs */
    pkg: PackageContent;
}
/** a literal value (e.g. "foo", 123, true) */
export interface Literal<T extends LiteralType = LiteralType> {
    kind: 'literal';
    /**
     * the literal's underlying type.
     * note that when T is a Constant type,
     * literal will contain a ConstantValue
     */
    type: T;
    /**
     * the value for this literal.
     * usually a boolean, number, or string
     * but it can also be a ConstantValue
     */
    literal: unknown;
}
/** the possible types of literals */
export type LiteralType = Constant | ConstantDef | EncodedBytes | Scalar | String | Time;
/** a Go map type. note that the key is always a string */
export interface Map {
    kind: 'map';
    /** the type of values in the map */
    valueType: MapValueType;
    /** indicates if the map's value type is pointer-to-type or not */
    valueTypeByValue: boolean;
}
/** the set of map value types */
export type MapValueType = WireType;
/** a field within a model */
export interface ModelField extends StructField {
    /** the field's underlying type */
    type: WireType;
    /** the name of the field as it's sent/received over the wire */
    serializedName: string;
    /** metadata for this field */
    annotations: ModelFieldAnnotations;
    /** the value to send over the wire if one isn't specified */
    defaultValue?: Literal;
    /** any XML metadata */
    xml?: XMLInfo;
}
/** additional settings for a model type */
export interface ModelAnnotations {
    /** when true, serde methods will not be generated */
    omitSerDeMethods: boolean;
    /** indicates the model should be converted into multipart/form data */
    multipartFormData: boolean;
}
/** additional settings for a model field */
export interface ModelFieldAnnotations {
    /** the field is required on input and will always be populated on output */
    required: boolean;
    /** the field is read-only and will be populated on output. any set value on input will be ignored */
    readOnly: boolean;
    /** field is JSON additional properties */
    isAdditionalProperties: boolean;
    /** field is the discriminator for a discriminated type */
    isDiscriminator: boolean;
    /** unmarshal an empty string as nil. the default is false */
    unmarshalEmptyStringAsNil: boolean;
}
/** a struct that participates in serialization over the wire */
export interface Model extends ModelBase {
    kind: 'model';
}
/** a streaming.MultipartContent type from azcore */
export interface MultipartContent extends QualifiedType {
    kind: 'multipartContent';
    /** optional, explicit content-type for the payload */
    contentType?: Literal<String>;
}
/** a model that's a discriminated type */
export interface PolymorphicModel extends ModelBase {
    kind: 'polymorphicModel';
    /** the polymorphic interface this type implements */
    interface: Interface;
    /**
     * the value in the JSON that indicates what type was sent over the wire (e.g. goblin, salmon, shark)
     * note that for "root" types (Fish), there is no discriminatorValue. however, "sub-root" types (e.g. Salmon)
     * will have this populated.
     */
    discriminatorValue?: Literal;
}
/** a byte slice containing raw JSON */
export interface RawJSON {
    kind: 'rawJSON';
}
/** a Go scalar type */
export interface Scalar {
    kind: 'scalar';
    /** the type of scalar */
    type: ScalarType;
    /** indicates the value is sent/received as a string */
    encodeAsString: boolean;
}
/** an io.ReadCloser */
export interface ReadCloser extends QualifiedType {
    kind: 'readCloser';
}
/** an io.ReadSeekCloser */
export interface ReadSeekCloser extends QualifiedType {
    kind: 'readSeekCloser';
}
/** the supported Go scalar types */
export type ScalarType = 'bool' | 'byte' | 'float32' | 'float64' | 'int8' | 'int16' | 'int32' | 'int64' | 'rune' | 'uint8' | 'uint16' | 'uint32' | 'uint64';
/** a Go slice */
export interface Slice {
    kind: 'slice';
    /** the element type for this slice */
    elementType: SliceElementType;
    /** indicates if the slice's element type is pointer-to-type or not */
    elementTypeByValue: boolean;
}
/** the set of slice element types */
export type SliceElementType = WireType;
/** a Go string */
export interface String {
    kind: 'string';
}
/** a vanilla struct definition (pretty much exclusively used for parameter groups/options bag types) */
export interface Struct extends StructBase {
    kind: 'struct';
}
/** a field definition within a struct */
export interface StructField {
    /** the name of the field */
    name: string;
    /** and docs for this field */
    docs: Docs;
    /** the field's underlying type */
    type: Type;
    /** indicates if the field is pointer-to-type or not */
    byValue: boolean;
}
/** a time.Time type from the standard library with a format specifier */
export interface Time extends QualifiedType {
    kind: 'time';
    /** the serde format used */
    format: TimeFormat;
    /** indicates if the time is always in UTC */
    utc: boolean;
}
/** the set of time serde formats */
export type TimeFormat = 'PlainDate' | 'RFC1123' | 'RFC3339' | 'PlainTime' | 'Unix';
/** an azcore.TokenCredential */
export interface TokenCredential extends QualifiedType {
    kind: 'tokenCredential';
    /** the scopes to include for the credential */
    scopes: Array<string>;
}
/** bit flags indicating how a model/polymorphic type is used */
export declare enum UsageFlags {
    /** the type is unreferenced */
    None = 0,
    /** the type is received over the wire */
    Input = 1,
    /** the type is sent over the wire */
    Output = 2
}
/** metadata used for XML serde */
export interface XMLInfo {
    /** element name to use instead of the default name */
    name?: string;
    /**
     * name propagated to the generated wrapper type.
     * this is used solely in method bodies to generate
     * a "type wrapper struct" with the specified name.
     */
    wrapper?: string;
    /** slices only. this is the name of the wrapped type */
    wraps?: string;
    /** value is an XML attribute */
    attribute: boolean;
    /** value is raw text */
    text: boolean;
}
/**
 * returns the Go type declaration for the specified LiteralType
 *
 * @param literal the type for which to emit the declaration
 * @returns the Go type declaration
 */
export declare function getLiteralTypeDeclaration(literal: LiteralType): string;
/**
 * returns the Go type declaration for the specified type.
 * if the type is defined in a package that's different from
 * the provided scope, the type declaration will include
 * the type's package name prefix.
 *
 * @param type the type for which to emit the declaration
 * @param scope the scope in which the type declaration is emitted
 * @returns the Go type declaration
 */
export declare function getTypeDeclaration(type: Client | Type, scope: PackageType): string;
/** narrows type to a LiteralType within the conditional block */
export declare function isLiteralValueType(type: WireType): type is LiteralType;
export declare class StructField implements StructField {
    constructor(name: string, type: Type, byValue: boolean);
}
/** used when building types that come from an external package */
export interface QualifiedType {
    /** the type name minus any package qualifier (e.g. URL) */
    name: string;
    /** the full name of the module to import (e.g. "net/url") */
    module: string;
}
export declare class QualifiedType implements QualifiedType {
    constructor(name: string, module: string);
}
interface StructBase {
    /** the name of the struct */
    name: string;
    /** and docs for this struct */
    docs: Docs;
    /** the fields in this struct. can be empty */
    fields: Array<StructField>;
    /** the package to which this type belongs */
    pkg: PackageContent;
}
interface ModelBase extends StructBase {
    /** the fields in this model. can be empty */
    fields: Array<ModelField>;
    /** any annotations for this model */
    annotations: ModelAnnotations;
    /** usage flags for this model */
    usage: UsageFlags;
    /** any XML metadata */
    xml?: XMLInfo;
}
declare class StructBase implements StructBase {
    constructor(pkg: PackageContent, name: string);
}
declare class ModelBase extends StructBase implements ModelBase {
    constructor(pkg: PackageContent, name: string, annotations: ModelAnnotations, usage: UsageFlags);
}
export declare class Any implements Any {
    constructor();
}
export declare class ArmClientOptions extends QualifiedType implements ArmClientOptions {
    constructor();
}
export declare class Constant implements Constant {
    constructor(pkg: PackageContent, name: string, type: ConstantType, valuesFuncName: string);
}
export declare class ConstantDef implements ConstantDef {
    constructor(name: string, literal: Literal<String>);
}
export declare class ConstantValue implements ConstantValue {
    constructor(name: string, type: Constant, value: ConstantValueType);
}
export declare class EncodedBytes implements EncodedBytes {
    constructor(encoding: BytesEncoding);
}
export declare class ETag extends QualifiedType implements ETag {
    constructor();
}
export declare class Interface implements Interface {
    constructor(pkg: PackageContent, name: string, discriminatorField: string);
}
export declare class Literal<T> implements Literal<T> {
    constructor(type: T, literal: unknown);
}
export declare class Map implements Map {
    constructor(valueType: MapValueType, valueTypeByValue: boolean);
}
export declare class ModelAnnotations implements ModelAnnotations {
    constructor(omitSerDe: boolean, multipartForm: boolean);
}
export declare class ModelField extends StructField implements ModelField {
    constructor(name: string, type: WireType, byValue: boolean, serializedName: string, annotations: ModelFieldAnnotations);
}
export declare class ModelFieldAnnotations implements ModelFieldAnnotations {
    constructor(required: boolean, readOnly: boolean, isAddlProps: boolean, isDiscriminator: boolean);
}
export declare class Model extends ModelBase implements Model {
    constructor(pkg: PackageContent, name: string, annotations: ModelAnnotations, usage: UsageFlags);
}
export declare class MultipartContent extends QualifiedType implements MultipartContent {
    constructor(contentType?: Literal<String>);
}
export declare class PolymorphicModel extends ModelBase implements PolymorphicModel {
    constructor(pkg: PackageContent, name: string, iface: Interface, annotations: ModelAnnotations, usage: UsageFlags);
}
export declare class RawJSON implements RawJSON {
    constructor();
}
export declare class ReadCloser extends QualifiedType implements ReadCloser {
    constructor();
}
export declare class ReadSeekCloser extends QualifiedType implements ReadSeekCloser {
    constructor();
}
export declare class Scalar implements Scalar {
    constructor(type: ScalarType, encodeAsString: boolean);
}
export declare class Slice implements Slice {
    constructor(elementType: SliceElementType, elementTypeByValue: boolean);
}
export declare class String implements String {
    constructor();
}
export declare class Struct extends StructBase implements Struct {
    constructor(pkg: PackageContent, name: string);
}
export declare class Time extends QualifiedType implements Time {
    constructor(format: TimeFormat, utc: boolean);
}
export declare class TokenCredential extends QualifiedType implements TokenCredential {
    constructor(scopes: Array<string>);
}
export declare class XMLInfo implements XMLInfo {
    constructor();
}
export {};
//# sourceMappingURL=type.d.ts.map