import * as go from '../../../codemodel.go/src/index.js';
import { ImportManager } from './imports.js';
export declare const commentLength = 120;
export declare const plainDateFormat = "time.DateOnly";
export declare const RFC3339Format = "time.RFC3339Nano";
export declare const RFC1123Format = "time.RFC1123";
export declare const plainTimeFormat = "time.TimeOnly";
export declare const doNotEditRegex: RegExp;
/**
 * sets the specified content to use as the header text comment per file.
 *
 * @param headerText the custom header text to use
 */
export declare function setCustomHeaderText(headerText: string): void;
/**
 * returns the common source-file preamble (license comment, package name etc)
 *
 * @param pkg the package to use in the package declaration
 * @param doNotEdit when false the 'DO NOT EDIT' clause is omitted
 * @returns the source file preamble
 */
export declare function contentPreamble(pkg: go.FakePackage | go.PackageContent | go.TestPackage, doNotEdit?: boolean): string;
export declare function sortAscending(a: string, b: string): number;
/**
 * returns the parameter's type definition with a possible '*' prefix
 *
 * @param scope the package into which the type definition is being emitted
 * @param param the parameter for which to emit the type definition
 * @returns the parameter type definition text
 */
export declare function formatParameterTypeName(scope: go.PackageType, param: go.ClientOptionsType | go.ClientParameter | go.ParameterGroup): string;
export declare function sortParametersByRequired(a: go.ClientParameter | go.ParameterGroup, b: go.ClientParameter | go.ParameterGroup): number;
/**
 * sort client parameters based on the API design guidelines.
 * the params array is sorted in place and returned to the caller.
 *
 * @param params the client parameters to sort
 * @param type the Go code model type
 * @returns the provided array after it's been sorted
 */
export declare function sortClientParameters(params: Array<go.ClientParameter>, type: go.CodeModelType): Array<go.ClientParameter>;
export declare function getCreateRequestParametersSig(method: go.MethodType | go.NextPageMethod): string;
/**
 * returns the parameter names for an operation (excludes the param types).
 * e.g. "i, s"
 *
 * @param method the method containing the params
 * @param optionsParam optional custom param name for the method options param
 * @returns the text for the parameters
 */
export declare function getCreateRequestParameters(method: go.MethodType, optionsParam?: string): string;
export declare function getMethodParameters(method: go.MethodType | go.NextPageMethod, paramsFilter?: (p: Array<go.MethodParameter>) => Array<go.MethodParameter>): Array<go.MethodParameter | go.ParameterGroup>;
export declare function getParamName(param: go.MethodParameter): string;
export declare function formatBytesEncoding(enc: go.BytesEncoding): string;
export declare function formatParamValue(param: go.MethodParameter, imports: ImportManager, indent: Indentation): string;
export declare function getDelimiterForCollectionFormat(cf: go.CollectionFormat): string;
export declare function formatValue(paramName: string, type: go.WireType, imports: ImportManager, defef?: boolean): string;
export declare function formatLiteralValue(value: go.Literal, withCast: boolean): string;
export declare function hasSchemaResponse(method: go.MethodType): boolean;
export declare function getResultFieldName(method: go.MethodType): string;
export declare function formatStatusCodes(statusCodes: Array<number>): string;
export declare function formatStatusCode(statusCode: number): string;
export declare function formatCommentAsBulletItem(prefix: string, docs: go.Docs): string;
export declare function formatDocCommentWithPrefix(prefix: string, docs: go.Docs): string;
export declare function formatDocComment(docs: go.Docs): string;
export declare function getBitSizeForNumber(intSize: 'float32' | 'float64' | 'int8' | 'int16' | 'int32' | 'int64'): string;
export declare function recursiveUnwrapMapSlice(item: go.WireType): go.WireType;
/**
 * returns a * character when byValue is false
 *
 * @param byValue indicates if the type is passed by value
 * @returns a * or the empty string
 */
export declare function star(byValue: boolean): string;
/**
 * returns the zero-value expression for the specific parameter
 *
 * @param param the param for which to create a zero value
 * @returns the zero-value expression
 */
export declare function zeroValue(param: go.MethodParameter): string;
export type SerDeFormat = 'JSON' | 'XML';
export declare function getSerDeFormat(model: go.Model | go.PolymorphicModel, pkg: go.PackageContent): SerDeFormat;
export declare function getAllClientParameters(pkg: go.PackageContent, target: go.CodeModelType): Array<go.ClientParameter>;
export declare function getCommonClientParameters(pkg: go.PackageContent, target: go.CodeModelType): Array<go.ClientParameter>;
/**
 * groups method parameters based on their kind.
 * note that the body param kinds are mutually exclusive.
 */
export interface MethodParamGroups {
    /** the body parameter if applicable */
    bodyParam?: go.BodyParameter;
    /** encoded query params. can be empty */
    encodedQueryParams: Array<go.QueryParameter>;
    /** form body params. can be empty */
    formBodyParams: Array<go.FormBodyParameter>;
    /** head params. can be empty */
    headerParams: Array<go.HeaderParameter>;
    /** multipart-form body params. can be empty */
    multipartBodyParams: Array<go.MultipartFormBodyParameter>;
    /** path params. can be empty */
    pathParams: Array<go.PathParameter>;
    /** partial body params. can be empty */
    partialBodyParams: Array<go.PartialBodyParameter>;
    /** unencoded query params. can be empty */
    unencodedQueryParams: Array<go.QueryParameter>;
}
/**
 * enumerates method parameters and returns them based on kinds
 *
 * @param method the method containing the parameters to group
 * @returns the groups of parameters
 */
export declare function getMethodParamGroups(method: go.MethodType | go.NextPageMethod): MethodParamGroups;
/** helper for managing indentation levels */
export declare class Indentation {
    private level;
    constructor(level?: number);
    /**
     * returns tabs for the current indentation level
     *
     * @returns a string with the current indentation level
     */
    get(): string;
    /**
     * increments the indentation level
     *
     * @returns this indentation instance
     */
    push(): Indentation;
    /**
     * decrements the indentation level
     *
     * @returns this indentation instance
     */
    pop(): Indentation;
}
/** the if condition in an if block */
export interface ifBlock {
    /** the condition in the if block */
    condition: string;
    /** the body of the if block */
    body: (indent: Indentation) => string;
}
/** the else condition in an if/else block */
export interface elseBlock {
    /** the body of the else block */
    body: (indent: Indentation) => string;
}
/**
 * constructs an if block (can expand to include else if as necessary)
 *
 * @param indent the current indentation helper in scope
 * @param ifBlock the if block definition
 * @param elseBlock optional else block definition
 * @returns the text for the if block
 */
export declare function buildIfBlock(indent: Indentation, ifBlock: ifBlock, elseBlock?: elseBlock): string;
/**
 * constructs an "if err != nil { return something }" block
 *
 * @param indent the current indentation helper in scope
 * @param errVar the name of the error variable used in the condition
 * @param returns optional value besides the error to return from the control block
 * @returns the text for the error check block
 */
export declare function buildErrCheck(indent: Indentation, errVar: string, returns?: string): string;
/**
 * splits a token credential scope into the audience and scope.
 * e.g. "https://monitor.azure.com/.default" is split into
 *   - audience: https://monitor.azure.com
 *   -    scope: /.default
 * @param scope
 */
export declare function splitScope(scope: string): {
    audience: string;
    scope: string;
};
/** returns true if the specified method is internal */
export declare function isMethodInternal(method: go.MethodType): boolean;
/**
 * returns true if the provided client has no exported methods
 *
 * @param client the client containing the methods
 * @returns true if all client methods are internal
 */
export declare function clientHasNoExportedMethods(client: go.Client): boolean;
/**
 * provides access to the next link field, handling nested fields as required.
 * e.g. var.Foo.Bar
 *
 * @param strategy the next link pageable strategy
 * @returns the complete path to the next link
 */
export declare function buildNextLinkPath(strategy: go.PageableStrategyNextLink): string;
export declare function camelCase(identifier: string | Array<string>): string;
export declare function pascalCase(identifier: string | Array<string>, removeDuplicates?: boolean): string;
export declare function comment(content: string, prefix?: string, factor?: number, maxLength?: number): string;
//# sourceMappingURL=helpers.d.ts.map