google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
120 lines (119 loc) • 4.27 kB
TypeScript
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";
/**
* `Context` defines which contexts an API requests.
*
* Example:
*
* context:
* rules:
* - selector: "*"
* requested:
* - google.rpc.context.ProjectContext
* - google.rpc.context.OriginContext
*
* The above specifies that all methods in the API request
* `google.rpc.context.ProjectContext` and
* `google.rpc.context.OriginContext`.
*
* Available context types are defined in package
* `google.rpc.context`.
*
* This also provides mechanism to allowlist any protobuf message extension that
* can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
* “x-goog-ext-<extension_id>-jspb” format. For example, list any service
* specific protobuf types that can appear in grpc metadata as follows in your
* yaml file:
*
* Example:
*
* context:
* rules:
* - selector: "google.example.library.v1.LibraryService.CreateBook"
* allowed_request_extensions:
* - google.foo.v1.NewExtension
* allowed_response_extensions:
* - google.foo.v1.NewExtension
*
* You can also specify extension ID instead of fully qualified extension name
* here.
*
* @generated from protobuf message google.api.Context
*/
export interface Context {
/**
* A list of RPC context rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from protobuf field: repeated google.api.ContextRule rules = 1;
*/
rules: ContextRule[];
}
/**
* A context rule provides information about the context for an individual API
* element.
*
* @generated from protobuf message google.api.ContextRule
*/
export interface ContextRule {
/**
* Selects the methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from protobuf field: string selector = 1;
*/
selector: string;
/**
* A list of full type names of requested contexts.
*
* @generated from protobuf field: repeated string requested = 2;
*/
requested: string[];
/**
* A list of full type names of provided contexts.
*
* @generated from protobuf field: repeated string provided = 3;
*/
provided: string[];
/**
* A list of full type names or extension IDs of extensions allowed in grpc
* side channel from client to backend.
*
* @generated from protobuf field: repeated string allowed_request_extensions = 4;
*/
allowedRequestExtensions: string[];
/**
* A list of full type names or extension IDs of extensions allowed in grpc
* side channel from backend to client.
*
* @generated from protobuf field: repeated string allowed_response_extensions = 5;
*/
allowedResponseExtensions: string[];
}
declare class Context$Type extends MessageType<Context> {
constructor();
create(value?: PartialMessage<Context>): Context;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Context): Context;
internalBinaryWrite(message: Context, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.Context
*/
export declare const Context: Context$Type;
declare class ContextRule$Type extends MessageType<ContextRule> {
constructor();
create(value?: PartialMessage<ContextRule>): ContextRule;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ContextRule): ContextRule;
internalBinaryWrite(message: ContextRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.ContextRule
*/
export declare const ContextRule: ContextRule$Type;
export {};