Initial commit.

This commit is contained in:
Orne Brocaar
2022-04-06 21:18:32 +01:00
commit 96fe672fc7
709 changed files with 335482 additions and 0 deletions

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

9
api/js/google/api/annotations_pb.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
// package: google.api
// file: google/api/annotations.proto
import * as jspb from "google-protobuf";
import * as google_api_http_pb from "../../google/api/http_pb";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export const http: jspb.ExtensionFieldInfo<google_api_http_pb.HttpRule>;

View File

@ -0,0 +1,40 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_api_http_pb = require('../../google/api/http_pb.js');
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.http', null, global);
/**
* A tuple of {field number, class constructor} for the extension
* field named `http`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.HttpRule>}
*/
proto.google.api.http = new jspb.ExtensionFieldInfo(
72295728,
{http: 0},
google_api_http_pb.HttpRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
google_api_http_pb.HttpRule.toObject),
0);
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.http,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
google_api_http_pb.HttpRule.serializeBinaryToWriter,
google_api_http_pb.HttpRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http;
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/auth_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

194
api/js/google/api/auth_pb.d.ts vendored Normal file
View File

@ -0,0 +1,194 @@
// package: google.api
// file: google/api/auth.proto
import * as jspb from "google-protobuf";
export class Authentication extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<AuthenticationRule>;
setRulesList(value: Array<AuthenticationRule>): void;
addRules(value?: AuthenticationRule, index?: number): AuthenticationRule;
clearProvidersList(): void;
getProvidersList(): Array<AuthProvider>;
setProvidersList(value: Array<AuthProvider>): void;
addProviders(value?: AuthProvider, index?: number): AuthProvider;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Authentication.AsObject;
static toObject(includeInstance: boolean, msg: Authentication): Authentication.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Authentication, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Authentication;
static deserializeBinaryFromReader(message: Authentication, reader: jspb.BinaryReader): Authentication;
}
export namespace Authentication {
export type AsObject = {
rulesList: Array<AuthenticationRule.AsObject>,
providersList: Array<AuthProvider.AsObject>,
}
}
export class AuthenticationRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
hasOauth(): boolean;
clearOauth(): void;
getOauth(): OAuthRequirements | undefined;
setOauth(value?: OAuthRequirements): void;
getAllowWithoutCredential(): boolean;
setAllowWithoutCredential(value: boolean): void;
clearRequirementsList(): void;
getRequirementsList(): Array<AuthRequirement>;
setRequirementsList(value: Array<AuthRequirement>): void;
addRequirements(value?: AuthRequirement, index?: number): AuthRequirement;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AuthenticationRule.AsObject;
static toObject(includeInstance: boolean, msg: AuthenticationRule): AuthenticationRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AuthenticationRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AuthenticationRule;
static deserializeBinaryFromReader(message: AuthenticationRule, reader: jspb.BinaryReader): AuthenticationRule;
}
export namespace AuthenticationRule {
export type AsObject = {
selector: string,
oauth?: OAuthRequirements.AsObject,
allowWithoutCredential: boolean,
requirementsList: Array<AuthRequirement.AsObject>,
}
}
export class JwtLocation extends jspb.Message {
hasHeader(): boolean;
clearHeader(): void;
getHeader(): string;
setHeader(value: string): void;
hasQuery(): boolean;
clearQuery(): void;
getQuery(): string;
setQuery(value: string): void;
getValuePrefix(): string;
setValuePrefix(value: string): void;
getInCase(): JwtLocation.InCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): JwtLocation.AsObject;
static toObject(includeInstance: boolean, msg: JwtLocation): JwtLocation.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: JwtLocation, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): JwtLocation;
static deserializeBinaryFromReader(message: JwtLocation, reader: jspb.BinaryReader): JwtLocation;
}
export namespace JwtLocation {
export type AsObject = {
header: string,
query: string,
valuePrefix: string,
}
export enum InCase {
IN_NOT_SET = 0,
HEADER = 1,
QUERY = 2,
}
}
export class AuthProvider extends jspb.Message {
getId(): string;
setId(value: string): void;
getIssuer(): string;
setIssuer(value: string): void;
getJwksUri(): string;
setJwksUri(value: string): void;
getAudiences(): string;
setAudiences(value: string): void;
getAuthorizationUrl(): string;
setAuthorizationUrl(value: string): void;
clearJwtLocationsList(): void;
getJwtLocationsList(): Array<JwtLocation>;
setJwtLocationsList(value: Array<JwtLocation>): void;
addJwtLocations(value?: JwtLocation, index?: number): JwtLocation;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AuthProvider.AsObject;
static toObject(includeInstance: boolean, msg: AuthProvider): AuthProvider.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AuthProvider, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AuthProvider;
static deserializeBinaryFromReader(message: AuthProvider, reader: jspb.BinaryReader): AuthProvider;
}
export namespace AuthProvider {
export type AsObject = {
id: string,
issuer: string,
jwksUri: string,
audiences: string,
authorizationUrl: string,
jwtLocationsList: Array<JwtLocation.AsObject>,
}
}
export class OAuthRequirements extends jspb.Message {
getCanonicalScopes(): string;
setCanonicalScopes(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OAuthRequirements.AsObject;
static toObject(includeInstance: boolean, msg: OAuthRequirements): OAuthRequirements.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: OAuthRequirements, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OAuthRequirements;
static deserializeBinaryFromReader(message: OAuthRequirements, reader: jspb.BinaryReader): OAuthRequirements;
}
export namespace OAuthRequirements {
export type AsObject = {
canonicalScopes: string,
}
}
export class AuthRequirement extends jspb.Message {
getProviderId(): string;
setProviderId(value: string): void;
getAudiences(): string;
setAudiences(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AuthRequirement.AsObject;
static toObject(includeInstance: boolean, msg: AuthRequirement): AuthRequirement.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AuthRequirement, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AuthRequirement;
static deserializeBinaryFromReader(message: AuthRequirement, reader: jspb.BinaryReader): AuthRequirement;
}
export namespace AuthRequirement {
export type AsObject = {
providerId: string,
audiences: string,
}
}

1438
api/js/google/api/auth_pb.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

98
api/js/google/api/backend_pb.d.ts vendored Normal file
View File

@ -0,0 +1,98 @@
// package: google.api
// file: google/api/backend.proto
import * as jspb from "google-protobuf";
export class Backend extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<BackendRule>;
setRulesList(value: Array<BackendRule>): void;
addRules(value?: BackendRule, index?: number): BackendRule;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Backend.AsObject;
static toObject(includeInstance: boolean, msg: Backend): Backend.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Backend, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Backend;
static deserializeBinaryFromReader(message: Backend, reader: jspb.BinaryReader): Backend;
}
export namespace Backend {
export type AsObject = {
rulesList: Array<BackendRule.AsObject>,
}
}
export class BackendRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
getAddress(): string;
setAddress(value: string): void;
getDeadline(): number;
setDeadline(value: number): void;
getMinDeadline(): number;
setMinDeadline(value: number): void;
getOperationDeadline(): number;
setOperationDeadline(value: number): void;
getPathTranslation(): BackendRule.PathTranslationMap[keyof BackendRule.PathTranslationMap];
setPathTranslation(value: BackendRule.PathTranslationMap[keyof BackendRule.PathTranslationMap]): void;
hasJwtAudience(): boolean;
clearJwtAudience(): void;
getJwtAudience(): string;
setJwtAudience(value: string): void;
hasDisableAuth(): boolean;
clearDisableAuth(): void;
getDisableAuth(): boolean;
setDisableAuth(value: boolean): void;
getProtocol(): string;
setProtocol(value: string): void;
getAuthenticationCase(): BackendRule.AuthenticationCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BackendRule.AsObject;
static toObject(includeInstance: boolean, msg: BackendRule): BackendRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BackendRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BackendRule;
static deserializeBinaryFromReader(message: BackendRule, reader: jspb.BinaryReader): BackendRule;
}
export namespace BackendRule {
export type AsObject = {
selector: string,
address: string,
deadline: number,
minDeadline: number,
operationDeadline: number,
pathTranslation: BackendRule.PathTranslationMap[keyof BackendRule.PathTranslationMap],
jwtAudience: string,
disableAuth: boolean,
protocol: string,
}
export interface PathTranslationMap {
PATH_TRANSLATION_UNSPECIFIED: 0;
CONSTANT_ADDRESS: 1;
APPEND_PATH_TO_ADDRESS: 2;
}
export const PathTranslation: PathTranslationMap;
export enum AuthenticationCase {
AUTHENTICATION_NOT_SET = 0,
JWT_AUDIENCE = 7,
DISABLE_AUTH = 8,
}
}

View File

@ -0,0 +1,633 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Backend', null, global);
goog.exportSymbol('proto.google.api.BackendRule', null, global);
goog.exportSymbol('proto.google.api.BackendRule.PathTranslation', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Backend = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Backend.repeatedFields_, null);
};
goog.inherits(proto.google.api.Backend, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Backend.displayName = 'proto.google.api.Backend';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Backend.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Backend.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Backend.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Backend} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Backend.toObject = function(includeInstance, msg) {
var f, obj = {
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.BackendRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Backend}
*/
proto.google.api.Backend.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Backend;
return proto.google.api.Backend.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Backend} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Backend}
*/
proto.google.api.Backend.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.BackendRule;
reader.readMessage(value,proto.google.api.BackendRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Backend} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Backend.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Backend.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Backend.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.BackendRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Backend} The clone.
*/
proto.google.api.Backend.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Backend} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated BackendRule rules = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.BackendRule>}
*/
proto.google.api.Backend.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.BackendRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.BackendRule, 1));
};
/** @param {Array.<!proto.google.api.BackendRule>} value */
proto.google.api.Backend.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Backend.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.BackendRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.BackendRule.oneofGroups_);
};
goog.inherits(proto.google.api.BackendRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.BackendRule.displayName = 'proto.google.api.BackendRule';
}
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.google.api.BackendRule.oneofGroups_ = [[7,8]];
/**
* @enum {number}
*/
proto.google.api.BackendRule.AuthenticationCase = {
AUTHENTICATION_NOT_SET: 0,
JWT_AUDIENCE: 7,
DISABLE_AUTH: 8
};
/**
* @return {proto.google.api.BackendRule.AuthenticationCase}
*/
proto.google.api.BackendRule.prototype.getAuthenticationCase = function() {
return /** @type {proto.google.api.BackendRule.AuthenticationCase} */(jspb.Message.computeOneofCase(this, proto.google.api.BackendRule.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.BackendRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.BackendRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.BackendRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.BackendRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
address: msg.getAddress(),
deadline: msg.getDeadline(),
minDeadline: msg.getMinDeadline(),
operationDeadline: msg.getOperationDeadline(),
pathTranslation: msg.getPathTranslation(),
jwtAudience: jspb.Message.getField(msg, 7),
disableAuth: jspb.Message.getField(msg, 8),
protocol: msg.getProtocol()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.BackendRule}
*/
proto.google.api.BackendRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.BackendRule;
return proto.google.api.BackendRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.BackendRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.BackendRule}
*/
proto.google.api.BackendRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
case 3:
var value = /** @type {number} */ (reader.readDouble());
msg.setDeadline(value);
break;
case 4:
var value = /** @type {number} */ (reader.readDouble());
msg.setMinDeadline(value);
break;
case 5:
var value = /** @type {number} */ (reader.readDouble());
msg.setOperationDeadline(value);
break;
case 6:
var value = /** @type {!proto.google.api.BackendRule.PathTranslation} */ (reader.readEnum());
msg.setPathTranslation(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setJwtAudience(value);
break;
case 8:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableAuth(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setProtocol(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.BackendRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.BackendRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.BackendRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.BackendRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDeadline();
if (f !== 0.0) {
writer.writeDouble(
3,
f
);
}
f = this.getMinDeadline();
if (f !== 0.0) {
writer.writeDouble(
4,
f
);
}
f = this.getOperationDeadline();
if (f !== 0.0) {
writer.writeDouble(
5,
f
);
}
f = this.getPathTranslation();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = jspb.Message.getField(this, 7);
if (f != null) {
writer.writeString(
7,
f
);
}
f = jspb.Message.getField(this, 8);
if (f != null) {
writer.writeBool(
8,
f
);
}
f = this.getProtocol();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.BackendRule} The clone.
*/
proto.google.api.BackendRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.BackendRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.BackendRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string address = 2;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.BackendRule.prototype.setAddress = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional double deadline = 3;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getDeadline = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.google.api.BackendRule.prototype.setDeadline = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional double min_deadline = 4;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getMinDeadline = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {number} value */
proto.google.api.BackendRule.prototype.setMinDeadline = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional double operation_deadline = 5;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getOperationDeadline = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
};
/** @param {number} value */
proto.google.api.BackendRule.prototype.setOperationDeadline = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional PathTranslation path_translation = 6;
* @return {!proto.google.api.BackendRule.PathTranslation}
*/
proto.google.api.BackendRule.prototype.getPathTranslation = function() {
return /** @type {!proto.google.api.BackendRule.PathTranslation} */ (jspb.Message.getFieldProto3(this, 6, 0));
};
/** @param {!proto.google.api.BackendRule.PathTranslation} value */
proto.google.api.BackendRule.prototype.setPathTranslation = function(value) {
jspb.Message.setField(this, 6, value);
};
/**
* optional string jwt_audience = 7;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getJwtAudience = function() {
return /** @type {string} */ (!this.hasJwtAudience() ? "" : jspb.Message.getField(this, 7));
};
/** @param {string?|undefined} value */
proto.google.api.BackendRule.prototype.setJwtAudience = function(value) {
jspb.Message.setOneofField(this, 7, proto.google.api.BackendRule.oneofGroups_[0], value);
};
proto.google.api.BackendRule.prototype.clearJwtAudience = function() {
jspb.Message.setOneofField(this, 7, proto.google.api.BackendRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.BackendRule.prototype.hasJwtAudience = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional bool disable_auth = 8;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.google.api.BackendRule.prototype.getDisableAuth = function() {
return /** @type {boolean} */ (!this.hasDisableAuth() ? false : jspb.Message.getField(this, 8));
};
/** @param {boolean?|undefined} value */
proto.google.api.BackendRule.prototype.setDisableAuth = function(value) {
jspb.Message.setOneofField(this, 8, proto.google.api.BackendRule.oneofGroups_[0], value);
};
proto.google.api.BackendRule.prototype.clearDisableAuth = function() {
jspb.Message.setOneofField(this, 8, proto.google.api.BackendRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.BackendRule.prototype.hasDisableAuth = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional string protocol = 9;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getProtocol = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 9, ""));
};
/** @param {string} value */
proto.google.api.BackendRule.prototype.setProtocol = function(value) {
jspb.Message.setField(this, 9, value);
};
/**
* @enum {number}
*/
proto.google.api.BackendRule.PathTranslation = {
PATH_TRANSLATION_UNSPECIFIED: 0,
CONSTANT_ADDRESS: 1,
APPEND_PATH_TO_ADDRESS: 2
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

54
api/js/google/api/billing_pb.d.ts vendored Normal file
View File

@ -0,0 +1,54 @@
// package: google.api
// file: google/api/billing.proto
import * as jspb from "google-protobuf";
import * as google_api_metric_pb from "../../google/api/metric_pb";
export class Billing extends jspb.Message {
clearConsumerDestinationsList(): void;
getConsumerDestinationsList(): Array<Billing.BillingDestination>;
setConsumerDestinationsList(value: Array<Billing.BillingDestination>): void;
addConsumerDestinations(value?: Billing.BillingDestination, index?: number): Billing.BillingDestination;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Billing.AsObject;
static toObject(includeInstance: boolean, msg: Billing): Billing.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Billing, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Billing;
static deserializeBinaryFromReader(message: Billing, reader: jspb.BinaryReader): Billing;
}
export namespace Billing {
export type AsObject = {
consumerDestinationsList: Array<Billing.BillingDestination.AsObject>,
}
export class BillingDestination extends jspb.Message {
getMonitoredResource(): string;
setMonitoredResource(value: string): void;
clearMetricsList(): void;
getMetricsList(): Array<string>;
setMetricsList(value: Array<string>): void;
addMetrics(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BillingDestination.AsObject;
static toObject(includeInstance: boolean, msg: BillingDestination): BillingDestination.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BillingDestination, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BillingDestination;
static deserializeBinaryFromReader(message: BillingDestination, reader: jspb.BinaryReader): BillingDestination;
}
export namespace BillingDestination {
export type AsObject = {
monitoredResource: string,
metricsList: Array<string>,
}
}
}

View File

@ -0,0 +1,394 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_api_metric_pb = require('../../google/api/metric_pb.js');
goog.exportSymbol('proto.google.api.Billing', null, global);
goog.exportSymbol('proto.google.api.Billing.BillingDestination', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Billing = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Billing.repeatedFields_, null);
};
goog.inherits(proto.google.api.Billing, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Billing.displayName = 'proto.google.api.Billing';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Billing.repeatedFields_ = [8];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Billing.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Billing.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Billing} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Billing.toObject = function(includeInstance, msg) {
var f, obj = {
consumerDestinationsList: jspb.Message.toObjectList(msg.getConsumerDestinationsList(),
proto.google.api.Billing.BillingDestination.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Billing}
*/
proto.google.api.Billing.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Billing;
return proto.google.api.Billing.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Billing} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Billing}
*/
proto.google.api.Billing.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 8:
var value = new proto.google.api.Billing.BillingDestination;
reader.readMessage(value,proto.google.api.Billing.BillingDestination.deserializeBinaryFromReader);
msg.getConsumerDestinationsList().push(value);
msg.setConsumerDestinationsList(msg.getConsumerDestinationsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Billing} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Billing.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Billing.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Billing.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
f,
proto.google.api.Billing.BillingDestination.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Billing} The clone.
*/
proto.google.api.Billing.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Billing} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated BillingDestination consumer_destinations = 8;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Billing.BillingDestination>}
*/
proto.google.api.Billing.prototype.getConsumerDestinationsList = function() {
return /** @type{!Array.<!proto.google.api.Billing.BillingDestination>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Billing.BillingDestination, 8));
};
/** @param {Array.<!proto.google.api.Billing.BillingDestination>} value */
proto.google.api.Billing.prototype.setConsumerDestinationsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 8, value);
};
proto.google.api.Billing.prototype.clearConsumerDestinationsList = function() {
this.setConsumerDestinationsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Billing.BillingDestination = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Billing.BillingDestination.repeatedFields_, null);
};
goog.inherits(proto.google.api.Billing.BillingDestination, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Billing.BillingDestination.displayName = 'proto.google.api.Billing.BillingDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Billing.BillingDestination.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Billing.BillingDestination.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Billing.BillingDestination.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Billing.BillingDestination} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Billing.BillingDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
metricsList: jspb.Message.getField(msg, 2)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Billing.BillingDestination}
*/
proto.google.api.Billing.BillingDestination.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Billing.BillingDestination;
return proto.google.api.Billing.BillingDestination.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Billing.BillingDestination} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Billing.BillingDestination}
*/
proto.google.api.Billing.BillingDestination.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setMonitoredResource(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getMetricsList().push(value);
msg.setMetricsList(msg.getMetricsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Billing.BillingDestination} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Billing.BillingDestination.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Billing.BillingDestination.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Billing.BillingDestination.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Billing.BillingDestination} The clone.
*/
proto.google.api.Billing.BillingDestination.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Billing.BillingDestination} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string monitored_resource = 1;
* @return {string}
*/
proto.google.api.Billing.BillingDestination.prototype.getMonitoredResource = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Billing.BillingDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string metrics = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.Billing.BillingDestination.prototype.getMetricsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
};
/** @param {Array.<string>} value */
proto.google.api.Billing.BillingDestination.prototype.setMetricsList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.google.api.Billing.BillingDestination.prototype.clearMetricsList = function() {
jspb.Message.setField(this, 2, []);
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/client_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

12
api/js/google/api/client_pb.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
// package: google.api
// file: google/api/client.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export const methodSignature: jspb.ExtensionFieldInfo<string>;
export const defaultHost: jspb.ExtensionFieldInfo<string>;
export const oauthScopes: jspb.ExtensionFieldInfo<string>;

View File

@ -0,0 +1,91 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.default_host', null, global);
goog.exportSymbol('google.api.method_signature', null, global);
goog.exportSymbol('google.api.oauth_scopes', null, global);
/**
* A tuple of {field number, class constructor} for the extension
* field named `methodSignatureList`.
* @type {!jspb.ExtensionFieldInfo.<!Array.<string>>}
*/
proto.google.api.methodSignatureList = new jspb.ExtensionFieldInfo(
1051,
{methodSignatureList: 0},
null,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
null),
1);
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1051] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.methodSignatureList,
jspb.BinaryReader.prototype.readString,
jspb.BinaryWriter.prototype.writeRepeatedString,
null,
null,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MethodOptions.extensions[1051] = proto.google.api.methodSignatureList;
/**
* A tuple of {field number, class constructor} for the extension
* field named `defaultHost`.
* @type {!jspb.ExtensionFieldInfo.<string>}
*/
proto.google.api.defaultHost = new jspb.ExtensionFieldInfo(
1049,
{defaultHost: 0},
null,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
null),
0);
google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1049] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.defaultHost,
jspb.BinaryReader.prototype.readString,
jspb.BinaryWriter.prototype.writeString,
null,
null,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[1049] = proto.google.api.defaultHost;
/**
* A tuple of {field number, class constructor} for the extension
* field named `oauthScopes`.
* @type {!jspb.ExtensionFieldInfo.<string>}
*/
proto.google.api.oauthScopes = new jspb.ExtensionFieldInfo(
1050,
{oauthScopes: 0},
null,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
null),
0);
google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1050] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.oauthScopes,
jspb.BinaryReader.prototype.readString,
jspb.BinaryWriter.prototype.writeString,
null,
null,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[1050] = proto.google.api.oauthScopes;
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

72
api/js/google/api/config_change_pb.d.ts vendored Normal file
View File

@ -0,0 +1,72 @@
// package: google.api
// file: google/api/config_change.proto
import * as jspb from "google-protobuf";
export class ConfigChange extends jspb.Message {
getElement(): string;
setElement(value: string): void;
getOldValue(): string;
setOldValue(value: string): void;
getNewValue(): string;
setNewValue(value: string): void;
getChangeType(): ChangeTypeMap[keyof ChangeTypeMap];
setChangeType(value: ChangeTypeMap[keyof ChangeTypeMap]): void;
clearAdvicesList(): void;
getAdvicesList(): Array<Advice>;
setAdvicesList(value: Array<Advice>): void;
addAdvices(value?: Advice, index?: number): Advice;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConfigChange.AsObject;
static toObject(includeInstance: boolean, msg: ConfigChange): ConfigChange.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConfigChange, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigChange;
static deserializeBinaryFromReader(message: ConfigChange, reader: jspb.BinaryReader): ConfigChange;
}
export namespace ConfigChange {
export type AsObject = {
element: string,
oldValue: string,
newValue: string,
changeType: ChangeTypeMap[keyof ChangeTypeMap],
advicesList: Array<Advice.AsObject>,
}
}
export class Advice extends jspb.Message {
getDescription(): string;
setDescription(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Advice.AsObject;
static toObject(includeInstance: boolean, msg: Advice): Advice.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Advice, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Advice;
static deserializeBinaryFromReader(message: Advice, reader: jspb.BinaryReader): Advice;
}
export namespace Advice {
export type AsObject = {
description: string,
}
}
export interface ChangeTypeMap {
CHANGE_TYPE_UNSPECIFIED: 0;
ADDED: 1;
REMOVED: 2;
MODIFIED: 3;
}
export const ChangeType: ChangeTypeMap;

View File

@ -0,0 +1,470 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Advice', null, global);
goog.exportSymbol('proto.google.api.ChangeType', null, global);
goog.exportSymbol('proto.google.api.ConfigChange', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.ConfigChange = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ConfigChange.repeatedFields_, null);
};
goog.inherits(proto.google.api.ConfigChange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ConfigChange.displayName = 'proto.google.api.ConfigChange';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.ConfigChange.repeatedFields_ = [5];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.ConfigChange.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.ConfigChange.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.ConfigChange} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.ConfigChange.toObject = function(includeInstance, msg) {
var f, obj = {
element: msg.getElement(),
oldValue: msg.getOldValue(),
newValue: msg.getNewValue(),
changeType: msg.getChangeType(),
advicesList: jspb.Message.toObjectList(msg.getAdvicesList(),
proto.google.api.Advice.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.ConfigChange}
*/
proto.google.api.ConfigChange.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.ConfigChange;
return proto.google.api.ConfigChange.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.ConfigChange} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.ConfigChange}
*/
proto.google.api.ConfigChange.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setElement(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setOldValue(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setNewValue(value);
break;
case 4:
var value = /** @type {!proto.google.api.ChangeType} */ (reader.readEnum());
msg.setChangeType(value);
break;
case 5:
var value = new proto.google.api.Advice;
reader.readMessage(value,proto.google.api.Advice.deserializeBinaryFromReader);
msg.getAdvicesList().push(value);
msg.setAdvicesList(msg.getAdvicesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.ConfigChange} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ConfigChange.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.ConfigChange.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ConfigChange.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getElement();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getOldValue();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getNewValue();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getChangeType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getAdvicesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.google.api.Advice.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.ConfigChange} The clone.
*/
proto.google.api.ConfigChange.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.ConfigChange} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string element = 1;
* @return {string}
*/
proto.google.api.ConfigChange.prototype.getElement = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.ConfigChange.prototype.setElement = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string old_value = 2;
* @return {string}
*/
proto.google.api.ConfigChange.prototype.getOldValue = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.ConfigChange.prototype.setOldValue = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string new_value = 3;
* @return {string}
*/
proto.google.api.ConfigChange.prototype.getNewValue = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.ConfigChange.prototype.setNewValue = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional ChangeType change_type = 4;
* @return {!proto.google.api.ChangeType}
*/
proto.google.api.ConfigChange.prototype.getChangeType = function() {
return /** @type {!proto.google.api.ChangeType} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {!proto.google.api.ChangeType} value */
proto.google.api.ConfigChange.prototype.setChangeType = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* repeated Advice advices = 5;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Advice>}
*/
proto.google.api.ConfigChange.prototype.getAdvicesList = function() {
return /** @type{!Array.<!proto.google.api.Advice>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Advice, 5));
};
/** @param {Array.<!proto.google.api.Advice>} value */
proto.google.api.ConfigChange.prototype.setAdvicesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 5, value);
};
proto.google.api.ConfigChange.prototype.clearAdvicesList = function() {
this.setAdvicesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Advice = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Advice, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Advice.displayName = 'proto.google.api.Advice';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Advice.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Advice.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Advice} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Advice.toObject = function(includeInstance, msg) {
var f, obj = {
description: msg.getDescription()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Advice}
*/
proto.google.api.Advice.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Advice;
return proto.google.api.Advice.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Advice} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Advice}
*/
proto.google.api.Advice.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Advice} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Advice.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Advice.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Advice.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Advice} The clone.
*/
proto.google.api.Advice.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Advice} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string description = 2;
* @return {string}
*/
proto.google.api.Advice.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.Advice.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* @enum {number}
*/
proto.google.api.ChangeType = {
CHANGE_TYPE_UNSPECIFIED: 0,
ADDED: 1,
REMOVED: 2,
MODIFIED: 3
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

65
api/js/google/api/consumer_pb.d.ts vendored Normal file
View File

@ -0,0 +1,65 @@
// package: google.api
// file: google/api/consumer.proto
import * as jspb from "google-protobuf";
export class ProjectProperties extends jspb.Message {
clearPropertiesList(): void;
getPropertiesList(): Array<Property>;
setPropertiesList(value: Array<Property>): void;
addProperties(value?: Property, index?: number): Property;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ProjectProperties.AsObject;
static toObject(includeInstance: boolean, msg: ProjectProperties): ProjectProperties.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ProjectProperties, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ProjectProperties;
static deserializeBinaryFromReader(message: ProjectProperties, reader: jspb.BinaryReader): ProjectProperties;
}
export namespace ProjectProperties {
export type AsObject = {
propertiesList: Array<Property.AsObject>,
}
}
export class Property extends jspb.Message {
getName(): string;
setName(value: string): void;
getType(): Property.PropertyTypeMap[keyof Property.PropertyTypeMap];
setType(value: Property.PropertyTypeMap[keyof Property.PropertyTypeMap]): void;
getDescription(): string;
setDescription(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Property.AsObject;
static toObject(includeInstance: boolean, msg: Property): Property.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Property, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Property;
static deserializeBinaryFromReader(message: Property, reader: jspb.BinaryReader): Property;
}
export namespace Property {
export type AsObject = {
name: string,
type: Property.PropertyTypeMap[keyof Property.PropertyTypeMap],
description: string,
}
export interface PropertyTypeMap {
UNSPECIFIED: 0;
INT64: 1;
BOOL: 2;
STRING: 3;
DOUBLE: 4;
}
export const PropertyType: PropertyTypeMap;
}

View File

@ -0,0 +1,417 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.ProjectProperties', null, global);
goog.exportSymbol('proto.google.api.Property', null, global);
goog.exportSymbol('proto.google.api.Property.PropertyType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.ProjectProperties = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ProjectProperties.repeatedFields_, null);
};
goog.inherits(proto.google.api.ProjectProperties, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ProjectProperties.displayName = 'proto.google.api.ProjectProperties';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.ProjectProperties.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.ProjectProperties.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.ProjectProperties.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.ProjectProperties} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.ProjectProperties.toObject = function(includeInstance, msg) {
var f, obj = {
propertiesList: jspb.Message.toObjectList(msg.getPropertiesList(),
proto.google.api.Property.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.ProjectProperties}
*/
proto.google.api.ProjectProperties.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.ProjectProperties;
return proto.google.api.ProjectProperties.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.ProjectProperties} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.ProjectProperties}
*/
proto.google.api.ProjectProperties.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.Property;
reader.readMessage(value,proto.google.api.Property.deserializeBinaryFromReader);
msg.getPropertiesList().push(value);
msg.setPropertiesList(msg.getPropertiesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.ProjectProperties} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ProjectProperties.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.ProjectProperties.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ProjectProperties.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getPropertiesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.Property.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.ProjectProperties} The clone.
*/
proto.google.api.ProjectProperties.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.ProjectProperties} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated Property properties = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Property>}
*/
proto.google.api.ProjectProperties.prototype.getPropertiesList = function() {
return /** @type{!Array.<!proto.google.api.Property>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Property, 1));
};
/** @param {Array.<!proto.google.api.Property>} value */
proto.google.api.ProjectProperties.prototype.setPropertiesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.ProjectProperties.prototype.clearPropertiesList = function() {
this.setPropertiesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Property = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Property, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Property.displayName = 'proto.google.api.Property';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Property.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Property.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Property} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Property.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
type: msg.getType(),
description: msg.getDescription()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Property}
*/
proto.google.api.Property.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Property;
return proto.google.api.Property.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Property} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Property}
*/
proto.google.api.Property.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {!proto.google.api.Property.PropertyType} */ (reader.readEnum());
msg.setType(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Property} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Property.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Property.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Property.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Property} The clone.
*/
proto.google.api.Property.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Property} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.Property.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Property.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional PropertyType type = 2;
* @return {!proto.google.api.Property.PropertyType}
*/
proto.google.api.Property.prototype.getType = function() {
return /** @type {!proto.google.api.Property.PropertyType} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {!proto.google.api.Property.PropertyType} value */
proto.google.api.Property.prototype.setType = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.Property.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.Property.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* @enum {number}
*/
proto.google.api.Property.PropertyType = {
UNSPECIFIED: 0,
INT64: 1,
BOOL: 2,
STRING: 3,
DOUBLE: 4
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

71
api/js/google/api/context_pb.d.ts vendored Normal file
View File

@ -0,0 +1,71 @@
// package: google.api
// file: google/api/context.proto
import * as jspb from "google-protobuf";
export class Context extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<ContextRule>;
setRulesList(value: Array<ContextRule>): void;
addRules(value?: ContextRule, index?: number): ContextRule;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Context.AsObject;
static toObject(includeInstance: boolean, msg: Context): Context.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Context, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Context;
static deserializeBinaryFromReader(message: Context, reader: jspb.BinaryReader): Context;
}
export namespace Context {
export type AsObject = {
rulesList: Array<ContextRule.AsObject>,
}
}
export class ContextRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
clearRequestedList(): void;
getRequestedList(): Array<string>;
setRequestedList(value: Array<string>): void;
addRequested(value: string, index?: number): string;
clearProvidedList(): void;
getProvidedList(): Array<string>;
setProvidedList(value: Array<string>): void;
addProvided(value: string, index?: number): string;
clearAllowedRequestExtensionsList(): void;
getAllowedRequestExtensionsList(): Array<string>;
setAllowedRequestExtensionsList(value: Array<string>): void;
addAllowedRequestExtensions(value: string, index?: number): string;
clearAllowedResponseExtensionsList(): void;
getAllowedResponseExtensionsList(): Array<string>;
setAllowedResponseExtensionsList(value: Array<string>): void;
addAllowedResponseExtensions(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ContextRule.AsObject;
static toObject(includeInstance: boolean, msg: ContextRule): ContextRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ContextRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ContextRule;
static deserializeBinaryFromReader(message: ContextRule, reader: jspb.BinaryReader): ContextRule;
}
export namespace ContextRule {
export type AsObject = {
selector: string,
requestedList: Array<string>,
providedList: Array<string>,
allowedRequestExtensionsList: Array<string>,
allowedResponseExtensionsList: Array<string>,
}
}

View File

@ -0,0 +1,498 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Context', null, global);
goog.exportSymbol('proto.google.api.ContextRule', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Context = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Context.repeatedFields_, null);
};
goog.inherits(proto.google.api.Context, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Context.displayName = 'proto.google.api.Context';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Context.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Context.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Context.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Context} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Context.toObject = function(includeInstance, msg) {
var f, obj = {
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.ContextRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Context}
*/
proto.google.api.Context.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Context;
return proto.google.api.Context.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Context} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Context}
*/
proto.google.api.Context.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.ContextRule;
reader.readMessage(value,proto.google.api.ContextRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Context} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Context.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Context.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Context.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.ContextRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Context} The clone.
*/
proto.google.api.Context.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Context} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated ContextRule rules = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.ContextRule>}
*/
proto.google.api.Context.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.ContextRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.ContextRule, 1));
};
/** @param {Array.<!proto.google.api.ContextRule>} value */
proto.google.api.Context.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Context.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.ContextRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ContextRule.repeatedFields_, null);
};
goog.inherits(proto.google.api.ContextRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ContextRule.displayName = 'proto.google.api.ContextRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.ContextRule.repeatedFields_ = [2,3,4,5];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.ContextRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.ContextRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.ContextRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.ContextRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
requestedList: jspb.Message.getField(msg, 2),
providedList: jspb.Message.getField(msg, 3),
allowedRequestExtensionsList: jspb.Message.getField(msg, 4),
allowedResponseExtensionsList: jspb.Message.getField(msg, 5)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.ContextRule}
*/
proto.google.api.ContextRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.ContextRule;
return proto.google.api.ContextRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.ContextRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.ContextRule}
*/
proto.google.api.ContextRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getRequestedList().push(value);
msg.setRequestedList(msg.getRequestedList());
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.getProvidedList().push(value);
msg.setProvidedList(msg.getProvidedList());
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.getAllowedRequestExtensionsList().push(value);
msg.setAllowedRequestExtensionsList(msg.getAllowedRequestExtensionsList());
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.getAllowedResponseExtensionsList().push(value);
msg.setAllowedResponseExtensionsList(msg.getAllowedResponseExtensionsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.ContextRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ContextRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.ContextRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ContextRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getRequestedList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getProvidedList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
f = this.getAllowedRequestExtensionsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
f = this.getAllowedResponseExtensionsList();
if (f.length > 0) {
writer.writeRepeatedString(
5,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.ContextRule} The clone.
*/
proto.google.api.ContextRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.ContextRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.ContextRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.ContextRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string requested = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.ContextRule.prototype.getRequestedList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
};
/** @param {Array.<string>} value */
proto.google.api.ContextRule.prototype.setRequestedList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.google.api.ContextRule.prototype.clearRequestedList = function() {
jspb.Message.setField(this, 2, []);
};
/**
* repeated string provided = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.ContextRule.prototype.getProvidedList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 3));
};
/** @param {Array.<string>} value */
proto.google.api.ContextRule.prototype.setProvidedList = function(value) {
jspb.Message.setField(this, 3, value || []);
};
proto.google.api.ContextRule.prototype.clearProvidedList = function() {
jspb.Message.setField(this, 3, []);
};
/**
* repeated string allowed_request_extensions = 4;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.ContextRule.prototype.getAllowedRequestExtensionsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 4));
};
/** @param {Array.<string>} value */
proto.google.api.ContextRule.prototype.setAllowedRequestExtensionsList = function(value) {
jspb.Message.setField(this, 4, value || []);
};
proto.google.api.ContextRule.prototype.clearAllowedRequestExtensionsList = function() {
jspb.Message.setField(this, 4, []);
};
/**
* repeated string allowed_response_extensions = 5;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.ContextRule.prototype.getAllowedResponseExtensionsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 5));
};
/** @param {Array.<string>} value */
proto.google.api.ContextRule.prototype.setAllowedResponseExtensionsList = function(value) {
jspb.Message.setField(this, 5, value || []);
};
proto.google.api.ContextRule.prototype.clearAllowedResponseExtensionsList = function() {
jspb.Message.setField(this, 5, []);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

25
api/js/google/api/control_pb.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
// package: google.api
// file: google/api/control.proto
import * as jspb from "google-protobuf";
export class Control extends jspb.Message {
getEnvironment(): string;
setEnvironment(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Control.AsObject;
static toObject(includeInstance: boolean, msg: Control): Control.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Control, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Control;
static deserializeBinaryFromReader(message: Control, reader: jspb.BinaryReader): Control;
}
export namespace Control {
export type AsObject = {
environment: string,
}
}

View File

@ -0,0 +1,172 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Control', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Control = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Control, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Control.displayName = 'proto.google.api.Control';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Control.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Control.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Control} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Control.toObject = function(includeInstance, msg) {
var f, obj = {
environment: msg.getEnvironment()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Control}
*/
proto.google.api.Control.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Control;
return proto.google.api.Control.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Control} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Control}
*/
proto.google.api.Control.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setEnvironment(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Control} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Control.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Control.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Control.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getEnvironment();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Control} The clone.
*/
proto.google.api.Control.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Control} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string environment = 1;
* @return {string}
*/
proto.google.api.Control.prototype.getEnvironment = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Control.prototype.setEnvironment = function(value) {
jspb.Message.setField(this, 1, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

235
api/js/google/api/distribution_pb.d.ts vendored Normal file
View File

@ -0,0 +1,235 @@
// package: google.api
// file: google/api/distribution.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
export class Distribution extends jspb.Message {
getCount(): number;
setCount(value: number): void;
getMean(): number;
setMean(value: number): void;
getSumOfSquaredDeviation(): number;
setSumOfSquaredDeviation(value: number): void;
hasRange(): boolean;
clearRange(): void;
getRange(): Distribution.Range | undefined;
setRange(value?: Distribution.Range): void;
hasBucketOptions(): boolean;
clearBucketOptions(): void;
getBucketOptions(): Distribution.BucketOptions | undefined;
setBucketOptions(value?: Distribution.BucketOptions): void;
clearBucketCountsList(): void;
getBucketCountsList(): Array<number>;
setBucketCountsList(value: Array<number>): void;
addBucketCounts(value: number, index?: number): number;
clearExemplarsList(): void;
getExemplarsList(): Array<Distribution.Exemplar>;
setExemplarsList(value: Array<Distribution.Exemplar>): void;
addExemplars(value?: Distribution.Exemplar, index?: number): Distribution.Exemplar;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Distribution.AsObject;
static toObject(includeInstance: boolean, msg: Distribution): Distribution.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Distribution, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Distribution;
static deserializeBinaryFromReader(message: Distribution, reader: jspb.BinaryReader): Distribution;
}
export namespace Distribution {
export type AsObject = {
count: number,
mean: number,
sumOfSquaredDeviation: number,
range?: Distribution.Range.AsObject,
bucketOptions?: Distribution.BucketOptions.AsObject,
bucketCountsList: Array<number>,
exemplarsList: Array<Distribution.Exemplar.AsObject>,
}
export class Range extends jspb.Message {
getMin(): number;
setMin(value: number): void;
getMax(): number;
setMax(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Range.AsObject;
static toObject(includeInstance: boolean, msg: Range): Range.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Range, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Range;
static deserializeBinaryFromReader(message: Range, reader: jspb.BinaryReader): Range;
}
export namespace Range {
export type AsObject = {
min: number,
max: number,
}
}
export class BucketOptions extends jspb.Message {
hasLinearBuckets(): boolean;
clearLinearBuckets(): void;
getLinearBuckets(): Distribution.BucketOptions.Linear | undefined;
setLinearBuckets(value?: Distribution.BucketOptions.Linear): void;
hasExponentialBuckets(): boolean;
clearExponentialBuckets(): void;
getExponentialBuckets(): Distribution.BucketOptions.Exponential | undefined;
setExponentialBuckets(value?: Distribution.BucketOptions.Exponential): void;
hasExplicitBuckets(): boolean;
clearExplicitBuckets(): void;
getExplicitBuckets(): Distribution.BucketOptions.Explicit | undefined;
setExplicitBuckets(value?: Distribution.BucketOptions.Explicit): void;
getOptionsCase(): BucketOptions.OptionsCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BucketOptions.AsObject;
static toObject(includeInstance: boolean, msg: BucketOptions): BucketOptions.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BucketOptions, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BucketOptions;
static deserializeBinaryFromReader(message: BucketOptions, reader: jspb.BinaryReader): BucketOptions;
}
export namespace BucketOptions {
export type AsObject = {
linearBuckets?: Distribution.BucketOptions.Linear.AsObject,
exponentialBuckets?: Distribution.BucketOptions.Exponential.AsObject,
explicitBuckets?: Distribution.BucketOptions.Explicit.AsObject,
}
export class Linear extends jspb.Message {
getNumFiniteBuckets(): number;
setNumFiniteBuckets(value: number): void;
getWidth(): number;
setWidth(value: number): void;
getOffset(): number;
setOffset(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Linear.AsObject;
static toObject(includeInstance: boolean, msg: Linear): Linear.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Linear, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Linear;
static deserializeBinaryFromReader(message: Linear, reader: jspb.BinaryReader): Linear;
}
export namespace Linear {
export type AsObject = {
numFiniteBuckets: number,
width: number,
offset: number,
}
}
export class Exponential extends jspb.Message {
getNumFiniteBuckets(): number;
setNumFiniteBuckets(value: number): void;
getGrowthFactor(): number;
setGrowthFactor(value: number): void;
getScale(): number;
setScale(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Exponential.AsObject;
static toObject(includeInstance: boolean, msg: Exponential): Exponential.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Exponential, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Exponential;
static deserializeBinaryFromReader(message: Exponential, reader: jspb.BinaryReader): Exponential;
}
export namespace Exponential {
export type AsObject = {
numFiniteBuckets: number,
growthFactor: number,
scale: number,
}
}
export class Explicit extends jspb.Message {
clearBoundsList(): void;
getBoundsList(): Array<number>;
setBoundsList(value: Array<number>): void;
addBounds(value: number, index?: number): number;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Explicit.AsObject;
static toObject(includeInstance: boolean, msg: Explicit): Explicit.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Explicit, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Explicit;
static deserializeBinaryFromReader(message: Explicit, reader: jspb.BinaryReader): Explicit;
}
export namespace Explicit {
export type AsObject = {
boundsList: Array<number>,
}
}
export enum OptionsCase {
OPTIONS_NOT_SET = 0,
LINEAR_BUCKETS = 1,
EXPONENTIAL_BUCKETS = 2,
EXPLICIT_BUCKETS = 3,
}
}
export class Exemplar extends jspb.Message {
getValue(): number;
setValue(value: number): void;
hasTimestamp(): boolean;
clearTimestamp(): void;
getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;
clearAttachmentsList(): void;
getAttachmentsList(): Array<google_protobuf_any_pb.Any>;
setAttachmentsList(value: Array<google_protobuf_any_pb.Any>): void;
addAttachments(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Exemplar.AsObject;
static toObject(includeInstance: boolean, msg: Exemplar): Exemplar.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Exemplar, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Exemplar;
static deserializeBinaryFromReader(message: Exemplar, reader: jspb.BinaryReader): Exemplar;
}
export namespace Exemplar {
export type AsObject = {
value: number,
timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
attachmentsList: Array<google_protobuf_any_pb.Any.AsObject>,
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

107
api/js/google/api/documentation_pb.d.ts vendored Normal file
View File

@ -0,0 +1,107 @@
// package: google.api
// file: google/api/documentation.proto
import * as jspb from "google-protobuf";
export class Documentation extends jspb.Message {
getSummary(): string;
setSummary(value: string): void;
clearPagesList(): void;
getPagesList(): Array<Page>;
setPagesList(value: Array<Page>): void;
addPages(value?: Page, index?: number): Page;
clearRulesList(): void;
getRulesList(): Array<DocumentationRule>;
setRulesList(value: Array<DocumentationRule>): void;
addRules(value?: DocumentationRule, index?: number): DocumentationRule;
getDocumentationRootUrl(): string;
setDocumentationRootUrl(value: string): void;
getServiceRootUrl(): string;
setServiceRootUrl(value: string): void;
getOverview(): string;
setOverview(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Documentation.AsObject;
static toObject(includeInstance: boolean, msg: Documentation): Documentation.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Documentation, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Documentation;
static deserializeBinaryFromReader(message: Documentation, reader: jspb.BinaryReader): Documentation;
}
export namespace Documentation {
export type AsObject = {
summary: string,
pagesList: Array<Page.AsObject>,
rulesList: Array<DocumentationRule.AsObject>,
documentationRootUrl: string,
serviceRootUrl: string,
overview: string,
}
}
export class DocumentationRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getDeprecationDescription(): string;
setDeprecationDescription(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DocumentationRule.AsObject;
static toObject(includeInstance: boolean, msg: DocumentationRule): DocumentationRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DocumentationRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DocumentationRule;
static deserializeBinaryFromReader(message: DocumentationRule, reader: jspb.BinaryReader): DocumentationRule;
}
export namespace DocumentationRule {
export type AsObject = {
selector: string,
description: string,
deprecationDescription: string,
}
}
export class Page extends jspb.Message {
getName(): string;
setName(value: string): void;
getContent(): string;
setContent(value: string): void;
clearSubpagesList(): void;
getSubpagesList(): Array<Page>;
setSubpagesList(value: Array<Page>): void;
addSubpages(value?: Page, index?: number): Page;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Page.AsObject;
static toObject(includeInstance: boolean, msg: Page): Page.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Page, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Page;
static deserializeBinaryFromReader(message: Page, reader: jspb.BinaryReader): Page;
}
export namespace Page {
export type AsObject = {
name: string,
content: string,
subpagesList: Array<Page.AsObject>,
}
}

View File

@ -0,0 +1,785 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Documentation', null, global);
goog.exportSymbol('proto.google.api.DocumentationRule', null, global);
goog.exportSymbol('proto.google.api.Page', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Documentation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Documentation.repeatedFields_, null);
};
goog.inherits(proto.google.api.Documentation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Documentation.displayName = 'proto.google.api.Documentation';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Documentation.repeatedFields_ = [5,3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Documentation.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Documentation.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Documentation} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Documentation.toObject = function(includeInstance, msg) {
var f, obj = {
summary: msg.getSummary(),
pagesList: jspb.Message.toObjectList(msg.getPagesList(),
proto.google.api.Page.toObject, includeInstance),
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.DocumentationRule.toObject, includeInstance),
documentationRootUrl: msg.getDocumentationRootUrl(),
serviceRootUrl: msg.getServiceRootUrl(),
overview: msg.getOverview()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Documentation}
*/
proto.google.api.Documentation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Documentation;
return proto.google.api.Documentation.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Documentation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Documentation}
*/
proto.google.api.Documentation.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSummary(value);
break;
case 5:
var value = new proto.google.api.Page;
reader.readMessage(value,proto.google.api.Page.deserializeBinaryFromReader);
msg.getPagesList().push(value);
msg.setPagesList(msg.getPagesList());
break;
case 3:
var value = new proto.google.api.DocumentationRule;
reader.readMessage(value,proto.google.api.DocumentationRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDocumentationRootUrl(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setServiceRootUrl(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setOverview(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Documentation} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Documentation.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Documentation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Documentation.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSummary();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPagesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.google.api.Page.serializeBinaryToWriter
);
}
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.google.api.DocumentationRule.serializeBinaryToWriter
);
}
f = this.getDocumentationRootUrl();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = this.getServiceRootUrl();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getOverview();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Documentation} The clone.
*/
proto.google.api.Documentation.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Documentation} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string summary = 1;
* @return {string}
*/
proto.google.api.Documentation.prototype.getSummary = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Documentation.prototype.setSummary = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated Page pages = 5;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Page>}
*/
proto.google.api.Documentation.prototype.getPagesList = function() {
return /** @type{!Array.<!proto.google.api.Page>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Page, 5));
};
/** @param {Array.<!proto.google.api.Page>} value */
proto.google.api.Documentation.prototype.setPagesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 5, value);
};
proto.google.api.Documentation.prototype.clearPagesList = function() {
this.setPagesList([]);
};
/**
* repeated DocumentationRule rules = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.DocumentationRule>}
*/
proto.google.api.Documentation.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.DocumentationRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.DocumentationRule, 3));
};
/** @param {Array.<!proto.google.api.DocumentationRule>} value */
proto.google.api.Documentation.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.google.api.Documentation.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* optional string documentation_root_url = 4;
* @return {string}
*/
proto.google.api.Documentation.prototype.getDocumentationRootUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
};
/** @param {string} value */
proto.google.api.Documentation.prototype.setDocumentationRootUrl = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional string service_root_url = 6;
* @return {string}
*/
proto.google.api.Documentation.prototype.getServiceRootUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};
/** @param {string} value */
proto.google.api.Documentation.prototype.setServiceRootUrl = function(value) {
jspb.Message.setField(this, 6, value);
};
/**
* optional string overview = 2;
* @return {string}
*/
proto.google.api.Documentation.prototype.getOverview = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.Documentation.prototype.setOverview = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.DocumentationRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.DocumentationRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.DocumentationRule.displayName = 'proto.google.api.DocumentationRule';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.DocumentationRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.DocumentationRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.DocumentationRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.DocumentationRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
description: msg.getDescription(),
deprecationDescription: msg.getDeprecationDescription()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.DocumentationRule}
*/
proto.google.api.DocumentationRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.DocumentationRule;
return proto.google.api.DocumentationRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.DocumentationRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.DocumentationRule}
*/
proto.google.api.DocumentationRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDeprecationDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.DocumentationRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.DocumentationRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.DocumentationRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.DocumentationRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDeprecationDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.DocumentationRule} The clone.
*/
proto.google.api.DocumentationRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.DocumentationRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.DocumentationRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.DocumentationRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.google.api.DocumentationRule.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.DocumentationRule.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string deprecation_description = 3;
* @return {string}
*/
proto.google.api.DocumentationRule.prototype.getDeprecationDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.DocumentationRule.prototype.setDeprecationDescription = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Page = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Page.repeatedFields_, null);
};
goog.inherits(proto.google.api.Page, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Page.displayName = 'proto.google.api.Page';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Page.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Page.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Page.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Page} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Page.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
content: msg.getContent(),
subpagesList: jspb.Message.toObjectList(msg.getSubpagesList(),
proto.google.api.Page.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Page}
*/
proto.google.api.Page.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Page;
return proto.google.api.Page.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Page} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Page}
*/
proto.google.api.Page.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setContent(value);
break;
case 3:
var value = new proto.google.api.Page;
reader.readMessage(value,proto.google.api.Page.deserializeBinaryFromReader);
msg.getSubpagesList().push(value);
msg.setSubpagesList(msg.getSubpagesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Page} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Page.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Page.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Page.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getContent();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getSubpagesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.google.api.Page.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Page} The clone.
*/
proto.google.api.Page.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Page} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.Page.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Page.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string content = 2;
* @return {string}
*/
proto.google.api.Page.prototype.getContent = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.Page.prototype.setContent = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* repeated Page subpages = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Page>}
*/
proto.google.api.Page.prototype.getSubpagesList = function() {
return /** @type{!Array.<!proto.google.api.Page>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Page, 3));
};
/** @param {Array.<!proto.google.api.Page>} value */
proto.google.api.Page.prototype.setSubpagesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.google.api.Page.prototype.clearSubpagesList = function() {
this.setSubpagesList([]);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

39
api/js/google/api/endpoint_pb.d.ts vendored Normal file
View File

@ -0,0 +1,39 @@
// package: google.api
// file: google/api/endpoint.proto
import * as jspb from "google-protobuf";
export class Endpoint extends jspb.Message {
getName(): string;
setName(value: string): void;
clearAliasesList(): void;
getAliasesList(): Array<string>;
setAliasesList(value: Array<string>): void;
addAliases(value: string, index?: number): string;
getTarget(): string;
setTarget(value: string): void;
getAllowCors(): boolean;
setAllowCors(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Endpoint.AsObject;
static toObject(includeInstance: boolean, msg: Endpoint): Endpoint.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Endpoint, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Endpoint;
static deserializeBinaryFromReader(message: Endpoint, reader: jspb.BinaryReader): Endpoint;
}
export namespace Endpoint {
export type AsObject = {
name: string,
aliasesList: Array<string>,
target: string,
allowCors: boolean,
}
}

View File

@ -0,0 +1,270 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Endpoint', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Endpoint = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Endpoint.repeatedFields_, null);
};
goog.inherits(proto.google.api.Endpoint, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Endpoint.displayName = 'proto.google.api.Endpoint';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Endpoint.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Endpoint.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Endpoint.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Endpoint} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Endpoint.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
aliasesList: jspb.Message.getField(msg, 2),
target: msg.getTarget(),
allowCors: msg.getAllowCors()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Endpoint}
*/
proto.google.api.Endpoint.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Endpoint;
return proto.google.api.Endpoint.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Endpoint} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Endpoint}
*/
proto.google.api.Endpoint.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getAliasesList().push(value);
msg.setAliasesList(msg.getAliasesList());
break;
case 101:
var value = /** @type {string} */ (reader.readString());
msg.setTarget(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAllowCors(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Endpoint} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Endpoint.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Endpoint.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Endpoint.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAliasesList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getTarget();
if (f.length > 0) {
writer.writeString(
101,
f
);
}
f = this.getAllowCors();
if (f) {
writer.writeBool(
5,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Endpoint} The clone.
*/
proto.google.api.Endpoint.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Endpoint} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.Endpoint.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Endpoint.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string aliases = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.Endpoint.prototype.getAliasesList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
};
/** @param {Array.<string>} value */
proto.google.api.Endpoint.prototype.setAliasesList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.google.api.Endpoint.prototype.clearAliasesList = function() {
jspb.Message.setField(this, 2, []);
};
/**
* optional string target = 101;
* @return {string}
*/
proto.google.api.Endpoint.prototype.getTarget = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 101, ""));
};
/** @param {string} value */
proto.google.api.Endpoint.prototype.setTarget = function(value) {
jspb.Message.setField(this, 101, value);
};
/**
* optional bool allow_cors = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.google.api.Endpoint.prototype.getAllowCors = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 5, false));
};
/** @param {boolean} value */
proto.google.api.Endpoint.prototype.setAllowCors = function(value) {
jspb.Message.setField(this, 5, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

30
api/js/google/api/error_reason_pb.d.ts vendored Normal file
View File

@ -0,0 +1,30 @@
// package: google.api
// file: google/api/error_reason.proto
import * as jspb from "google-protobuf";
export interface ErrorReasonMap {
ERROR_REASON_UNSPECIFIED: 0;
SERVICE_DISABLED: 1;
BILLING_DISABLED: 2;
API_KEY_INVALID: 3;
API_KEY_SERVICE_BLOCKED: 4;
API_KEY_HTTP_REFERRER_BLOCKED: 7;
API_KEY_IP_ADDRESS_BLOCKED: 8;
API_KEY_ANDROID_APP_BLOCKED: 9;
API_KEY_IOS_APP_BLOCKED: 13;
RATE_LIMIT_EXCEEDED: 5;
RESOURCE_QUOTA_EXCEEDED: 6;
LOCATION_TAX_POLICY_VIOLATED: 10;
USER_PROJECT_DENIED: 11;
CONSUMER_SUSPENDED: 12;
CONSUMER_INVALID: 14;
SECURITY_POLICY_VIOLATED: 15;
ACCESS_TOKEN_EXPIRED: 16;
ACCESS_TOKEN_SCOPE_INSUFFICIENT: 17;
ACCOUNT_STATE_INVALID: 18;
ACCESS_TOKEN_TYPE_UNSUPPORTED: 19;
}
export const ErrorReason: ErrorReasonMap;

View File

@ -0,0 +1,39 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.ErrorReason', null, global);
/**
* @enum {number}
*/
proto.google.api.ErrorReason = {
ERROR_REASON_UNSPECIFIED: 0,
SERVICE_DISABLED: 1,
BILLING_DISABLED: 2,
API_KEY_INVALID: 3,
API_KEY_SERVICE_BLOCKED: 4,
API_KEY_HTTP_REFERRER_BLOCKED: 7,
API_KEY_IP_ADDRESS_BLOCKED: 8,
API_KEY_ANDROID_APP_BLOCKED: 9,
API_KEY_IOS_APP_BLOCKED: 13,
RATE_LIMIT_EXCEEDED: 5,
RESOURCE_QUOTA_EXCEEDED: 6,
LOCATION_TAX_POLICY_VIOLATED: 10,
USER_PROJECT_DENIED: 11,
CONSUMER_SUSPENDED: 12,
CONSUMER_INVALID: 14,
SECURITY_POLICY_VIOLATED: 15,
ACCESS_TOKEN_EXPIRED: 16,
ACCESS_TOKEN_SCOPE_INSUFFICIENT: 17,
ACCOUNT_STATE_INVALID: 18,
ACCESS_TOKEN_TYPE_UNSUPPORTED: 19
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,21 @@
// package: google.api
// file: google/api/field_behavior.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export const fieldBehavior: jspb.ExtensionFieldInfo<FieldBehaviorMap>;
export interface FieldBehaviorMap {
FIELD_BEHAVIOR_UNSPECIFIED: 0;
OPTIONAL: 1;
REQUIRED: 2;
OUTPUT_ONLY: 3;
INPUT_ONLY: 4;
IMMUTABLE: 5;
UNORDERED_LIST: 6;
NON_EMPTY_DEFAULT: 7;
}
export const FieldBehavior: FieldBehaviorMap;

View File

@ -0,0 +1,54 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.field_behavior', null, global);
goog.exportSymbol('proto.google.api.FieldBehavior', null, global);
/**
* @enum {number}
*/
proto.google.api.FieldBehavior = {
FIELD_BEHAVIOR_UNSPECIFIED: 0,
OPTIONAL: 1,
REQUIRED: 2,
OUTPUT_ONLY: 3,
INPUT_ONLY: 4,
IMMUTABLE: 5,
UNORDERED_LIST: 6,
NON_EMPTY_DEFAULT: 7
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `fieldBehaviorList`.
* @type {!jspb.ExtensionFieldInfo.<!Array.<!proto.google.api.FieldBehavior>>}
*/
proto.google.api.fieldBehaviorList = new jspb.ExtensionFieldInfo(
1052,
{fieldBehaviorList: 0},
null,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
null),
1);
google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1052] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.fieldBehaviorList,
jspb.BinaryReader.prototype.readPackedEnum,
jspb.BinaryWriter.prototype.writePackedEnum,
null,
null,
true);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[1052] = proto.google.api.fieldBehaviorList;
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/http_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

136
api/js/google/api/http_pb.d.ts vendored Normal file
View File

@ -0,0 +1,136 @@
// package: google.api
// file: google/api/http.proto
import * as jspb from "google-protobuf";
export class Http extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<HttpRule>;
setRulesList(value: Array<HttpRule>): void;
addRules(value?: HttpRule, index?: number): HttpRule;
getFullyDecodeReservedExpansion(): boolean;
setFullyDecodeReservedExpansion(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Http.AsObject;
static toObject(includeInstance: boolean, msg: Http): Http.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Http;
static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http;
}
export namespace Http {
export type AsObject = {
rulesList: Array<HttpRule.AsObject>,
fullyDecodeReservedExpansion: boolean,
}
}
export class HttpRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
hasGet(): boolean;
clearGet(): void;
getGet(): string;
setGet(value: string): void;
hasPut(): boolean;
clearPut(): void;
getPut(): string;
setPut(value: string): void;
hasPost(): boolean;
clearPost(): void;
getPost(): string;
setPost(value: string): void;
hasDelete(): boolean;
clearDelete(): void;
getDelete(): string;
setDelete(value: string): void;
hasPatch(): boolean;
clearPatch(): void;
getPatch(): string;
setPatch(value: string): void;
hasCustom(): boolean;
clearCustom(): void;
getCustom(): CustomHttpPattern | undefined;
setCustom(value?: CustomHttpPattern): void;
getBody(): string;
setBody(value: string): void;
getResponseBody(): string;
setResponseBody(value: string): void;
clearAdditionalBindingsList(): void;
getAdditionalBindingsList(): Array<HttpRule>;
setAdditionalBindingsList(value: Array<HttpRule>): void;
addAdditionalBindings(value?: HttpRule, index?: number): HttpRule;
getPatternCase(): HttpRule.PatternCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): HttpRule.AsObject;
static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): HttpRule;
static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule;
}
export namespace HttpRule {
export type AsObject = {
selector: string,
get: string,
put: string,
post: string,
pb_delete: string,
patch: string,
custom?: CustomHttpPattern.AsObject,
body: string,
responseBody: string,
additionalBindingsList: Array<HttpRule.AsObject>,
}
export enum PatternCase {
PATTERN_NOT_SET = 0,
GET = 2,
PUT = 3,
POST = 4,
DELETE = 5,
PATCH = 6,
CUSTOM = 8,
}
}
export class CustomHttpPattern extends jspb.Message {
getKind(): string;
setKind(value: string): void;
getPath(): string;
setPath(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CustomHttpPattern.AsObject;
static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CustomHttpPattern;
static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern;
}
export namespace CustomHttpPattern {
export type AsObject = {
kind: string,
path: string,
}
}

View File

@ -0,0 +1,946 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global);
goog.exportSymbol('proto.google.api.Http', null, global);
goog.exportSymbol('proto.google.api.HttpRule', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Http = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null);
};
goog.inherits(proto.google.api.Http, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Http.displayName = 'proto.google.api.Http';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Http.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Http.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Http.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Http} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Http.toObject = function(includeInstance, msg) {
var f, obj = {
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.HttpRule.toObject, includeInstance),
fullyDecodeReservedExpansion: msg.getFullyDecodeReservedExpansion()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Http}
*/
proto.google.api.Http.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Http;
return proto.google.api.Http.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Http} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Http}
*/
proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.HttpRule;
reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setFullyDecodeReservedExpansion(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Http} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Http.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Http.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Http.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.HttpRule.serializeBinaryToWriter
);
}
f = this.getFullyDecodeReservedExpansion();
if (f) {
writer.writeBool(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Http} The clone.
*/
proto.google.api.Http.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Http} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated HttpRule rules = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.HttpRule>}
*/
proto.google.api.Http.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.HttpRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1));
};
/** @param {Array.<!proto.google.api.HttpRule>} value */
proto.google.api.Http.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Http.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* optional bool fully_decode_reserved_expansion = 2;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 2, false));
};
/** @param {boolean} value */
proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.HttpRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_);
};
goog.inherits(proto.google.api.HttpRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.HttpRule.repeatedFields_ = [11];
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]];
/**
* @enum {number}
*/
proto.google.api.HttpRule.PatternCase = {
PATTERN_NOT_SET: 0,
GET: 2,
PUT: 3,
POST: 4,
DELETE: 5,
PATCH: 6,
CUSTOM: 8
};
/**
* @return {proto.google.api.HttpRule.PatternCase}
*/
proto.google.api.HttpRule.prototype.getPatternCase = function() {
return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.HttpRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.HttpRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.HttpRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
get: jspb.Message.getField(msg, 2),
put: jspb.Message.getField(msg, 3),
post: jspb.Message.getField(msg, 4),
pb_delete: jspb.Message.getField(msg, 5),
patch: jspb.Message.getField(msg, 6),
custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f),
body: msg.getBody(),
responseBody: msg.getResponseBody(),
additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(),
proto.google.api.HttpRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.HttpRule}
*/
proto.google.api.HttpRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.HttpRule;
return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.HttpRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.HttpRule}
*/
proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setGet(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setPut(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPost(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDelete(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setPatch(value);
break;
case 8:
var value = new proto.google.api.CustomHttpPattern;
reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader);
msg.setCustom(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setBody(value);
break;
case 12:
var value = /** @type {string} */ (reader.readString());
msg.setResponseBody(value);
break;
case 11:
var value = new proto.google.api.HttpRule;
reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader);
msg.getAdditionalBindingsList().push(value);
msg.setAdditionalBindingsList(msg.getAdditionalBindingsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.HttpRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.HttpRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.HttpRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = jspb.Message.getField(this, 2);
if (f != null) {
writer.writeString(
2,
f
);
}
f = jspb.Message.getField(this, 3);
if (f != null) {
writer.writeString(
3,
f
);
}
f = jspb.Message.getField(this, 4);
if (f != null) {
writer.writeString(
4,
f
);
}
f = jspb.Message.getField(this, 5);
if (f != null) {
writer.writeString(
5,
f
);
}
f = jspb.Message.getField(this, 6);
if (f != null) {
writer.writeString(
6,
f
);
}
f = this.getCustom();
if (f != null) {
writer.writeMessage(
8,
f,
proto.google.api.CustomHttpPattern.serializeBinaryToWriter
);
}
f = this.getBody();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = this.getResponseBody();
if (f.length > 0) {
writer.writeString(
12,
f
);
}
f = this.getAdditionalBindingsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
11,
f,
proto.google.api.HttpRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.HttpRule} The clone.
*/
proto.google.api.HttpRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.HttpRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.HttpRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string get = 2;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getGet = function() {
return /** @type {string} */ (!this.hasGet() ? "" : jspb.Message.getField(this, 2));
};
/** @param {string?|undefined} value */
proto.google.api.HttpRule.prototype.setGet = function(value) {
jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearGet = function() {
jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasGet = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string put = 3;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPut = function() {
return /** @type {string} */ (!this.hasPut() ? "" : jspb.Message.getField(this, 3));
};
/** @param {string?|undefined} value */
proto.google.api.HttpRule.prototype.setPut = function(value) {
jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearPut = function() {
jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasPut = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional string post = 4;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPost = function() {
return /** @type {string} */ (!this.hasPost() ? "" : jspb.Message.getField(this, 4));
};
/** @param {string?|undefined} value */
proto.google.api.HttpRule.prototype.setPost = function(value) {
jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearPost = function() {
jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasPost = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional string delete = 5;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getDelete = function() {
return /** @type {string} */ (!this.hasDelete() ? "" : jspb.Message.getField(this, 5));
};
/** @param {string?|undefined} value */
proto.google.api.HttpRule.prototype.setDelete = function(value) {
jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearDelete = function() {
jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasDelete = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional string patch = 6;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPatch = function() {
return /** @type {string} */ (!this.hasPatch() ? "" : jspb.Message.getField(this, 6));
};
/** @param {string?|undefined} value */
proto.google.api.HttpRule.prototype.setPatch = function(value) {
jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearPatch = function() {
jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasPatch = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional CustomHttpPattern custom = 8;
* @return {proto.google.api.CustomHttpPattern}
*/
proto.google.api.HttpRule.prototype.getCustom = function() {
return /** @type{proto.google.api.CustomHttpPattern} */ (
jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8));
};
/** @param {proto.google.api.CustomHttpPattern|undefined} value */
proto.google.api.HttpRule.prototype.setCustom = function(value) {
jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value);
};
proto.google.api.HttpRule.prototype.clearCustom = function() {
this.setCustom(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.HttpRule.prototype.hasCustom = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional string body = 7;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getBody = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
};
/** @param {string} value */
proto.google.api.HttpRule.prototype.setBody = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* optional string response_body = 12;
* @return {string}
*/
proto.google.api.HttpRule.prototype.getResponseBody = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 12, ""));
};
/** @param {string} value */
proto.google.api.HttpRule.prototype.setResponseBody = function(value) {
jspb.Message.setField(this, 12, value);
};
/**
* repeated HttpRule additional_bindings = 11;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.HttpRule>}
*/
proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() {
return /** @type{!Array.<!proto.google.api.HttpRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11));
};
/** @param {Array.<!proto.google.api.HttpRule>} value */
proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 11, value);
};
proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() {
this.setAdditionalBindingsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.CustomHttpPattern = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) {
var f, obj = {
kind: msg.getKind(),
path: msg.getPath()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.CustomHttpPattern}
*/
proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.CustomHttpPattern;
return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.CustomHttpPattern}
*/
proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setKind(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setPath(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.CustomHttpPattern} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.CustomHttpPattern.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getKind();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPath();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.CustomHttpPattern} The clone.
*/
proto.google.api.CustomHttpPattern.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.CustomHttpPattern} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string kind = 1;
* @return {string}
*/
proto.google.api.CustomHttpPattern.prototype.getKind = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.CustomHttpPattern.prototype.setKind = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string path = 2;
* @return {string}
*/
proto.google.api.CustomHttpPattern.prototype.getPath = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.CustomHttpPattern.prototype.setPath = function(value) {
jspb.Message.setField(this, 2, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

38
api/js/google/api/httpbody_pb.d.ts vendored Normal file
View File

@ -0,0 +1,38 @@
// package: google.api
// file: google/api/httpbody.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
export class HttpBody extends jspb.Message {
getContentType(): string;
setContentType(value: string): void;
getData(): Uint8Array | string;
getData_asU8(): Uint8Array;
getData_asB64(): string;
setData(value: Uint8Array | string): void;
clearExtensionsList(): void;
getExtensionsList(): Array<google_protobuf_any_pb.Any>;
setExtensionsList(value: Array<google_protobuf_any_pb.Any>): void;
addExtensions(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): HttpBody.AsObject;
static toObject(includeInstance: boolean, msg: HttpBody): HttpBody.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: HttpBody, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): HttpBody;
static deserializeBinaryFromReader(message: HttpBody, reader: jspb.BinaryReader): HttpBody;
}
export namespace HttpBody {
export type AsObject = {
contentType: string,
data: Uint8Array | string,
extensionsList: Array<google_protobuf_any_pb.Any.AsObject>,
}
}

View File

@ -0,0 +1,270 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.exportSymbol('proto.google.api.HttpBody', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.HttpBody = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpBody.repeatedFields_, null);
};
goog.inherits(proto.google.api.HttpBody, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.HttpBody.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.HttpBody.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.HttpBody} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.HttpBody.toObject = function(includeInstance, msg) {
var f, obj = {
contentType: msg.getContentType(),
data: msg.getData_asB64(),
extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(),
google_protobuf_any_pb.Any.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.HttpBody}
*/
proto.google.api.HttpBody.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.HttpBody;
return proto.google.api.HttpBody.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.HttpBody} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.HttpBody}
*/
proto.google.api.HttpBody.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setContentType(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.getExtensionsList().push(value);
msg.setExtensionsList(msg.getExtensionsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.HttpBody} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.HttpBody.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.HttpBody.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getContentType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = this.getExtensionsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.HttpBody} The clone.
*/
proto.google.api.HttpBody.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.HttpBody} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string content_type = 1;
* @return {string}
*/
proto.google.api.HttpBody.prototype.getContentType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.HttpBody.prototype.setContentType = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional bytes data = 2;
* @return {!(string|Uint8Array)}
*/
proto.google.api.HttpBody.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/**
* optional bytes data = 2;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.google.api.HttpBody.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.google.api.HttpBody.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/** @param {!(string|Uint8Array)} value */
proto.google.api.HttpBody.prototype.setData = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* repeated google.protobuf.Any extensions = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.protobuf.Any>}
*/
proto.google.api.HttpBody.prototype.getExtensionsList = function() {
return /** @type{!Array.<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/** @param {Array.<!proto.google.protobuf.Any>} value */
proto.google.api.HttpBody.prototype.setExtensionsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.google.api.HttpBody.prototype.clearExtensionsList = function() {
this.setExtensionsList([]);
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/label_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

41
api/js/google/api/label_pb.d.ts vendored Normal file
View File

@ -0,0 +1,41 @@
// package: google.api
// file: google/api/label.proto
import * as jspb from "google-protobuf";
export class LabelDescriptor extends jspb.Message {
getKey(): string;
setKey(value: string): void;
getValueType(): LabelDescriptor.ValueTypeMap[keyof LabelDescriptor.ValueTypeMap];
setValueType(value: LabelDescriptor.ValueTypeMap[keyof LabelDescriptor.ValueTypeMap]): void;
getDescription(): string;
setDescription(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LabelDescriptor.AsObject;
static toObject(includeInstance: boolean, msg: LabelDescriptor): LabelDescriptor.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LabelDescriptor, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LabelDescriptor;
static deserializeBinaryFromReader(message: LabelDescriptor, reader: jspb.BinaryReader): LabelDescriptor;
}
export namespace LabelDescriptor {
export type AsObject = {
key: string,
valueType: LabelDescriptor.ValueTypeMap[keyof LabelDescriptor.ValueTypeMap],
description: string,
}
export interface ValueTypeMap {
STRING: 0;
BOOL: 1;
INT64: 2;
}
export const ValueType: ValueTypeMap;
}

View File

@ -0,0 +1,236 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.LabelDescriptor', null, global);
goog.exportSymbol('proto.google.api.LabelDescriptor.ValueType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.LabelDescriptor = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.LabelDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.LabelDescriptor.displayName = 'proto.google.api.LabelDescriptor';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.LabelDescriptor.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.LabelDescriptor.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.LabelDescriptor} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.LabelDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
key: msg.getKey(),
valueType: msg.getValueType(),
description: msg.getDescription()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.LabelDescriptor}
*/
proto.google.api.LabelDescriptor.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.LabelDescriptor;
return proto.google.api.LabelDescriptor.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.LabelDescriptor} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.LabelDescriptor}
*/
proto.google.api.LabelDescriptor.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 2:
var value = /** @type {!proto.google.api.LabelDescriptor.ValueType} */ (reader.readEnum());
msg.setValueType(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.LabelDescriptor} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.LabelDescriptor.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.LabelDescriptor.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.LabelDescriptor.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getValueType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.LabelDescriptor} The clone.
*/
proto.google.api.LabelDescriptor.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.LabelDescriptor} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string key = 1;
* @return {string}
*/
proto.google.api.LabelDescriptor.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.LabelDescriptor.prototype.setKey = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional ValueType value_type = 2;
* @return {!proto.google.api.LabelDescriptor.ValueType}
*/
proto.google.api.LabelDescriptor.prototype.getValueType = function() {
return /** @type {!proto.google.api.LabelDescriptor.ValueType} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {!proto.google.api.LabelDescriptor.ValueType} value */
proto.google.api.LabelDescriptor.prototype.setValueType = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.LabelDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.LabelDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* @enum {number}
*/
proto.google.api.LabelDescriptor.ValueType = {
STRING: 0,
BOOL: 1,
INT64: 2
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

18
api/js/google/api/launch_stage_pb.d.ts vendored Normal file
View File

@ -0,0 +1,18 @@
// package: google.api
// file: google/api/launch_stage.proto
import * as jspb from "google-protobuf";
export interface LaunchStageMap {
LAUNCH_STAGE_UNSPECIFIED: 0;
UNIMPLEMENTED: 6;
PRELAUNCH: 7;
EARLY_ACCESS: 1;
ALPHA: 2;
BETA: 3;
GA: 4;
DEPRECATED: 5;
}
export const LaunchStage: LaunchStageMap;

View File

@ -0,0 +1,27 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.LaunchStage', null, global);
/**
* @enum {number}
*/
proto.google.api.LaunchStage = {
LAUNCH_STAGE_UNSPECIFIED: 0,
UNIMPLEMENTED: 6,
PRELAUNCH: 7,
EARLY_ACCESS: 1,
ALPHA: 2,
BETA: 3,
GA: 4,
DEPRECATED: 5
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/log_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

40
api/js/google/api/log_pb.d.ts vendored Normal file
View File

@ -0,0 +1,40 @@
// package: google.api
// file: google/api/log.proto
import * as jspb from "google-protobuf";
import * as google_api_label_pb from "../../google/api/label_pb";
export class LogDescriptor extends jspb.Message {
getName(): string;
setName(value: string): void;
clearLabelsList(): void;
getLabelsList(): Array<google_api_label_pb.LabelDescriptor>;
setLabelsList(value: Array<google_api_label_pb.LabelDescriptor>): void;
addLabels(value?: google_api_label_pb.LabelDescriptor, index?: number): google_api_label_pb.LabelDescriptor;
getDescription(): string;
setDescription(value: string): void;
getDisplayName(): string;
setDisplayName(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LogDescriptor.AsObject;
static toObject(includeInstance: boolean, msg: LogDescriptor): LogDescriptor.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LogDescriptor, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LogDescriptor;
static deserializeBinaryFromReader(message: LogDescriptor, reader: jspb.BinaryReader): LogDescriptor;
}
export namespace LogDescriptor {
export type AsObject = {
name: string,
labelsList: Array<google_api_label_pb.LabelDescriptor.AsObject>,
description: string,
displayName: string,
}
}

273
api/js/google/api/log_pb.js Normal file
View File

@ -0,0 +1,273 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_api_label_pb = require('../../google/api/label_pb.js');
goog.exportSymbol('proto.google.api.LogDescriptor', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.LogDescriptor = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.LogDescriptor.repeatedFields_, null);
};
goog.inherits(proto.google.api.LogDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.LogDescriptor.displayName = 'proto.google.api.LogDescriptor';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.LogDescriptor.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.LogDescriptor.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.LogDescriptor.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.LogDescriptor} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.LogDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
google_api_label_pb.LabelDescriptor.toObject, includeInstance),
description: msg.getDescription(),
displayName: msg.getDisplayName()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.LogDescriptor}
*/
proto.google.api.LogDescriptor.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.LogDescriptor;
return proto.google.api.LogDescriptor.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.LogDescriptor} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.LogDescriptor}
*/
proto.google.api.LogDescriptor.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = new google_api_label_pb.LabelDescriptor;
reader.readMessage(value,google_api_label_pb.LabelDescriptor.deserializeBinaryFromReader);
msg.getLabelsList().push(value);
msg.setLabelsList(msg.getLabelsList());
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDisplayName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.LogDescriptor} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.LogDescriptor.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.LogDescriptor.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.LogDescriptor.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
google_api_label_pb.LabelDescriptor.serializeBinaryToWriter
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getDisplayName();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.LogDescriptor} The clone.
*/
proto.google.api.LogDescriptor.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.LogDescriptor} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.LogDescriptor.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.LogDescriptor.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated LabelDescriptor labels = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.LabelDescriptor>}
*/
proto.google.api.LogDescriptor.prototype.getLabelsList = function() {
return /** @type{!Array.<!proto.google.api.LabelDescriptor>} */ (
jspb.Message.getRepeatedWrapperField(this, google_api_label_pb.LabelDescriptor, 2));
};
/** @param {Array.<!proto.google.api.LabelDescriptor>} value */
proto.google.api.LogDescriptor.prototype.setLabelsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.LogDescriptor.prototype.clearLabelsList = function() {
this.setLabelsList([]);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.LogDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.LogDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional string display_name = 4;
* @return {string}
*/
proto.google.api.LogDescriptor.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
};
/** @param {string} value */
proto.google.api.LogDescriptor.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 4, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

59
api/js/google/api/logging_pb.d.ts vendored Normal file
View File

@ -0,0 +1,59 @@
// package: google.api
// file: google/api/logging.proto
import * as jspb from "google-protobuf";
export class Logging extends jspb.Message {
clearProducerDestinationsList(): void;
getProducerDestinationsList(): Array<Logging.LoggingDestination>;
setProducerDestinationsList(value: Array<Logging.LoggingDestination>): void;
addProducerDestinations(value?: Logging.LoggingDestination, index?: number): Logging.LoggingDestination;
clearConsumerDestinationsList(): void;
getConsumerDestinationsList(): Array<Logging.LoggingDestination>;
setConsumerDestinationsList(value: Array<Logging.LoggingDestination>): void;
addConsumerDestinations(value?: Logging.LoggingDestination, index?: number): Logging.LoggingDestination;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Logging.AsObject;
static toObject(includeInstance: boolean, msg: Logging): Logging.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Logging, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Logging;
static deserializeBinaryFromReader(message: Logging, reader: jspb.BinaryReader): Logging;
}
export namespace Logging {
export type AsObject = {
producerDestinationsList: Array<Logging.LoggingDestination.AsObject>,
consumerDestinationsList: Array<Logging.LoggingDestination.AsObject>,
}
export class LoggingDestination extends jspb.Message {
getMonitoredResource(): string;
setMonitoredResource(value: string): void;
clearLogsList(): void;
getLogsList(): Array<string>;
setLogsList(value: Array<string>): void;
addLogs(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LoggingDestination.AsObject;
static toObject(includeInstance: boolean, msg: LoggingDestination): LoggingDestination.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LoggingDestination, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LoggingDestination;
static deserializeBinaryFromReader(message: LoggingDestination, reader: jspb.BinaryReader): LoggingDestination;
}
export namespace LoggingDestination {
export type AsObject = {
monitoredResource: string,
logsList: Array<string>,
}
}
}

View File

@ -0,0 +1,432 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Logging', null, global);
goog.exportSymbol('proto.google.api.Logging.LoggingDestination', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Logging = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Logging.repeatedFields_, null);
};
goog.inherits(proto.google.api.Logging, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Logging.displayName = 'proto.google.api.Logging';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Logging.repeatedFields_ = [1,2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Logging.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Logging.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Logging} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Logging.toObject = function(includeInstance, msg) {
var f, obj = {
producerDestinationsList: jspb.Message.toObjectList(msg.getProducerDestinationsList(),
proto.google.api.Logging.LoggingDestination.toObject, includeInstance),
consumerDestinationsList: jspb.Message.toObjectList(msg.getConsumerDestinationsList(),
proto.google.api.Logging.LoggingDestination.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Logging}
*/
proto.google.api.Logging.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Logging;
return proto.google.api.Logging.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Logging} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Logging}
*/
proto.google.api.Logging.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.Logging.LoggingDestination;
reader.readMessage(value,proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader);
msg.getProducerDestinationsList().push(value);
msg.setProducerDestinationsList(msg.getProducerDestinationsList());
break;
case 2:
var value = new proto.google.api.Logging.LoggingDestination;
reader.readMessage(value,proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader);
msg.getConsumerDestinationsList().push(value);
msg.setConsumerDestinationsList(msg.getConsumerDestinationsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Logging} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Logging.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Logging.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Logging.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getProducerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter
);
}
f = this.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Logging} The clone.
*/
proto.google.api.Logging.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Logging} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated LoggingDestination producer_destinations = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Logging.LoggingDestination>}
*/
proto.google.api.Logging.prototype.getProducerDestinationsList = function() {
return /** @type{!Array.<!proto.google.api.Logging.LoggingDestination>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Logging.LoggingDestination, 1));
};
/** @param {Array.<!proto.google.api.Logging.LoggingDestination>} value */
proto.google.api.Logging.prototype.setProducerDestinationsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Logging.prototype.clearProducerDestinationsList = function() {
this.setProducerDestinationsList([]);
};
/**
* repeated LoggingDestination consumer_destinations = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Logging.LoggingDestination>}
*/
proto.google.api.Logging.prototype.getConsumerDestinationsList = function() {
return /** @type{!Array.<!proto.google.api.Logging.LoggingDestination>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Logging.LoggingDestination, 2));
};
/** @param {Array.<!proto.google.api.Logging.LoggingDestination>} value */
proto.google.api.Logging.prototype.setConsumerDestinationsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.Logging.prototype.clearConsumerDestinationsList = function() {
this.setConsumerDestinationsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Logging.LoggingDestination = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Logging.LoggingDestination.repeatedFields_, null);
};
goog.inherits(proto.google.api.Logging.LoggingDestination, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Logging.LoggingDestination.displayName = 'proto.google.api.Logging.LoggingDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Logging.LoggingDestination.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Logging.LoggingDestination.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Logging.LoggingDestination.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Logging.LoggingDestination} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Logging.LoggingDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
logsList: jspb.Message.getField(msg, 1)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Logging.LoggingDestination}
*/
proto.google.api.Logging.LoggingDestination.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Logging.LoggingDestination;
return proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Logging.LoggingDestination} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Logging.LoggingDestination}
*/
proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMonitoredResource(value);
break;
case 1:
var value = /** @type {string} */ (reader.readString());
msg.getLogsList().push(value);
msg.setLogsList(msg.getLogsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Logging.LoggingDestination} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Logging.LoggingDestination.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Logging.LoggingDestination.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getLogsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Logging.LoggingDestination} The clone.
*/
proto.google.api.Logging.LoggingDestination.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Logging.LoggingDestination} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string monitored_resource = 3;
* @return {string}
*/
proto.google.api.Logging.LoggingDestination.prototype.getMonitoredResource = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.Logging.LoggingDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* repeated string logs = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.Logging.LoggingDestination.prototype.getLogsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 1));
};
/** @param {Array.<string>} value */
proto.google.api.Logging.LoggingDestination.prototype.setLogsList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
proto.google.api.Logging.LoggingDestination.prototype.clearLogsList = function() {
jspb.Message.setField(this, 1, []);
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/metric_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

150
api/js/google/api/metric_pb.d.ts vendored Normal file
View File

@ -0,0 +1,150 @@
// package: google.api
// file: google/api/metric.proto
import * as jspb from "google-protobuf";
import * as google_api_label_pb from "../../google/api/label_pb";
import * as google_api_launch_stage_pb from "../../google/api/launch_stage_pb";
import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
export class MetricDescriptor extends jspb.Message {
getName(): string;
setName(value: string): void;
getType(): string;
setType(value: string): void;
clearLabelsList(): void;
getLabelsList(): Array<google_api_label_pb.LabelDescriptor>;
setLabelsList(value: Array<google_api_label_pb.LabelDescriptor>): void;
addLabels(value?: google_api_label_pb.LabelDescriptor, index?: number): google_api_label_pb.LabelDescriptor;
getMetricKind(): MetricDescriptor.MetricKindMap[keyof MetricDescriptor.MetricKindMap];
setMetricKind(value: MetricDescriptor.MetricKindMap[keyof MetricDescriptor.MetricKindMap]): void;
getValueType(): MetricDescriptor.ValueTypeMap[keyof MetricDescriptor.ValueTypeMap];
setValueType(value: MetricDescriptor.ValueTypeMap[keyof MetricDescriptor.ValueTypeMap]): void;
getUnit(): string;
setUnit(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getDisplayName(): string;
setDisplayName(value: string): void;
hasMetadata(): boolean;
clearMetadata(): void;
getMetadata(): MetricDescriptor.MetricDescriptorMetadata | undefined;
setMetadata(value?: MetricDescriptor.MetricDescriptorMetadata): void;
getLaunchStage(): google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap];
setLaunchStage(value: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap]): void;
clearMonitoredResourceTypesList(): void;
getMonitoredResourceTypesList(): Array<string>;
setMonitoredResourceTypesList(value: Array<string>): void;
addMonitoredResourceTypes(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MetricDescriptor.AsObject;
static toObject(includeInstance: boolean, msg: MetricDescriptor): MetricDescriptor.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MetricDescriptor, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MetricDescriptor;
static deserializeBinaryFromReader(message: MetricDescriptor, reader: jspb.BinaryReader): MetricDescriptor;
}
export namespace MetricDescriptor {
export type AsObject = {
name: string,
type: string,
labelsList: Array<google_api_label_pb.LabelDescriptor.AsObject>,
metricKind: MetricDescriptor.MetricKindMap[keyof MetricDescriptor.MetricKindMap],
valueType: MetricDescriptor.ValueTypeMap[keyof MetricDescriptor.ValueTypeMap],
unit: string,
description: string,
displayName: string,
metadata?: MetricDescriptor.MetricDescriptorMetadata.AsObject,
launchStage: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap],
monitoredResourceTypesList: Array<string>,
}
export class MetricDescriptorMetadata extends jspb.Message {
getLaunchStage(): google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap];
setLaunchStage(value: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap]): void;
hasSamplePeriod(): boolean;
clearSamplePeriod(): void;
getSamplePeriod(): google_protobuf_duration_pb.Duration | undefined;
setSamplePeriod(value?: google_protobuf_duration_pb.Duration): void;
hasIngestDelay(): boolean;
clearIngestDelay(): void;
getIngestDelay(): google_protobuf_duration_pb.Duration | undefined;
setIngestDelay(value?: google_protobuf_duration_pb.Duration): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MetricDescriptorMetadata.AsObject;
static toObject(includeInstance: boolean, msg: MetricDescriptorMetadata): MetricDescriptorMetadata.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MetricDescriptorMetadata, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MetricDescriptorMetadata;
static deserializeBinaryFromReader(message: MetricDescriptorMetadata, reader: jspb.BinaryReader): MetricDescriptorMetadata;
}
export namespace MetricDescriptorMetadata {
export type AsObject = {
launchStage: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap],
samplePeriod?: google_protobuf_duration_pb.Duration.AsObject,
ingestDelay?: google_protobuf_duration_pb.Duration.AsObject,
}
}
export interface MetricKindMap {
METRIC_KIND_UNSPECIFIED: 0;
GAUGE: 1;
DELTA: 2;
CUMULATIVE: 3;
}
export const MetricKind: MetricKindMap;
export interface ValueTypeMap {
VALUE_TYPE_UNSPECIFIED: 0;
BOOL: 1;
INT64: 2;
DOUBLE: 3;
STRING: 4;
DISTRIBUTION: 5;
MONEY: 6;
}
export const ValueType: ValueTypeMap;
}
export class Metric extends jspb.Message {
getType(): string;
setType(value: string): void;
getLabelsMap(): jspb.Map<string, string>;
clearLabelsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Metric.AsObject;
static toObject(includeInstance: boolean, msg: Metric): Metric.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Metric, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Metric;
static deserializeBinaryFromReader(message: Metric, reader: jspb.BinaryReader): Metric;
}
export namespace Metric {
export type AsObject = {
type: string,
labelsMap: Array<[string, string]>,
}
}

View File

@ -0,0 +1,946 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_api_label_pb = require('../../google/api/label_pb.js');
var google_api_launch_stage_pb = require('../../google/api/launch_stage_pb.js');
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.exportSymbol('proto.google.api.Metric', null, global);
goog.exportSymbol('proto.google.api.MetricDescriptor', null, global);
goog.exportSymbol('proto.google.api.MetricDescriptor.MetricDescriptorMetadata', null, global);
goog.exportSymbol('proto.google.api.MetricDescriptor.MetricKind', null, global);
goog.exportSymbol('proto.google.api.MetricDescriptor.ValueType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MetricDescriptor = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.MetricDescriptor.repeatedFields_, null);
};
goog.inherits(proto.google.api.MetricDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MetricDescriptor.displayName = 'proto.google.api.MetricDescriptor';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.MetricDescriptor.repeatedFields_ = [2,13];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MetricDescriptor.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MetricDescriptor.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MetricDescriptor} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MetricDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
type: msg.getType(),
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
google_api_label_pb.LabelDescriptor.toObject, includeInstance),
metricKind: msg.getMetricKind(),
valueType: msg.getValueType(),
unit: msg.getUnit(),
description: msg.getDescription(),
displayName: msg.getDisplayName(),
metadata: (f = msg.getMetadata()) && proto.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(includeInstance, f),
launchStage: msg.getLaunchStage(),
monitoredResourceTypesList: jspb.Message.getField(msg, 13)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MetricDescriptor}
*/
proto.google.api.MetricDescriptor.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MetricDescriptor;
return proto.google.api.MetricDescriptor.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MetricDescriptor} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MetricDescriptor}
*/
proto.google.api.MetricDescriptor.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = new google_api_label_pb.LabelDescriptor;
reader.readMessage(value,google_api_label_pb.LabelDescriptor.deserializeBinaryFromReader);
msg.getLabelsList().push(value);
msg.setLabelsList(msg.getLabelsList());
break;
case 3:
var value = /** @type {!proto.google.api.MetricDescriptor.MetricKind} */ (reader.readEnum());
msg.setMetricKind(value);
break;
case 4:
var value = /** @type {!proto.google.api.MetricDescriptor.ValueType} */ (reader.readEnum());
msg.setValueType(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setUnit(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setDisplayName(value);
break;
case 10:
var value = new proto.google.api.MetricDescriptor.MetricDescriptorMetadata;
reader.readMessage(value,proto.google.api.MetricDescriptor.MetricDescriptorMetadata.deserializeBinaryFromReader);
msg.setMetadata(value);
break;
case 12:
var value = /** @type {!proto.google.api.LaunchStage} */ (reader.readEnum());
msg.setLaunchStage(value);
break;
case 13:
var value = /** @type {string} */ (reader.readString());
msg.getMonitoredResourceTypesList().push(value);
msg.setMonitoredResourceTypesList(msg.getMonitoredResourceTypesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MetricDescriptor} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricDescriptor.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MetricDescriptor.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricDescriptor.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getType();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = this.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
google_api_label_pb.LabelDescriptor.serializeBinaryToWriter
);
}
f = this.getMetricKind();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = this.getValueType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getUnit();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getDisplayName();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = this.getMetadata();
if (f != null) {
writer.writeMessage(
10,
f,
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.serializeBinaryToWriter
);
}
f = this.getLaunchStage();
if (f !== 0.0) {
writer.writeEnum(
12,
f
);
}
f = this.getMonitoredResourceTypesList();
if (f.length > 0) {
writer.writeRepeatedString(
13,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MetricDescriptor} The clone.
*/
proto.google.api.MetricDescriptor.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MetricDescriptor} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.MetricDescriptor.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.MetricDescriptor.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string type = 8;
* @return {string}
*/
proto.google.api.MetricDescriptor.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
};
/** @param {string} value */
proto.google.api.MetricDescriptor.prototype.setType = function(value) {
jspb.Message.setField(this, 8, value);
};
/**
* repeated LabelDescriptor labels = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.LabelDescriptor>}
*/
proto.google.api.MetricDescriptor.prototype.getLabelsList = function() {
return /** @type{!Array.<!proto.google.api.LabelDescriptor>} */ (
jspb.Message.getRepeatedWrapperField(this, google_api_label_pb.LabelDescriptor, 2));
};
/** @param {Array.<!proto.google.api.LabelDescriptor>} value */
proto.google.api.MetricDescriptor.prototype.setLabelsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.MetricDescriptor.prototype.clearLabelsList = function() {
this.setLabelsList([]);
};
/**
* optional MetricKind metric_kind = 3;
* @return {!proto.google.api.MetricDescriptor.MetricKind}
*/
proto.google.api.MetricDescriptor.prototype.getMetricKind = function() {
return /** @type {!proto.google.api.MetricDescriptor.MetricKind} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {!proto.google.api.MetricDescriptor.MetricKind} value */
proto.google.api.MetricDescriptor.prototype.setMetricKind = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional ValueType value_type = 4;
* @return {!proto.google.api.MetricDescriptor.ValueType}
*/
proto.google.api.MetricDescriptor.prototype.getValueType = function() {
return /** @type {!proto.google.api.MetricDescriptor.ValueType} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {!proto.google.api.MetricDescriptor.ValueType} value */
proto.google.api.MetricDescriptor.prototype.setValueType = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional string unit = 5;
* @return {string}
*/
proto.google.api.MetricDescriptor.prototype.getUnit = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
};
/** @param {string} value */
proto.google.api.MetricDescriptor.prototype.setUnit = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional string description = 6;
* @return {string}
*/
proto.google.api.MetricDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};
/** @param {string} value */
proto.google.api.MetricDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 6, value);
};
/**
* optional string display_name = 7;
* @return {string}
*/
proto.google.api.MetricDescriptor.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
};
/** @param {string} value */
proto.google.api.MetricDescriptor.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* optional MetricDescriptorMetadata metadata = 10;
* @return {proto.google.api.MetricDescriptor.MetricDescriptorMetadata}
*/
proto.google.api.MetricDescriptor.prototype.getMetadata = function() {
return /** @type{proto.google.api.MetricDescriptor.MetricDescriptorMetadata} */ (
jspb.Message.getWrapperField(this, proto.google.api.MetricDescriptor.MetricDescriptorMetadata, 10));
};
/** @param {proto.google.api.MetricDescriptor.MetricDescriptorMetadata|undefined} value */
proto.google.api.MetricDescriptor.prototype.setMetadata = function(value) {
jspb.Message.setWrapperField(this, 10, value);
};
proto.google.api.MetricDescriptor.prototype.clearMetadata = function() {
this.setMetadata(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.MetricDescriptor.prototype.hasMetadata = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* optional LaunchStage launch_stage = 12;
* @return {!proto.google.api.LaunchStage}
*/
proto.google.api.MetricDescriptor.prototype.getLaunchStage = function() {
return /** @type {!proto.google.api.LaunchStage} */ (jspb.Message.getFieldProto3(this, 12, 0));
};
/** @param {!proto.google.api.LaunchStage} value */
proto.google.api.MetricDescriptor.prototype.setLaunchStage = function(value) {
jspb.Message.setField(this, 12, value);
};
/**
* repeated string monitored_resource_types = 13;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.MetricDescriptor.prototype.getMonitoredResourceTypesList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 13));
};
/** @param {Array.<string>} value */
proto.google.api.MetricDescriptor.prototype.setMonitoredResourceTypesList = function(value) {
jspb.Message.setField(this, 13, value || []);
};
proto.google.api.MetricDescriptor.prototype.clearMonitoredResourceTypesList = function() {
jspb.Message.setField(this, 13, []);
};
/**
* @enum {number}
*/
proto.google.api.MetricDescriptor.MetricKind = {
METRIC_KIND_UNSPECIFIED: 0,
GAUGE: 1,
DELTA: 2,
CUMULATIVE: 3
};
/**
* @enum {number}
*/
proto.google.api.MetricDescriptor.ValueType = {
VALUE_TYPE_UNSPECIFIED: 0,
BOOL: 1,
INT64: 2,
DOUBLE: 3,
STRING: 4,
DISTRIBUTION: 5,
MONEY: 6
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.MetricDescriptor.MetricDescriptorMetadata, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.displayName = 'proto.google.api.MetricDescriptor.MetricDescriptorMetadata';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject = function(includeInstance, msg) {
var f, obj = {
launchStage: msg.getLaunchStage(),
samplePeriod: (f = msg.getSamplePeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f),
ingestDelay: (f = msg.getIngestDelay()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MetricDescriptor.MetricDescriptorMetadata;
return proto.google.api.MetricDescriptor.MetricDescriptorMetadata.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.google.api.LaunchStage} */ (reader.readEnum());
msg.setLaunchStage(value);
break;
case 2:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setSamplePeriod(value);
break;
case 3:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setIngestDelay(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getLaunchStage();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = this.getSamplePeriod();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
f = this.getIngestDelay();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata} The clone.
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MetricDescriptor.MetricDescriptorMetadata} */ (jspb.Message.cloneMessage(this));
};
/**
* optional LaunchStage launch_stage = 1;
* @return {!proto.google.api.LaunchStage}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.getLaunchStage = function() {
return /** @type {!proto.google.api.LaunchStage} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {!proto.google.api.LaunchStage} value */
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.setLaunchStage = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional google.protobuf.Duration sample_period = 2;
* @return {proto.google.protobuf.Duration}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.getSamplePeriod = function() {
return /** @type{proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2));
};
/** @param {proto.google.protobuf.Duration|undefined} value */
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.setSamplePeriod = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.clearSamplePeriod = function() {
this.setSamplePeriod(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.hasSamplePeriod = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional google.protobuf.Duration ingest_delay = 3;
* @return {proto.google.protobuf.Duration}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.getIngestDelay = function() {
return /** @type{proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3));
};
/** @param {proto.google.protobuf.Duration|undefined} value */
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.setIngestDelay = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.clearIngestDelay = function() {
this.setIngestDelay(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.MetricDescriptor.MetricDescriptorMetadata.prototype.hasIngestDelay = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Metric = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Metric, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Metric.displayName = 'proto.google.api.Metric';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Metric.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Metric.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Metric} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Metric.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
labelsMap: (f = msg.getLabelsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Metric}
*/
proto.google.api.Metric.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Metric;
return proto.google.api.Metric.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Metric} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Metric}
*/
proto.google.api.Metric.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = msg.getLabelsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Metric} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Metric.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Metric.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Metric.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getType();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getLabelsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Metric} The clone.
*/
proto.google.api.Metric.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Metric} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string type = 3;
* @return {string}
*/
proto.google.api.Metric.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.Metric.prototype.setType = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* map<string, string> labels = 2;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.google.api.Metric.prototype.getLabelsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
null));
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,98 @@
// package: google.api
// file: google/api/monitored_resource.proto
import * as jspb from "google-protobuf";
import * as google_api_label_pb from "../../google/api/label_pb";
import * as google_api_launch_stage_pb from "../../google/api/launch_stage_pb";
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
export class MonitoredResourceDescriptor extends jspb.Message {
getName(): string;
setName(value: string): void;
getType(): string;
setType(value: string): void;
getDisplayName(): string;
setDisplayName(value: string): void;
getDescription(): string;
setDescription(value: string): void;
clearLabelsList(): void;
getLabelsList(): Array<google_api_label_pb.LabelDescriptor>;
setLabelsList(value: Array<google_api_label_pb.LabelDescriptor>): void;
addLabels(value?: google_api_label_pb.LabelDescriptor, index?: number): google_api_label_pb.LabelDescriptor;
getLaunchStage(): google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap];
setLaunchStage(value: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitoredResourceDescriptor.AsObject;
static toObject(includeInstance: boolean, msg: MonitoredResourceDescriptor): MonitoredResourceDescriptor.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MonitoredResourceDescriptor, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MonitoredResourceDescriptor;
static deserializeBinaryFromReader(message: MonitoredResourceDescriptor, reader: jspb.BinaryReader): MonitoredResourceDescriptor;
}
export namespace MonitoredResourceDescriptor {
export type AsObject = {
name: string,
type: string,
displayName: string,
description: string,
labelsList: Array<google_api_label_pb.LabelDescriptor.AsObject>,
launchStage: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap],
}
}
export class MonitoredResource extends jspb.Message {
getType(): string;
setType(value: string): void;
getLabelsMap(): jspb.Map<string, string>;
clearLabelsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitoredResource.AsObject;
static toObject(includeInstance: boolean, msg: MonitoredResource): MonitoredResource.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MonitoredResource, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MonitoredResource;
static deserializeBinaryFromReader(message: MonitoredResource, reader: jspb.BinaryReader): MonitoredResource;
}
export namespace MonitoredResource {
export type AsObject = {
type: string,
labelsMap: Array<[string, string]>,
}
}
export class MonitoredResourceMetadata extends jspb.Message {
hasSystemLabels(): boolean;
clearSystemLabels(): void;
getSystemLabels(): google_protobuf_struct_pb.Struct | undefined;
setSystemLabels(value?: google_protobuf_struct_pb.Struct): void;
getUserLabelsMap(): jspb.Map<string, string>;
clearUserLabelsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitoredResourceMetadata.AsObject;
static toObject(includeInstance: boolean, msg: MonitoredResourceMetadata): MonitoredResourceMetadata.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MonitoredResourceMetadata, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MonitoredResourceMetadata;
static deserializeBinaryFromReader(message: MonitoredResourceMetadata, reader: jspb.BinaryReader): MonitoredResourceMetadata;
}
export namespace MonitoredResourceMetadata {
export type AsObject = {
systemLabels?: google_protobuf_struct_pb.Struct.AsObject,
userLabelsMap: Array<[string, string]>,
}
}

View File

@ -0,0 +1,714 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_api_label_pb = require('../../google/api/label_pb.js');
var google_api_launch_stage_pb = require('../../google/api/launch_stage_pb.js');
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.exportSymbol('proto.google.api.MonitoredResource', null, global);
goog.exportSymbol('proto.google.api.MonitoredResourceDescriptor', null, global);
goog.exportSymbol('proto.google.api.MonitoredResourceMetadata', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MonitoredResourceDescriptor = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.MonitoredResourceDescriptor.repeatedFields_, null);
};
goog.inherits(proto.google.api.MonitoredResourceDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MonitoredResourceDescriptor.displayName = 'proto.google.api.MonitoredResourceDescriptor';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.MonitoredResourceDescriptor.repeatedFields_ = [4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MonitoredResourceDescriptor.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MonitoredResourceDescriptor} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MonitoredResourceDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
type: msg.getType(),
displayName: msg.getDisplayName(),
description: msg.getDescription(),
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
google_api_label_pb.LabelDescriptor.toObject, includeInstance),
launchStage: msg.getLaunchStage()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MonitoredResourceDescriptor}
*/
proto.google.api.MonitoredResourceDescriptor.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MonitoredResourceDescriptor;
return proto.google.api.MonitoredResourceDescriptor.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MonitoredResourceDescriptor} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MonitoredResourceDescriptor}
*/
proto.google.api.MonitoredResourceDescriptor.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDisplayName(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 4:
var value = new google_api_label_pb.LabelDescriptor;
reader.readMessage(value,google_api_label_pb.LabelDescriptor.deserializeBinaryFromReader);
msg.getLabelsList().push(value);
msg.setLabelsList(msg.getLabelsList());
break;
case 7:
var value = /** @type {!proto.google.api.LaunchStage} */ (reader.readEnum());
msg.setLaunchStage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MonitoredResourceDescriptor} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResourceDescriptor.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResourceDescriptor.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDisplayName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
f,
google_api_label_pb.LabelDescriptor.serializeBinaryToWriter
);
}
f = this.getLaunchStage();
if (f !== 0.0) {
writer.writeEnum(
7,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MonitoredResourceDescriptor} The clone.
*/
proto.google.api.MonitoredResourceDescriptor.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MonitoredResourceDescriptor} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 5;
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
};
/** @param {string} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setName = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional string type = 1;
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string display_name = 2;
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* repeated LabelDescriptor labels = 4;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.LabelDescriptor>}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getLabelsList = function() {
return /** @type{!Array.<!proto.google.api.LabelDescriptor>} */ (
jspb.Message.getRepeatedWrapperField(this, google_api_label_pb.LabelDescriptor, 4));
};
/** @param {Array.<!proto.google.api.LabelDescriptor>} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setLabelsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 4, value);
};
proto.google.api.MonitoredResourceDescriptor.prototype.clearLabelsList = function() {
this.setLabelsList([]);
};
/**
* optional LaunchStage launch_stage = 7;
* @return {!proto.google.api.LaunchStage}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getLaunchStage = function() {
return /** @type {!proto.google.api.LaunchStage} */ (jspb.Message.getFieldProto3(this, 7, 0));
};
/** @param {!proto.google.api.LaunchStage} value */
proto.google.api.MonitoredResourceDescriptor.prototype.setLaunchStage = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MonitoredResource = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.MonitoredResource, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MonitoredResource.displayName = 'proto.google.api.MonitoredResource';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MonitoredResource.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MonitoredResource.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MonitoredResource} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MonitoredResource.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
labelsMap: (f = msg.getLabelsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MonitoredResource}
*/
proto.google.api.MonitoredResource.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MonitoredResource;
return proto.google.api.MonitoredResource.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MonitoredResource} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MonitoredResource}
*/
proto.google.api.MonitoredResource.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = msg.getLabelsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MonitoredResource} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResource.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MonitoredResource.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResource.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getLabelsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MonitoredResource} The clone.
*/
proto.google.api.MonitoredResource.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MonitoredResource} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string type = 1;
* @return {string}
*/
proto.google.api.MonitoredResource.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.MonitoredResource.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* map<string, string> labels = 2;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.google.api.MonitoredResource.prototype.getLabelsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
null));
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MonitoredResourceMetadata = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.MonitoredResourceMetadata, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MonitoredResourceMetadata.displayName = 'proto.google.api.MonitoredResourceMetadata';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MonitoredResourceMetadata.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MonitoredResourceMetadata.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MonitoredResourceMetadata} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MonitoredResourceMetadata.toObject = function(includeInstance, msg) {
var f, obj = {
systemLabels: (f = msg.getSystemLabels()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
userLabelsMap: (f = msg.getUserLabelsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MonitoredResourceMetadata}
*/
proto.google.api.MonitoredResourceMetadata.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MonitoredResourceMetadata;
return proto.google.api.MonitoredResourceMetadata.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MonitoredResourceMetadata} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MonitoredResourceMetadata}
*/
proto.google.api.MonitoredResourceMetadata.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setSystemLabels(value);
break;
case 2:
var value = msg.getUserLabelsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MonitoredResourceMetadata} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResourceMetadata.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MonitoredResourceMetadata.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MonitoredResourceMetadata.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSystemLabels();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = this.getUserLabelsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MonitoredResourceMetadata} The clone.
*/
proto.google.api.MonitoredResourceMetadata.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MonitoredResourceMetadata} */ (jspb.Message.cloneMessage(this));
};
/**
* optional google.protobuf.Struct system_labels = 1;
* @return {proto.google.protobuf.Struct}
*/
proto.google.api.MonitoredResourceMetadata.prototype.getSystemLabels = function() {
return /** @type{proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 1));
};
/** @param {proto.google.protobuf.Struct|undefined} value */
proto.google.api.MonitoredResourceMetadata.prototype.setSystemLabels = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.google.api.MonitoredResourceMetadata.prototype.clearSystemLabels = function() {
this.setSystemLabels(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.google.api.MonitoredResourceMetadata.prototype.hasSystemLabels = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* map<string, string> user_labels = 2;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.google.api.MonitoredResourceMetadata.prototype.getUserLabelsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
null));
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

59
api/js/google/api/monitoring_pb.d.ts vendored Normal file
View File

@ -0,0 +1,59 @@
// package: google.api
// file: google/api/monitoring.proto
import * as jspb from "google-protobuf";
export class Monitoring extends jspb.Message {
clearProducerDestinationsList(): void;
getProducerDestinationsList(): Array<Monitoring.MonitoringDestination>;
setProducerDestinationsList(value: Array<Monitoring.MonitoringDestination>): void;
addProducerDestinations(value?: Monitoring.MonitoringDestination, index?: number): Monitoring.MonitoringDestination;
clearConsumerDestinationsList(): void;
getConsumerDestinationsList(): Array<Monitoring.MonitoringDestination>;
setConsumerDestinationsList(value: Array<Monitoring.MonitoringDestination>): void;
addConsumerDestinations(value?: Monitoring.MonitoringDestination, index?: number): Monitoring.MonitoringDestination;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Monitoring.AsObject;
static toObject(includeInstance: boolean, msg: Monitoring): Monitoring.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Monitoring, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Monitoring;
static deserializeBinaryFromReader(message: Monitoring, reader: jspb.BinaryReader): Monitoring;
}
export namespace Monitoring {
export type AsObject = {
producerDestinationsList: Array<Monitoring.MonitoringDestination.AsObject>,
consumerDestinationsList: Array<Monitoring.MonitoringDestination.AsObject>,
}
export class MonitoringDestination extends jspb.Message {
getMonitoredResource(): string;
setMonitoredResource(value: string): void;
clearMetricsList(): void;
getMetricsList(): Array<string>;
setMetricsList(value: Array<string>): void;
addMetrics(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitoringDestination.AsObject;
static toObject(includeInstance: boolean, msg: MonitoringDestination): MonitoringDestination.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MonitoringDestination, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MonitoringDestination;
static deserializeBinaryFromReader(message: MonitoringDestination, reader: jspb.BinaryReader): MonitoringDestination;
}
export namespace MonitoringDestination {
export type AsObject = {
monitoredResource: string,
metricsList: Array<string>,
}
}
}

View File

@ -0,0 +1,432 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Monitoring', null, global);
goog.exportSymbol('proto.google.api.Monitoring.MonitoringDestination', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Monitoring = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Monitoring.repeatedFields_, null);
};
goog.inherits(proto.google.api.Monitoring, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Monitoring.displayName = 'proto.google.api.Monitoring';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Monitoring.repeatedFields_ = [1,2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Monitoring.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Monitoring.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Monitoring} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Monitoring.toObject = function(includeInstance, msg) {
var f, obj = {
producerDestinationsList: jspb.Message.toObjectList(msg.getProducerDestinationsList(),
proto.google.api.Monitoring.MonitoringDestination.toObject, includeInstance),
consumerDestinationsList: jspb.Message.toObjectList(msg.getConsumerDestinationsList(),
proto.google.api.Monitoring.MonitoringDestination.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Monitoring}
*/
proto.google.api.Monitoring.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Monitoring;
return proto.google.api.Monitoring.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Monitoring} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Monitoring}
*/
proto.google.api.Monitoring.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.Monitoring.MonitoringDestination;
reader.readMessage(value,proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader);
msg.getProducerDestinationsList().push(value);
msg.setProducerDestinationsList(msg.getProducerDestinationsList());
break;
case 2:
var value = new proto.google.api.Monitoring.MonitoringDestination;
reader.readMessage(value,proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader);
msg.getConsumerDestinationsList().push(value);
msg.setConsumerDestinationsList(msg.getConsumerDestinationsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Monitoring} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Monitoring.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Monitoring.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Monitoring.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getProducerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter
);
}
f = this.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Monitoring} The clone.
*/
proto.google.api.Monitoring.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Monitoring} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated MonitoringDestination producer_destinations = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Monitoring.MonitoringDestination>}
*/
proto.google.api.Monitoring.prototype.getProducerDestinationsList = function() {
return /** @type{!Array.<!proto.google.api.Monitoring.MonitoringDestination>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Monitoring.MonitoringDestination, 1));
};
/** @param {Array.<!proto.google.api.Monitoring.MonitoringDestination>} value */
proto.google.api.Monitoring.prototype.setProducerDestinationsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Monitoring.prototype.clearProducerDestinationsList = function() {
this.setProducerDestinationsList([]);
};
/**
* repeated MonitoringDestination consumer_destinations = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.Monitoring.MonitoringDestination>}
*/
proto.google.api.Monitoring.prototype.getConsumerDestinationsList = function() {
return /** @type{!Array.<!proto.google.api.Monitoring.MonitoringDestination>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Monitoring.MonitoringDestination, 2));
};
/** @param {Array.<!proto.google.api.Monitoring.MonitoringDestination>} value */
proto.google.api.Monitoring.prototype.setConsumerDestinationsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.Monitoring.prototype.clearConsumerDestinationsList = function() {
this.setConsumerDestinationsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Monitoring.MonitoringDestination = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Monitoring.MonitoringDestination.repeatedFields_, null);
};
goog.inherits(proto.google.api.Monitoring.MonitoringDestination, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Monitoring.MonitoringDestination.displayName = 'proto.google.api.Monitoring.MonitoringDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Monitoring.MonitoringDestination.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Monitoring.MonitoringDestination.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Monitoring.MonitoringDestination} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Monitoring.MonitoringDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
metricsList: jspb.Message.getField(msg, 2)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Monitoring.MonitoringDestination}
*/
proto.google.api.Monitoring.MonitoringDestination.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Monitoring.MonitoringDestination;
return proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Monitoring.MonitoringDestination} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Monitoring.MonitoringDestination}
*/
proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setMonitoredResource(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getMetricsList().push(value);
msg.setMetricsList(msg.getMetricsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Monitoring.MonitoringDestination} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Monitoring.MonitoringDestination} The clone.
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Monitoring.MonitoringDestination} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string monitored_resource = 1;
* @return {string}
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.getMonitoredResource = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.Monitoring.MonitoringDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string metrics = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.getMetricsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
};
/** @param {Array.<string>} value */
proto.google.api.Monitoring.MonitoringDestination.prototype.setMetricsList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.google.api.Monitoring.MonitoringDestination.prototype.clearMetricsList = function() {
jspb.Message.setField(this, 2, []);
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/quota_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

111
api/js/google/api/quota_pb.d.ts vendored Normal file
View File

@ -0,0 +1,111 @@
// package: google.api
// file: google/api/quota.proto
import * as jspb from "google-protobuf";
export class Quota extends jspb.Message {
clearLimitsList(): void;
getLimitsList(): Array<QuotaLimit>;
setLimitsList(value: Array<QuotaLimit>): void;
addLimits(value?: QuotaLimit, index?: number): QuotaLimit;
clearMetricRulesList(): void;
getMetricRulesList(): Array<MetricRule>;
setMetricRulesList(value: Array<MetricRule>): void;
addMetricRules(value?: MetricRule, index?: number): MetricRule;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Quota.AsObject;
static toObject(includeInstance: boolean, msg: Quota): Quota.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Quota, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Quota;
static deserializeBinaryFromReader(message: Quota, reader: jspb.BinaryReader): Quota;
}
export namespace Quota {
export type AsObject = {
limitsList: Array<QuotaLimit.AsObject>,
metricRulesList: Array<MetricRule.AsObject>,
}
}
export class MetricRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
getMetricCostsMap(): jspb.Map<string, number>;
clearMetricCostsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MetricRule.AsObject;
static toObject(includeInstance: boolean, msg: MetricRule): MetricRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MetricRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MetricRule;
static deserializeBinaryFromReader(message: MetricRule, reader: jspb.BinaryReader): MetricRule;
}
export namespace MetricRule {
export type AsObject = {
selector: string,
metricCostsMap: Array<[string, number]>,
}
}
export class QuotaLimit extends jspb.Message {
getName(): string;
setName(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getDefaultLimit(): number;
setDefaultLimit(value: number): void;
getMaxLimit(): number;
setMaxLimit(value: number): void;
getFreeTier(): number;
setFreeTier(value: number): void;
getDuration(): string;
setDuration(value: string): void;
getMetric(): string;
setMetric(value: string): void;
getUnit(): string;
setUnit(value: string): void;
getValuesMap(): jspb.Map<string, number>;
clearValuesMap(): void;
getDisplayName(): string;
setDisplayName(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): QuotaLimit.AsObject;
static toObject(includeInstance: boolean, msg: QuotaLimit): QuotaLimit.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: QuotaLimit, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): QuotaLimit;
static deserializeBinaryFromReader(message: QuotaLimit, reader: jspb.BinaryReader): QuotaLimit;
}
export namespace QuotaLimit {
export type AsObject = {
name: string,
description: string,
defaultLimit: number,
maxLimit: number,
freeTier: number,
duration: string,
metric: string,
unit: string,
valuesMap: Array<[string, number]>,
displayName: string,
}
}

View File

@ -0,0 +1,814 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.MetricRule', null, global);
goog.exportSymbol('proto.google.api.Quota', null, global);
goog.exportSymbol('proto.google.api.QuotaLimit', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Quota = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Quota.repeatedFields_, null);
};
goog.inherits(proto.google.api.Quota, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Quota.displayName = 'proto.google.api.Quota';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Quota.repeatedFields_ = [3,4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Quota.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Quota.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Quota} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Quota.toObject = function(includeInstance, msg) {
var f, obj = {
limitsList: jspb.Message.toObjectList(msg.getLimitsList(),
proto.google.api.QuotaLimit.toObject, includeInstance),
metricRulesList: jspb.Message.toObjectList(msg.getMetricRulesList(),
proto.google.api.MetricRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Quota}
*/
proto.google.api.Quota.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Quota;
return proto.google.api.Quota.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Quota} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Quota}
*/
proto.google.api.Quota.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 3:
var value = new proto.google.api.QuotaLimit;
reader.readMessage(value,proto.google.api.QuotaLimit.deserializeBinaryFromReader);
msg.getLimitsList().push(value);
msg.setLimitsList(msg.getLimitsList());
break;
case 4:
var value = new proto.google.api.MetricRule;
reader.readMessage(value,proto.google.api.MetricRule.deserializeBinaryFromReader);
msg.getMetricRulesList().push(value);
msg.setMetricRulesList(msg.getMetricRulesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Quota} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Quota.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Quota.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Quota.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getLimitsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.google.api.QuotaLimit.serializeBinaryToWriter
);
}
f = this.getMetricRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
f,
proto.google.api.MetricRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Quota} The clone.
*/
proto.google.api.Quota.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Quota} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated QuotaLimit limits = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.QuotaLimit>}
*/
proto.google.api.Quota.prototype.getLimitsList = function() {
return /** @type{!Array.<!proto.google.api.QuotaLimit>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.QuotaLimit, 3));
};
/** @param {Array.<!proto.google.api.QuotaLimit>} value */
proto.google.api.Quota.prototype.setLimitsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.google.api.Quota.prototype.clearLimitsList = function() {
this.setLimitsList([]);
};
/**
* repeated MetricRule metric_rules = 4;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.MetricRule>}
*/
proto.google.api.Quota.prototype.getMetricRulesList = function() {
return /** @type{!Array.<!proto.google.api.MetricRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.MetricRule, 4));
};
/** @param {Array.<!proto.google.api.MetricRule>} value */
proto.google.api.Quota.prototype.setMetricRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 4, value);
};
proto.google.api.Quota.prototype.clearMetricRulesList = function() {
this.setMetricRulesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.MetricRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.MetricRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MetricRule.displayName = 'proto.google.api.MetricRule';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.MetricRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.MetricRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.MetricRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.MetricRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
metricCostsMap: (f = msg.getMetricCostsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.MetricRule}
*/
proto.google.api.MetricRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.MetricRule;
return proto.google.api.MetricRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.MetricRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.MetricRule}
*/
proto.google.api.MetricRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = msg.getMetricCostsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64);
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.MetricRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.MetricRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.MetricRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricCostsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.MetricRule} The clone.
*/
proto.google.api.MetricRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.MetricRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.MetricRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.MetricRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* map<string, int64> metric_costs = 2;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,number>}
*/
proto.google.api.MetricRule.prototype.getMetricCostsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,number>} */ (
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
null));
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.QuotaLimit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.QuotaLimit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.QuotaLimit.displayName = 'proto.google.api.QuotaLimit';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.QuotaLimit.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.QuotaLimit.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.QuotaLimit} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.QuotaLimit.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
description: msg.getDescription(),
defaultLimit: msg.getDefaultLimit(),
maxLimit: msg.getMaxLimit(),
freeTier: msg.getFreeTier(),
duration: msg.getDuration(),
metric: msg.getMetric(),
unit: msg.getUnit(),
valuesMap: (f = msg.getValuesMap(true)) ? f.toArray() : [],
displayName: msg.getDisplayName()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.QuotaLimit}
*/
proto.google.api.QuotaLimit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.QuotaLimit;
return proto.google.api.QuotaLimit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.QuotaLimit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.QuotaLimit}
*/
proto.google.api.QuotaLimit.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setDefaultLimit(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setMaxLimit(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setFreeTier(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDuration(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setMetric(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setUnit(value);
break;
case 10:
var value = msg.getValuesMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64);
});
break;
case 12:
var value = /** @type {string} */ (reader.readString());
msg.setDisplayName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.QuotaLimit} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.QuotaLimit.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.QuotaLimit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.QuotaLimit.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDefaultLimit();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = this.getMaxLimit();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = this.getFreeTier();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = this.getDuration();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getMetric();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = this.getUnit();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = this.getValuesMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64);
}
f = this.getDisplayName();
if (f.length > 0) {
writer.writeString(
12,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.QuotaLimit} The clone.
*/
proto.google.api.QuotaLimit.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.QuotaLimit} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 6;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setName = function(value) {
jspb.Message.setField(this, 6, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional int64 default_limit = 3;
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getDefaultLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.google.api.QuotaLimit.prototype.setDefaultLimit = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional int64 max_limit = 4;
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getMaxLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {number} value */
proto.google.api.QuotaLimit.prototype.setMaxLimit = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional int64 free_tier = 7;
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getFreeTier = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0));
};
/** @param {number} value */
proto.google.api.QuotaLimit.prototype.setFreeTier = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* optional string duration = 5;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDuration = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setDuration = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional string metric = 8;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getMetric = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setMetric = function(value) {
jspb.Message.setField(this, 8, value);
};
/**
* optional string unit = 9;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getUnit = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 9, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setUnit = function(value) {
jspb.Message.setField(this, 9, value);
};
/**
* map<string, int64> values = 10;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,number>}
*/
proto.google.api.QuotaLimit.prototype.getValuesMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,number>} */ (
jspb.Message.getMapField(this, 10, opt_noLazyCreate,
null));
};
/**
* optional string display_name = 12;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 12, ""));
};
/** @param {string} value */
proto.google.api.QuotaLimit.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 12, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

99
api/js/google/api/resource_pb.d.ts vendored Normal file
View File

@ -0,0 +1,99 @@
// package: google.api
// file: google/api/resource.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export class ResourceDescriptor extends jspb.Message {
getType(): string;
setType(value: string): void;
clearPatternList(): void;
getPatternList(): Array<string>;
setPatternList(value: Array<string>): void;
addPattern(value: string, index?: number): string;
getNameField(): string;
setNameField(value: string): void;
getHistory(): ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap];
setHistory(value: ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap]): void;
getPlural(): string;
setPlural(value: string): void;
getSingular(): string;
setSingular(value: string): void;
clearStyleList(): void;
getStyleList(): Array<ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap]>;
setStyleList(value: Array<ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap]>): void;
addStyle(value: ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap], index?: number): ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap];
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ResourceDescriptor.AsObject;
static toObject(includeInstance: boolean, msg: ResourceDescriptor): ResourceDescriptor.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ResourceDescriptor, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ResourceDescriptor;
static deserializeBinaryFromReader(message: ResourceDescriptor, reader: jspb.BinaryReader): ResourceDescriptor;
}
export namespace ResourceDescriptor {
export type AsObject = {
type: string,
patternList: Array<string>,
nameField: string,
history: ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap],
plural: string,
singular: string,
styleList: Array<ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap]>,
}
export interface HistoryMap {
HISTORY_UNSPECIFIED: 0;
ORIGINALLY_SINGLE_PATTERN: 1;
FUTURE_MULTI_PATTERN: 2;
}
export const History: HistoryMap;
export interface StyleMap {
STYLE_UNSPECIFIED: 0;
DECLARATIVE_FRIENDLY: 1;
}
export const Style: StyleMap;
}
export class ResourceReference extends jspb.Message {
getType(): string;
setType(value: string): void;
getChildType(): string;
setChildType(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ResourceReference.AsObject;
static toObject(includeInstance: boolean, msg: ResourceReference): ResourceReference.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ResourceReference, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ResourceReference;
static deserializeBinaryFromReader(message: ResourceReference, reader: jspb.BinaryReader): ResourceReference;
}
export namespace ResourceReference {
export type AsObject = {
type: string,
childType: string,
}
}
export const resourceReference: jspb.ExtensionFieldInfo<ResourceReference>;
export const resourceDefinition: jspb.ExtensionFieldInfo<ResourceDescriptor>;
export const resource: jspb.ExtensionFieldInfo<ResourceDescriptor>;

View File

@ -0,0 +1,641 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.resource', null, global);
goog.exportSymbol('google.api.resource_definition', null, global);
goog.exportSymbol('google.api.resource_reference', null, global);
goog.exportSymbol('proto.google.api.ResourceDescriptor', null, global);
goog.exportSymbol('proto.google.api.ResourceDescriptor.History', null, global);
goog.exportSymbol('proto.google.api.ResourceDescriptor.Style', null, global);
goog.exportSymbol('proto.google.api.ResourceReference', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.ResourceDescriptor = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ResourceDescriptor.repeatedFields_, null);
};
goog.inherits(proto.google.api.ResourceDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ResourceDescriptor.displayName = 'proto.google.api.ResourceDescriptor';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.ResourceDescriptor.repeatedFields_ = [2,10];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.ResourceDescriptor.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.ResourceDescriptor.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.ResourceDescriptor} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.ResourceDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
patternList: jspb.Message.getField(msg, 2),
nameField: msg.getNameField(),
history: msg.getHistory(),
plural: msg.getPlural(),
singular: msg.getSingular(),
styleList: jspb.Message.getField(msg, 10)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.ResourceDescriptor}
*/
proto.google.api.ResourceDescriptor.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.ResourceDescriptor;
return proto.google.api.ResourceDescriptor.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.ResourceDescriptor} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.ResourceDescriptor}
*/
proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getPatternList().push(value);
msg.setPatternList(msg.getPatternList());
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setNameField(value);
break;
case 4:
var value = /** @type {!proto.google.api.ResourceDescriptor.History} */ (reader.readEnum());
msg.setHistory(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setPlural(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setSingular(value);
break;
case 10:
var value = /** @type {!Array.<!proto.google.api.ResourceDescriptor.Style>} */ (reader.readPackedEnum());
msg.setStyleList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.ResourceDescriptor} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ResourceDescriptor.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.ResourceDescriptor.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ResourceDescriptor.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPatternList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getNameField();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getHistory();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getPlural();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getSingular();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getStyleList();
if (f.length > 0) {
writer.writePackedEnum(
10,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.ResourceDescriptor} The clone.
*/
proto.google.api.ResourceDescriptor.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.ResourceDescriptor} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string type = 1;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.ResourceDescriptor.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string pattern = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.ResourceDescriptor.prototype.getPatternList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
};
/** @param {Array.<string>} value */
proto.google.api.ResourceDescriptor.prototype.setPatternList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.google.api.ResourceDescriptor.prototype.clearPatternList = function() {
jspb.Message.setField(this, 2, []);
};
/**
* optional string name_field = 3;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getNameField = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.ResourceDescriptor.prototype.setNameField = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional History history = 4;
* @return {!proto.google.api.ResourceDescriptor.History}
*/
proto.google.api.ResourceDescriptor.prototype.getHistory = function() {
return /** @type {!proto.google.api.ResourceDescriptor.History} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {!proto.google.api.ResourceDescriptor.History} value */
proto.google.api.ResourceDescriptor.prototype.setHistory = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional string plural = 5;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getPlural = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
};
/** @param {string} value */
proto.google.api.ResourceDescriptor.prototype.setPlural = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional string singular = 6;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getSingular = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};
/** @param {string} value */
proto.google.api.ResourceDescriptor.prototype.setSingular = function(value) {
jspb.Message.setField(this, 6, value);
};
/**
* repeated Style style = 10;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.ResourceDescriptor.Style>}
*/
proto.google.api.ResourceDescriptor.prototype.getStyleList = function() {
return /** @type {!Array.<!proto.google.api.ResourceDescriptor.Style>} */ (jspb.Message.getField(this, 10));
};
/** @param {!Array.<!proto.google.api.ResourceDescriptor.Style>} value */
proto.google.api.ResourceDescriptor.prototype.setStyleList = function(value) {
jspb.Message.setField(this, 10, value || []);
};
proto.google.api.ResourceDescriptor.prototype.clearStyleList = function() {
jspb.Message.setField(this, 10, []);
};
/**
* @enum {number}
*/
proto.google.api.ResourceDescriptor.History = {
HISTORY_UNSPECIFIED: 0,
ORIGINALLY_SINGLE_PATTERN: 1,
FUTURE_MULTI_PATTERN: 2
};
/**
* @enum {number}
*/
proto.google.api.ResourceDescriptor.Style = {
STYLE_UNSPECIFIED: 0,
DECLARATIVE_FRIENDLY: 1
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.ResourceReference = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.ResourceReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ResourceReference.displayName = 'proto.google.api.ResourceReference';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.ResourceReference.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.ResourceReference.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.ResourceReference} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.ResourceReference.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
childType: msg.getChildType()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.ResourceReference}
*/
proto.google.api.ResourceReference.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.ResourceReference;
return proto.google.api.ResourceReference.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.ResourceReference} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.ResourceReference}
*/
proto.google.api.ResourceReference.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setChildType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.ResourceReference} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ResourceReference.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.ResourceReference.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.ResourceReference.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getChildType();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.ResourceReference} The clone.
*/
proto.google.api.ResourceReference.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.ResourceReference} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string type = 1;
* @return {string}
*/
proto.google.api.ResourceReference.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.ResourceReference.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string child_type = 2;
* @return {string}
*/
proto.google.api.ResourceReference.prototype.getChildType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.ResourceReference.prototype.setChildType = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `resourceReference`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.ResourceReference>}
*/
proto.google.api.resourceReference = new jspb.ExtensionFieldInfo(
1055,
{resourceReference: 0},
proto.google.api.ResourceReference,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.ResourceReference.toObject),
0);
google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1055] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.resourceReference,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.ResourceReference.serializeBinaryToWriter,
proto.google.api.ResourceReference.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[1055] = proto.google.api.resourceReference;
/**
* A tuple of {field number, class constructor} for the extension
* field named `resourceDefinitionList`.
* @type {!jspb.ExtensionFieldInfo.<!Array.<!proto.google.api.ResourceDescriptor>>}
*/
proto.google.api.resourceDefinitionList = new jspb.ExtensionFieldInfo(
1053,
{resourceDefinitionList: 0},
proto.google.api.ResourceDescriptor,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.ResourceDescriptor.toObject),
1);
google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.resourceDefinitionList,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeRepeatedMessage,
proto.google.api.ResourceDescriptor.serializeBinaryToWriter,
proto.google.api.ResourceDescriptor.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FileOptions.extensions[1053] = proto.google.api.resourceDefinitionList;
/**
* A tuple of {field number, class constructor} for the extension
* field named `resource`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.ResourceDescriptor>}
*/
proto.google.api.resource = new jspb.ExtensionFieldInfo(
1053,
{resource: 0},
proto.google.api.ResourceDescriptor,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.ResourceDescriptor.toObject),
0);
google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.resource,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.ResourceDescriptor.serializeBinaryToWriter,
proto.google.api.ResourceDescriptor.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MessageOptions.extensions[1053] = proto.google.api.resource;
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

54
api/js/google/api/routing_pb.d.ts vendored Normal file
View File

@ -0,0 +1,54 @@
// package: google.api
// file: google/api/routing.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export class RoutingRule extends jspb.Message {
clearRoutingParametersList(): void;
getRoutingParametersList(): Array<RoutingParameter>;
setRoutingParametersList(value: Array<RoutingParameter>): void;
addRoutingParameters(value?: RoutingParameter, index?: number): RoutingParameter;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RoutingRule.AsObject;
static toObject(includeInstance: boolean, msg: RoutingRule): RoutingRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RoutingRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RoutingRule;
static deserializeBinaryFromReader(message: RoutingRule, reader: jspb.BinaryReader): RoutingRule;
}
export namespace RoutingRule {
export type AsObject = {
routingParametersList: Array<RoutingParameter.AsObject>,
}
}
export class RoutingParameter extends jspb.Message {
getField(): string;
setField(value: string): void;
getPathTemplate(): string;
setPathTemplate(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RoutingParameter.AsObject;
static toObject(includeInstance: boolean, msg: RoutingParameter): RoutingParameter.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RoutingParameter, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RoutingParameter;
static deserializeBinaryFromReader(message: RoutingParameter, reader: jspb.BinaryReader): RoutingParameter;
}
export namespace RoutingParameter {
export type AsObject = {
field: string,
pathTemplate: string,
}
}
export const routing: jspb.ExtensionFieldInfo<RoutingRule>;

View File

@ -0,0 +1,405 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.routing', null, global);
goog.exportSymbol('proto.google.api.RoutingParameter', null, global);
goog.exportSymbol('proto.google.api.RoutingRule', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.RoutingRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.RoutingRule.repeatedFields_, null);
};
goog.inherits(proto.google.api.RoutingRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.RoutingRule.displayName = 'proto.google.api.RoutingRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.RoutingRule.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.RoutingRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.RoutingRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.RoutingRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.RoutingRule.toObject = function(includeInstance, msg) {
var f, obj = {
routingParametersList: jspb.Message.toObjectList(msg.getRoutingParametersList(),
proto.google.api.RoutingParameter.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.RoutingRule}
*/
proto.google.api.RoutingRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.RoutingRule;
return proto.google.api.RoutingRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.RoutingRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.RoutingRule}
*/
proto.google.api.RoutingRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new proto.google.api.RoutingParameter;
reader.readMessage(value,proto.google.api.RoutingParameter.deserializeBinaryFromReader);
msg.getRoutingParametersList().push(value);
msg.setRoutingParametersList(msg.getRoutingParametersList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.RoutingRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.RoutingRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.RoutingRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.RoutingRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRoutingParametersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.google.api.RoutingParameter.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.RoutingRule} The clone.
*/
proto.google.api.RoutingRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.RoutingRule} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated RoutingParameter routing_parameters = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.RoutingParameter>}
*/
proto.google.api.RoutingRule.prototype.getRoutingParametersList = function() {
return /** @type{!Array.<!proto.google.api.RoutingParameter>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.RoutingParameter, 2));
};
/** @param {Array.<!proto.google.api.RoutingParameter>} value */
proto.google.api.RoutingRule.prototype.setRoutingParametersList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.RoutingRule.prototype.clearRoutingParametersList = function() {
this.setRoutingParametersList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.RoutingParameter = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.RoutingParameter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.RoutingParameter.displayName = 'proto.google.api.RoutingParameter';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.RoutingParameter.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.RoutingParameter.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.RoutingParameter} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.RoutingParameter.toObject = function(includeInstance, msg) {
var f, obj = {
field: msg.getField(),
pathTemplate: msg.getPathTemplate()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.RoutingParameter}
*/
proto.google.api.RoutingParameter.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.RoutingParameter;
return proto.google.api.RoutingParameter.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.RoutingParameter} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.RoutingParameter}
*/
proto.google.api.RoutingParameter.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setField(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setPathTemplate(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.RoutingParameter} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.RoutingParameter.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.RoutingParameter.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.RoutingParameter.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getField();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPathTemplate();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.RoutingParameter} The clone.
*/
proto.google.api.RoutingParameter.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.RoutingParameter} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string field = 1;
* @return {string}
*/
proto.google.api.RoutingParameter.prototype.getField = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.RoutingParameter.prototype.setField = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string path_template = 2;
* @return {string}
*/
proto.google.api.RoutingParameter.prototype.getPathTemplate = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.RoutingParameter.prototype.setPathTemplate = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `routing`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.RoutingRule>}
*/
proto.google.api.routing = new jspb.ExtensionFieldInfo(
72295729,
{routing: 0},
proto.google.api.RoutingRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.RoutingRule.toObject),
0);
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295729] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.routing,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.RoutingRule.serializeBinaryToWriter,
proto.google.api.RoutingRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MethodOptions.extensions[72295729] = proto.google.api.routing;
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

186
api/js/google/api/service_pb.d.ts vendored Normal file
View File

@ -0,0 +1,186 @@
// package: google.api
// file: google/api/service.proto
import * as jspb from "google-protobuf";
import * as google_api_auth_pb from "../../google/api/auth_pb";
import * as google_api_backend_pb from "../../google/api/backend_pb";
import * as google_api_billing_pb from "../../google/api/billing_pb";
import * as google_api_context_pb from "../../google/api/context_pb";
import * as google_api_control_pb from "../../google/api/control_pb";
import * as google_api_documentation_pb from "../../google/api/documentation_pb";
import * as google_api_endpoint_pb from "../../google/api/endpoint_pb";
import * as google_api_http_pb from "../../google/api/http_pb";
import * as google_api_label_pb from "../../google/api/label_pb";
import * as google_api_log_pb from "../../google/api/log_pb";
import * as google_api_logging_pb from "../../google/api/logging_pb";
import * as google_api_metric_pb from "../../google/api/metric_pb";
import * as google_api_monitored_resource_pb from "../../google/api/monitored_resource_pb";
import * as google_api_monitoring_pb from "../../google/api/monitoring_pb";
import * as google_api_quota_pb from "../../google/api/quota_pb";
import * as google_api_resource_pb from "../../google/api/resource_pb";
import * as google_api_source_info_pb from "../../google/api/source_info_pb";
import * as google_api_system_parameter_pb from "../../google/api/system_parameter_pb";
import * as google_api_usage_pb from "../../google/api/usage_pb";
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
import * as google_protobuf_api_pb from "google-protobuf/google/protobuf/api_pb";
import * as google_protobuf_type_pb from "google-protobuf/google/protobuf/type_pb";
import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
export class Service extends jspb.Message {
getName(): string;
setName(value: string): void;
getTitle(): string;
setTitle(value: string): void;
getProducerProjectId(): string;
setProducerProjectId(value: string): void;
getId(): string;
setId(value: string): void;
clearApisList(): void;
getApisList(): Array<google_protobuf_api_pb.Api>;
setApisList(value: Array<google_protobuf_api_pb.Api>): void;
addApis(value?: google_protobuf_api_pb.Api, index?: number): google_protobuf_api_pb.Api;
clearTypesList(): void;
getTypesList(): Array<google_protobuf_type_pb.Type>;
setTypesList(value: Array<google_protobuf_type_pb.Type>): void;
addTypes(value?: google_protobuf_type_pb.Type, index?: number): google_protobuf_type_pb.Type;
clearEnumsList(): void;
getEnumsList(): Array<google_protobuf_type_pb.Enum>;
setEnumsList(value: Array<google_protobuf_type_pb.Enum>): void;
addEnums(value?: google_protobuf_type_pb.Enum, index?: number): google_protobuf_type_pb.Enum;
hasDocumentation(): boolean;
clearDocumentation(): void;
getDocumentation(): google_api_documentation_pb.Documentation | undefined;
setDocumentation(value?: google_api_documentation_pb.Documentation): void;
hasBackend(): boolean;
clearBackend(): void;
getBackend(): google_api_backend_pb.Backend | undefined;
setBackend(value?: google_api_backend_pb.Backend): void;
hasHttp(): boolean;
clearHttp(): void;
getHttp(): google_api_http_pb.Http | undefined;
setHttp(value?: google_api_http_pb.Http): void;
hasQuota(): boolean;
clearQuota(): void;
getQuota(): google_api_quota_pb.Quota | undefined;
setQuota(value?: google_api_quota_pb.Quota): void;
hasAuthentication(): boolean;
clearAuthentication(): void;
getAuthentication(): google_api_auth_pb.Authentication | undefined;
setAuthentication(value?: google_api_auth_pb.Authentication): void;
hasContext(): boolean;
clearContext(): void;
getContext(): google_api_context_pb.Context | undefined;
setContext(value?: google_api_context_pb.Context): void;
hasUsage(): boolean;
clearUsage(): void;
getUsage(): google_api_usage_pb.Usage | undefined;
setUsage(value?: google_api_usage_pb.Usage): void;
clearEndpointsList(): void;
getEndpointsList(): Array<google_api_endpoint_pb.Endpoint>;
setEndpointsList(value: Array<google_api_endpoint_pb.Endpoint>): void;
addEndpoints(value?: google_api_endpoint_pb.Endpoint, index?: number): google_api_endpoint_pb.Endpoint;
hasControl(): boolean;
clearControl(): void;
getControl(): google_api_control_pb.Control | undefined;
setControl(value?: google_api_control_pb.Control): void;
clearLogsList(): void;
getLogsList(): Array<google_api_log_pb.LogDescriptor>;
setLogsList(value: Array<google_api_log_pb.LogDescriptor>): void;
addLogs(value?: google_api_log_pb.LogDescriptor, index?: number): google_api_log_pb.LogDescriptor;
clearMetricsList(): void;
getMetricsList(): Array<google_api_metric_pb.MetricDescriptor>;
setMetricsList(value: Array<google_api_metric_pb.MetricDescriptor>): void;
addMetrics(value?: google_api_metric_pb.MetricDescriptor, index?: number): google_api_metric_pb.MetricDescriptor;
clearMonitoredResourcesList(): void;
getMonitoredResourcesList(): Array<google_api_monitored_resource_pb.MonitoredResourceDescriptor>;
setMonitoredResourcesList(value: Array<google_api_monitored_resource_pb.MonitoredResourceDescriptor>): void;
addMonitoredResources(value?: google_api_monitored_resource_pb.MonitoredResourceDescriptor, index?: number): google_api_monitored_resource_pb.MonitoredResourceDescriptor;
hasBilling(): boolean;
clearBilling(): void;
getBilling(): google_api_billing_pb.Billing | undefined;
setBilling(value?: google_api_billing_pb.Billing): void;
hasLogging(): boolean;
clearLogging(): void;
getLogging(): google_api_logging_pb.Logging | undefined;
setLogging(value?: google_api_logging_pb.Logging): void;
hasMonitoring(): boolean;
clearMonitoring(): void;
getMonitoring(): google_api_monitoring_pb.Monitoring | undefined;
setMonitoring(value?: google_api_monitoring_pb.Monitoring): void;
hasSystemParameters(): boolean;
clearSystemParameters(): void;
getSystemParameters(): google_api_system_parameter_pb.SystemParameters | undefined;
setSystemParameters(value?: google_api_system_parameter_pb.SystemParameters): void;
hasSourceInfo(): boolean;
clearSourceInfo(): void;
getSourceInfo(): google_api_source_info_pb.SourceInfo | undefined;
setSourceInfo(value?: google_api_source_info_pb.SourceInfo): void;
hasConfigVersion(): boolean;
clearConfigVersion(): void;
getConfigVersion(): google_protobuf_wrappers_pb.UInt32Value | undefined;
setConfigVersion(value?: google_protobuf_wrappers_pb.UInt32Value): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Service.AsObject;
static toObject(includeInstance: boolean, msg: Service): Service.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Service, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Service;
static deserializeBinaryFromReader(message: Service, reader: jspb.BinaryReader): Service;
}
export namespace Service {
export type AsObject = {
name: string,
title: string,
producerProjectId: string,
id: string,
apisList: Array<google_protobuf_api_pb.Api.AsObject>,
typesList: Array<google_protobuf_type_pb.Type.AsObject>,
enumsList: Array<google_protobuf_type_pb.Enum.AsObject>,
documentation?: google_api_documentation_pb.Documentation.AsObject,
backend?: google_api_backend_pb.Backend.AsObject,
http?: google_api_http_pb.Http.AsObject,
quota?: google_api_quota_pb.Quota.AsObject,
authentication?: google_api_auth_pb.Authentication.AsObject,
context?: google_api_context_pb.Context.AsObject,
usage?: google_api_usage_pb.Usage.AsObject,
endpointsList: Array<google_api_endpoint_pb.Endpoint.AsObject>,
control?: google_api_control_pb.Control.AsObject,
logsList: Array<google_api_log_pb.LogDescriptor.AsObject>,
metricsList: Array<google_api_metric_pb.MetricDescriptor.AsObject>,
monitoredResourcesList: Array<google_api_monitored_resource_pb.MonitoredResourceDescriptor.AsObject>,
billing?: google_api_billing_pb.Billing.AsObject,
logging?: google_api_logging_pb.Logging.AsObject,
monitoring?: google_api_monitoring_pb.Monitoring.AsObject,
systemParameters?: google_api_system_parameter_pb.SystemParameters.AsObject,
sourceInfo?: google_api_source_info_pb.SourceInfo.AsObject,
configVersion?: google_protobuf_wrappers_pb.UInt32Value.AsObject,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

28
api/js/google/api/source_info_pb.d.ts vendored Normal file
View File

@ -0,0 +1,28 @@
// package: google.api
// file: google/api/source_info.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
export class SourceInfo extends jspb.Message {
clearSourceFilesList(): void;
getSourceFilesList(): Array<google_protobuf_any_pb.Any>;
setSourceFilesList(value: Array<google_protobuf_any_pb.Any>): void;
addSourceFiles(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SourceInfo.AsObject;
static toObject(includeInstance: boolean, msg: SourceInfo): SourceInfo.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SourceInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SourceInfo;
static deserializeBinaryFromReader(message: SourceInfo, reader: jspb.BinaryReader): SourceInfo;
}
export namespace SourceInfo {
export type AsObject = {
sourceFilesList: Array<google_protobuf_any_pb.Any.AsObject>,
}
}

View File

@ -0,0 +1,192 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.exportSymbol('proto.google.api.SourceInfo', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.SourceInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.SourceInfo.repeatedFields_, null);
};
goog.inherits(proto.google.api.SourceInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SourceInfo.displayName = 'proto.google.api.SourceInfo';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.SourceInfo.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.SourceInfo.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.SourceInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.SourceInfo} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.SourceInfo.toObject = function(includeInstance, msg) {
var f, obj = {
sourceFilesList: jspb.Message.toObjectList(msg.getSourceFilesList(),
google_protobuf_any_pb.Any.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.SourceInfo}
*/
proto.google.api.SourceInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.SourceInfo;
return proto.google.api.SourceInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.SourceInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.SourceInfo}
*/
proto.google.api.SourceInfo.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.getSourceFilesList().push(value);
msg.setSourceFilesList(msg.getSourceFilesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.SourceInfo} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SourceInfo.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.SourceInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SourceInfo.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSourceFilesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.SourceInfo} The clone.
*/
proto.google.api.SourceInfo.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.SourceInfo} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated google.protobuf.Any source_files = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.protobuf.Any>}
*/
proto.google.api.SourceInfo.prototype.getSourceFilesList = function() {
return /** @type{!Array.<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1));
};
/** @param {Array.<!proto.google.protobuf.Any>} value */
proto.google.api.SourceInfo.prototype.setSourceFilesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.SourceInfo.prototype.clearSourceFilesList = function() {
this.setSourceFilesList([]);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,81 @@
// package: google.api
// file: google/api/system_parameter.proto
import * as jspb from "google-protobuf";
export class SystemParameters extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<SystemParameterRule>;
setRulesList(value: Array<SystemParameterRule>): void;
addRules(value?: SystemParameterRule, index?: number): SystemParameterRule;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SystemParameters.AsObject;
static toObject(includeInstance: boolean, msg: SystemParameters): SystemParameters.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SystemParameters, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SystemParameters;
static deserializeBinaryFromReader(message: SystemParameters, reader: jspb.BinaryReader): SystemParameters;
}
export namespace SystemParameters {
export type AsObject = {
rulesList: Array<SystemParameterRule.AsObject>,
}
}
export class SystemParameterRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
clearParametersList(): void;
getParametersList(): Array<SystemParameter>;
setParametersList(value: Array<SystemParameter>): void;
addParameters(value?: SystemParameter, index?: number): SystemParameter;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SystemParameterRule.AsObject;
static toObject(includeInstance: boolean, msg: SystemParameterRule): SystemParameterRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SystemParameterRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SystemParameterRule;
static deserializeBinaryFromReader(message: SystemParameterRule, reader: jspb.BinaryReader): SystemParameterRule;
}
export namespace SystemParameterRule {
export type AsObject = {
selector: string,
parametersList: Array<SystemParameter.AsObject>,
}
}
export class SystemParameter extends jspb.Message {
getName(): string;
setName(value: string): void;
getHttpHeader(): string;
setHttpHeader(value: string): void;
getUrlQueryParameter(): string;
setUrlQueryParameter(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SystemParameter.AsObject;
static toObject(includeInstance: boolean, msg: SystemParameter): SystemParameter.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SystemParameter, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SystemParameter;
static deserializeBinaryFromReader(message: SystemParameter, reader: jspb.BinaryReader): SystemParameter;
}
export namespace SystemParameter {
export type AsObject = {
name: string,
httpHeader: string,
urlQueryParameter: string,
}
}

View File

@ -0,0 +1,611 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.SystemParameter', null, global);
goog.exportSymbol('proto.google.api.SystemParameterRule', null, global);
goog.exportSymbol('proto.google.api.SystemParameters', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.SystemParameters = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.SystemParameters.repeatedFields_, null);
};
goog.inherits(proto.google.api.SystemParameters, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SystemParameters.displayName = 'proto.google.api.SystemParameters';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.SystemParameters.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.SystemParameters.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.SystemParameters.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.SystemParameters} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.SystemParameters.toObject = function(includeInstance, msg) {
var f, obj = {
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.SystemParameterRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.SystemParameters}
*/
proto.google.api.SystemParameters.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.SystemParameters;
return proto.google.api.SystemParameters.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.SystemParameters} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.SystemParameters}
*/
proto.google.api.SystemParameters.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.SystemParameterRule;
reader.readMessage(value,proto.google.api.SystemParameterRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.SystemParameters} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameters.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.SystemParameters.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameters.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.SystemParameterRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.SystemParameters} The clone.
*/
proto.google.api.SystemParameters.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.SystemParameters} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated SystemParameterRule rules = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.SystemParameterRule>}
*/
proto.google.api.SystemParameters.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.SystemParameterRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.SystemParameterRule, 1));
};
/** @param {Array.<!proto.google.api.SystemParameterRule>} value */
proto.google.api.SystemParameters.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.SystemParameters.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.SystemParameterRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.SystemParameterRule.repeatedFields_, null);
};
goog.inherits(proto.google.api.SystemParameterRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SystemParameterRule.displayName = 'proto.google.api.SystemParameterRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.SystemParameterRule.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.SystemParameterRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.SystemParameterRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.SystemParameterRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.SystemParameterRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
parametersList: jspb.Message.toObjectList(msg.getParametersList(),
proto.google.api.SystemParameter.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.SystemParameterRule}
*/
proto.google.api.SystemParameterRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.SystemParameterRule;
return proto.google.api.SystemParameterRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.SystemParameterRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.SystemParameterRule}
*/
proto.google.api.SystemParameterRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = new proto.google.api.SystemParameter;
reader.readMessage(value,proto.google.api.SystemParameter.deserializeBinaryFromReader);
msg.getParametersList().push(value);
msg.setParametersList(msg.getParametersList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.SystemParameterRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameterRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.SystemParameterRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameterRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getParametersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.google.api.SystemParameter.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.SystemParameterRule} The clone.
*/
proto.google.api.SystemParameterRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.SystemParameterRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.SystemParameterRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.SystemParameterRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated SystemParameter parameters = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.SystemParameter>}
*/
proto.google.api.SystemParameterRule.prototype.getParametersList = function() {
return /** @type{!Array.<!proto.google.api.SystemParameter>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.SystemParameter, 2));
};
/** @param {Array.<!proto.google.api.SystemParameter>} value */
proto.google.api.SystemParameterRule.prototype.setParametersList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.google.api.SystemParameterRule.prototype.clearParametersList = function() {
this.setParametersList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.SystemParameter = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.SystemParameter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SystemParameter.displayName = 'proto.google.api.SystemParameter';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.SystemParameter.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.SystemParameter.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.SystemParameter} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.SystemParameter.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
httpHeader: msg.getHttpHeader(),
urlQueryParameter: msg.getUrlQueryParameter()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.SystemParameter}
*/
proto.google.api.SystemParameter.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.SystemParameter;
return proto.google.api.SystemParameter.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.SystemParameter} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.SystemParameter}
*/
proto.google.api.SystemParameter.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setHttpHeader(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setUrlQueryParameter(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.SystemParameter} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameter.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.SystemParameter.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.SystemParameter.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getHttpHeader();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getUrlQueryParameter();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.SystemParameter} The clone.
*/
proto.google.api.SystemParameter.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.SystemParameter} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.SystemParameter.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.SystemParameter.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string http_header = 2;
* @return {string}
*/
proto.google.api.SystemParameter.prototype.getHttpHeader = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.SystemParameter.prototype.setHttpHeader = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string url_query_parameter = 3;
* @return {string}
*/
proto.google.api.SystemParameter.prototype.getUrlQueryParameter = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.google.api.SystemParameter.prototype.setUrlQueryParameter = function(value) {
jspb.Message.setField(this, 3, value);
};
goog.object.extend(exports, proto.google.api);

1
api/js/google/api/usage_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

65
api/js/google/api/usage_pb.d.ts vendored Normal file
View File

@ -0,0 +1,65 @@
// package: google.api
// file: google/api/usage.proto
import * as jspb from "google-protobuf";
export class Usage extends jspb.Message {
clearRequirementsList(): void;
getRequirementsList(): Array<string>;
setRequirementsList(value: Array<string>): void;
addRequirements(value: string, index?: number): string;
clearRulesList(): void;
getRulesList(): Array<UsageRule>;
setRulesList(value: Array<UsageRule>): void;
addRules(value?: UsageRule, index?: number): UsageRule;
getProducerNotificationChannel(): string;
setProducerNotificationChannel(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Usage.AsObject;
static toObject(includeInstance: boolean, msg: Usage): Usage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Usage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Usage;
static deserializeBinaryFromReader(message: Usage, reader: jspb.BinaryReader): Usage;
}
export namespace Usage {
export type AsObject = {
requirementsList: Array<string>,
rulesList: Array<UsageRule.AsObject>,
producerNotificationChannel: string,
}
}
export class UsageRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
getAllowUnregisteredCalls(): boolean;
setAllowUnregisteredCalls(value: boolean): void;
getSkipServiceControl(): boolean;
setSkipServiceControl(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UsageRule.AsObject;
static toObject(includeInstance: boolean, msg: UsageRule): UsageRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UsageRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UsageRule;
static deserializeBinaryFromReader(message: UsageRule, reader: jspb.BinaryReader): UsageRule;
}
export namespace UsageRule {
export type AsObject = {
selector: string,
allowUnregisteredCalls: boolean,
skipServiceControl: boolean,
}
}

View File

@ -0,0 +1,471 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.google.api.Usage', null, global);
goog.exportSymbol('proto.google.api.UsageRule', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Usage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Usage.repeatedFields_, null);
};
goog.inherits(proto.google.api.Usage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Usage.displayName = 'proto.google.api.Usage';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Usage.repeatedFields_ = [1,6];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Usage.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Usage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Usage} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Usage.toObject = function(includeInstance, msg) {
var f, obj = {
requirementsList: jspb.Message.getField(msg, 1),
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.UsageRule.toObject, includeInstance),
producerNotificationChannel: msg.getProducerNotificationChannel()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Usage}
*/
proto.google.api.Usage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Usage;
return proto.google.api.Usage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Usage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Usage}
*/
proto.google.api.Usage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.getRequirementsList().push(value);
msg.setRequirementsList(msg.getRequirementsList());
break;
case 6:
var value = new proto.google.api.UsageRule;
reader.readMessage(value,proto.google.api.UsageRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setProducerNotificationChannel(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Usage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Usage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Usage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Usage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRequirementsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.google.api.UsageRule.serializeBinaryToWriter
);
}
f = this.getProducerNotificationChannel();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Usage} The clone.
*/
proto.google.api.Usage.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Usage} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated string requirements = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<string>}
*/
proto.google.api.Usage.prototype.getRequirementsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 1));
};
/** @param {Array.<string>} value */
proto.google.api.Usage.prototype.setRequirementsList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
proto.google.api.Usage.prototype.clearRequirementsList = function() {
jspb.Message.setField(this, 1, []);
};
/**
* repeated UsageRule rules = 6;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.UsageRule>}
*/
proto.google.api.Usage.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.UsageRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.UsageRule, 6));
};
/** @param {Array.<!proto.google.api.UsageRule>} value */
proto.google.api.Usage.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 6, value);
};
proto.google.api.Usage.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* optional string producer_notification_channel = 7;
* @return {string}
*/
proto.google.api.Usage.prototype.getProducerNotificationChannel = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
};
/** @param {string} value */
proto.google.api.Usage.prototype.setProducerNotificationChannel = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.UsageRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.UsageRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.UsageRule.displayName = 'proto.google.api.UsageRule';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.UsageRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.UsageRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.UsageRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.UsageRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
allowUnregisteredCalls: msg.getAllowUnregisteredCalls(),
skipServiceControl: msg.getSkipServiceControl()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.UsageRule}
*/
proto.google.api.UsageRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.UsageRule;
return proto.google.api.UsageRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.UsageRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.UsageRule}
*/
proto.google.api.UsageRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAllowUnregisteredCalls(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSkipServiceControl(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.UsageRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.UsageRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.UsageRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.UsageRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAllowUnregisteredCalls();
if (f) {
writer.writeBool(
2,
f
);
}
f = this.getSkipServiceControl();
if (f) {
writer.writeBool(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.UsageRule} The clone.
*/
proto.google.api.UsageRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.UsageRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.UsageRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.UsageRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional bool allow_unregistered_calls = 2;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.google.api.UsageRule.prototype.getAllowUnregisteredCalls = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 2, false));
};
/** @param {boolean} value */
proto.google.api.UsageRule.prototype.setAllowUnregisteredCalls = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional bool skip_service_control = 3;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.google.api.UsageRule.prototype.getSkipServiceControl = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 3, false));
};
/** @param {boolean} value */
proto.google.api.UsageRule.prototype.setSkipServiceControl = function(value) {
jspb.Message.setField(this, 3, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

64
api/js/google/api/visibility_pb.d.ts vendored Normal file
View File

@ -0,0 +1,64 @@
// package: google.api
// file: google/api/visibility.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
export class Visibility extends jspb.Message {
clearRulesList(): void;
getRulesList(): Array<VisibilityRule>;
setRulesList(value: Array<VisibilityRule>): void;
addRules(value?: VisibilityRule, index?: number): VisibilityRule;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Visibility.AsObject;
static toObject(includeInstance: boolean, msg: Visibility): Visibility.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Visibility, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Visibility;
static deserializeBinaryFromReader(message: Visibility, reader: jspb.BinaryReader): Visibility;
}
export namespace Visibility {
export type AsObject = {
rulesList: Array<VisibilityRule.AsObject>,
}
}
export class VisibilityRule extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
getRestriction(): string;
setRestriction(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): VisibilityRule.AsObject;
static toObject(includeInstance: boolean, msg: VisibilityRule): VisibilityRule.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: VisibilityRule, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): VisibilityRule;
static deserializeBinaryFromReader(message: VisibilityRule, reader: jspb.BinaryReader): VisibilityRule;
}
export namespace VisibilityRule {
export type AsObject = {
selector: string,
restriction: string,
}
}
export const enumVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;
export const valueVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;
export const fieldVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;
export const messageVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;
export const methodVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;
export const apiVisibility: jspb.ExtensionFieldInfo<VisibilityRule>;

View File

@ -0,0 +1,535 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.api_visibility', null, global);
goog.exportSymbol('google.api.enum_visibility', null, global);
goog.exportSymbol('google.api.field_visibility', null, global);
goog.exportSymbol('google.api.message_visibility', null, global);
goog.exportSymbol('google.api.method_visibility', null, global);
goog.exportSymbol('google.api.value_visibility', null, global);
goog.exportSymbol('proto.google.api.Visibility', null, global);
goog.exportSymbol('proto.google.api.VisibilityRule', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.Visibility = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Visibility.repeatedFields_, null);
};
goog.inherits(proto.google.api.Visibility, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Visibility.displayName = 'proto.google.api.Visibility';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Visibility.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.Visibility.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Visibility.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.Visibility} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.Visibility.toObject = function(includeInstance, msg) {
var f, obj = {
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.VisibilityRule.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.Visibility}
*/
proto.google.api.Visibility.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Visibility;
return proto.google.api.Visibility.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Visibility} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Visibility}
*/
proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.VisibilityRule;
reader.readMessage(value,proto.google.api.VisibilityRule.deserializeBinaryFromReader);
msg.getRulesList().push(value);
msg.setRulesList(msg.getRulesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.Visibility} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Visibility.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Visibility.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.Visibility.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.api.VisibilityRule.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Visibility} The clone.
*/
proto.google.api.Visibility.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Visibility} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated VisibilityRule rules = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.Visibility.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.VisibilityRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.VisibilityRule, 1));
};
/** @param {Array.<!proto.google.api.VisibilityRule>} value */
proto.google.api.Visibility.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.google.api.Visibility.prototype.clearRulesList = function() {
this.setRulesList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.api.VisibilityRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.VisibilityRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.api.VisibilityRule.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.VisibilityRule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.api.VisibilityRule} msg The msg instance to transform.
* @return {!Object}
*/
proto.google.api.VisibilityRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
restriction: msg.getRestriction()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.api.VisibilityRule}
*/
proto.google.api.VisibilityRule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.VisibilityRule;
return proto.google.api.VisibilityRule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.VisibilityRule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.VisibilityRule}
*/
proto.google.api.VisibilityRule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setSelector(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setRestriction(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.google.api.VisibilityRule} message
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.VisibilityRule.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.VisibilityRule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.google.api.VisibilityRule.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getRestriction();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.VisibilityRule} The clone.
*/
proto.google.api.VisibilityRule.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.VisibilityRule} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.VisibilityRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.google.api.VisibilityRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string restriction = 2;
* @return {string}
*/
proto.google.api.VisibilityRule.prototype.getRestriction = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.google.api.VisibilityRule.prototype.setRestriction = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `enumVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.enumVisibility = new jspb.ExtensionFieldInfo(
72295727,
{enumVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.enumVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.EnumOptions.extensions[72295727] = proto.google.api.enumVisibility;
/**
* A tuple of {field number, class constructor} for the extension
* field named `valueVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.valueVisibility = new jspb.ExtensionFieldInfo(
72295727,
{valueVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.valueVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.EnumValueOptions.extensions[72295727] = proto.google.api.valueVisibility;
/**
* A tuple of {field number, class constructor} for the extension
* field named `fieldVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.fieldVisibility = new jspb.ExtensionFieldInfo(
72295727,
{fieldVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.fieldVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[72295727] = proto.google.api.fieldVisibility;
/**
* A tuple of {field number, class constructor} for the extension
* field named `messageVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.messageVisibility = new jspb.ExtensionFieldInfo(
72295727,
{messageVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.messageVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MessageOptions.extensions[72295727] = proto.google.api.messageVisibility;
/**
* A tuple of {field number, class constructor} for the extension
* field named `methodVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.methodVisibility = new jspb.ExtensionFieldInfo(
72295727,
{methodVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.methodVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MethodOptions.extensions[72295727] = proto.google.api.methodVisibility;
/**
* A tuple of {field number, class constructor} for the extension
* field named `apiVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
*/
proto.google.api.apiVisibility = new jspb.ExtensionFieldInfo(
72295727,
{apiVisibility: 0},
proto.google.api.VisibilityRule,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.google.api.VisibilityRule.toObject),
0);
google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo(
proto.google.api.apiVisibility,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.google.api.VisibilityRule.serializeBinaryToWriter,
proto.google.api.VisibilityRule.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[72295727] = proto.google.api.apiVisibility;
goog.object.extend(exports, proto.google.api);