google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
320 lines (319 loc) • 12 kB
TypeScript
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { SourcePosition } from "../../v1alpha1/syntax";
import { ExprValue } from "../../v1alpha1/eval";
import { CheckedExpr } from "../../v1alpha1/checked";
import { Decl } from "../../v1alpha1/checked";
import { Status } from "../../../../rpc/status";
import { ParsedExpr } from "../../v1alpha1/syntax";
/**
* Request message for the Parse method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.ParseRequest
*/
export interface ParseRequest {
/**
* Required. Source text in CEL syntax.
*
* @generated from protobuf field: string cel_source = 1;
*/
celSource: string;
/**
* Tag for version of CEL syntax, for future use.
*
* @generated from protobuf field: string syntax_version = 2;
*/
syntaxVersion: string;
/**
* File or resource for source text, used in [SourceInfo][google.api.SourceInfo].
*
* @generated from protobuf field: string source_location = 3;
*/
sourceLocation: string;
/**
* Prevent macro expansion. See "Macros" in Language Defiinition.
*
* @generated from protobuf field: bool disable_macros = 4;
*/
disableMacros: boolean;
}
/**
* Response message for the Parse method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.ParseResponse
*/
export interface ParseResponse {
/**
* The parsed representation, or unset if parsing failed.
*
* @generated from protobuf field: google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1;
*/
parsedExpr?: ParsedExpr;
/**
* Any number of issues with [StatusDetails][] as the details.
*
* @generated from protobuf field: repeated google.rpc.Status issues = 2;
*/
issues: Status[];
}
/**
* Request message for the Check method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.CheckRequest
*/
export interface CheckRequest {
/**
* Required. The parsed representation of the CEL program.
*
* @generated from protobuf field: google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1;
*/
parsedExpr?: ParsedExpr;
/**
* Declarations of types for external variables and functions.
* Required if program uses external variables or functions
* not in the default environment.
*
* @generated from protobuf field: repeated google.api.expr.v1alpha1.Decl type_env = 2;
*/
typeEnv: Decl[];
/**
* The protocol buffer context. See "Name Resolution" in the
* Language Definition.
*
* @generated from protobuf field: string container = 3;
*/
container: string;
/**
* If true, use only the declarations in [type_env][google.api.expr.conformance.v1alpha1.CheckRequest.type_env]. If false (default),
* add declarations for the standard definitions to the type environment. See
* "Standard Definitions" in the Language Definition.
*
* @generated from protobuf field: bool no_std_env = 4;
*/
noStdEnv: boolean;
}
/**
* Response message for the Check method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.CheckResponse
*/
export interface CheckResponse {
/**
* The annotated representation, or unset if checking failed.
*
* @generated from protobuf field: google.api.expr.v1alpha1.CheckedExpr checked_expr = 1;
*/
checkedExpr?: CheckedExpr;
/**
* Any number of issues with [StatusDetails][] as the details.
*
* @generated from protobuf field: repeated google.rpc.Status issues = 2;
*/
issues: Status[];
}
/**
* Request message for the Eval method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.EvalRequest
*/
export interface EvalRequest {
/**
* @generated from protobuf oneof: expr_kind
*/
exprKind: {
oneofKind: "parsedExpr";
/**
* Evaluate based on the parsed representation.
*
* @generated from protobuf field: google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1;
*/
parsedExpr: ParsedExpr;
} | {
oneofKind: "checkedExpr";
/**
* Evaluate based on the checked representation.
*
* @generated from protobuf field: google.api.expr.v1alpha1.CheckedExpr checked_expr = 2;
*/
checkedExpr: CheckedExpr;
} | {
oneofKind: undefined;
};
/**
* Bindings for the external variables. The types SHOULD be compatible
* with the type environment in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
*
* @generated from protobuf field: map<string, google.api.expr.v1alpha1.ExprValue> bindings = 3;
*/
bindings: {
[key: string]: ExprValue;
};
/**
* SHOULD be the same container as used in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
*
* @generated from protobuf field: string container = 4;
*/
container: string;
}
/**
* Response message for the Eval method.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.EvalResponse
*/
export interface EvalResponse {
/**
* The execution result, or unset if execution couldn't start.
*
* @generated from protobuf field: google.api.expr.v1alpha1.ExprValue result = 1;
*/
result?: ExprValue;
/**
* Any number of issues with [StatusDetails][] as the details.
* Note that CEL execution errors are reified into [ExprValue][].
* Nevertheless, we'll allow out-of-band issues to be raised,
* which also makes the replies more regular.
*
* @generated from protobuf field: repeated google.rpc.Status issues = 2;
*/
issues: Status[];
}
/**
* Warnings or errors in service execution are represented by
* [google.rpc.Status][google.rpc.Status] messages, with the following message
* in the details field.
*
* @generated from protobuf message google.api.expr.conformance.v1alpha1.IssueDetails
*/
export interface IssueDetails {
/**
* The severity of the issue.
*
* @generated from protobuf field: google.api.expr.conformance.v1alpha1.IssueDetails.Severity severity = 1;
*/
severity: IssueDetails_Severity;
/**
* Position in the source, if known.
*
* @generated from protobuf field: google.api.expr.v1alpha1.SourcePosition position = 2;
*/
position?: SourcePosition;
/**
* Expression ID from [Expr][], 0 if unknown.
*
* @generated from protobuf field: int64 id = 3;
*/
id: bigint;
}
/**
* Severities of issues.
*
* @generated from protobuf enum google.api.expr.conformance.v1alpha1.IssueDetails.Severity
*/
export declare enum IssueDetails_Severity {
/**
* An unspecified severity.
*
* @generated from protobuf enum value: SEVERITY_UNSPECIFIED = 0;
*/
SEVERITY_UNSPECIFIED = 0,
/**
* Deprecation issue for statements and method that may no longer be
* supported or maintained.
*
* @generated from protobuf enum value: DEPRECATION = 1;
*/
DEPRECATION = 1,
/**
* Warnings such as: unused variables.
*
* @generated from protobuf enum value: WARNING = 2;
*/
WARNING = 2,
/**
* Errors such as: unmatched curly braces or variable redefinition.
*
* @generated from protobuf enum value: ERROR = 3;
*/
ERROR = 3
}
declare class ParseRequest$Type extends MessageType<ParseRequest> {
constructor();
create(value?: PartialMessage<ParseRequest>): ParseRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParseRequest): ParseRequest;
internalBinaryWrite(message: ParseRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.ParseRequest
*/
export declare const ParseRequest: ParseRequest$Type;
declare class ParseResponse$Type extends MessageType<ParseResponse> {
constructor();
create(value?: PartialMessage<ParseResponse>): ParseResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParseResponse): ParseResponse;
internalBinaryWrite(message: ParseResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.ParseResponse
*/
export declare const ParseResponse: ParseResponse$Type;
declare class CheckRequest$Type extends MessageType<CheckRequest> {
constructor();
create(value?: PartialMessage<CheckRequest>): CheckRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckRequest): CheckRequest;
internalBinaryWrite(message: CheckRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.CheckRequest
*/
export declare const CheckRequest: CheckRequest$Type;
declare class CheckResponse$Type extends MessageType<CheckResponse> {
constructor();
create(value?: PartialMessage<CheckResponse>): CheckResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckResponse): CheckResponse;
internalBinaryWrite(message: CheckResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.CheckResponse
*/
export declare const CheckResponse: CheckResponse$Type;
declare class EvalRequest$Type extends MessageType<EvalRequest> {
constructor();
create(value?: PartialMessage<EvalRequest>): EvalRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EvalRequest): EvalRequest;
private binaryReadMap3;
internalBinaryWrite(message: EvalRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.EvalRequest
*/
export declare const EvalRequest: EvalRequest$Type;
declare class EvalResponse$Type extends MessageType<EvalResponse> {
constructor();
create(value?: PartialMessage<EvalResponse>): EvalResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EvalResponse): EvalResponse;
internalBinaryWrite(message: EvalResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.EvalResponse
*/
export declare const EvalResponse: EvalResponse$Type;
declare class IssueDetails$Type extends MessageType<IssueDetails> {
constructor();
create(value?: PartialMessage<IssueDetails>): IssueDetails;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IssueDetails): IssueDetails;
internalBinaryWrite(message: IssueDetails, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.expr.conformance.v1alpha1.IssueDetails
*/
export declare const IssueDetails: IssueDetails$Type;
/**
* @generated ServiceType for protobuf service google.api.expr.conformance.v1alpha1.ConformanceService
*/
export declare const ConformanceService: ServiceType;
export {};