Re-generate API + update code.

This commit is contained in:
Orne Brocaar 2022-12-05 11:46:36 +00:00
parent abee88712c
commit fe3d6d3fdf
90 changed files with 29185 additions and 23503 deletions

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/application.proto
package api
@ -4086,10 +4086,12 @@ type IftttIntegration struct {
// Values.
// Up to 2 values can be forwarded to IFTTT. These values must map to the
// decoded payload keys. For example:
// {
// "batteryLevel": 75.3,
// "buttons": [{"pressed": false}, {"pressed": true}]
// }
//
// {
// "batteryLevel": 75.3,
// "buttons": [{"pressed": false}, {"pressed": true}]
// }
//
// You would specify the following fields:
// uplink_values = ["batteryLevel", "buttons_0_pressed"]
//

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/application.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/device.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/device.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/device_profile.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/device_profile.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/device_profile_template.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/device_profile_template.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/frame_log.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/gateway.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/gateway.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/internal.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/internal.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/multicast_group.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/multicast_group.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/request_log.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/tenant.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/tenant.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: api/user.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// - protoc v3.21.9
// source: api/user.proto
package api

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: common/common.proto
package common

932
api/go/gw/gw.pb.go vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: integration/integration.proto
package integration

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// protoc v3.21.9
// source: meta/meta.proto
package meta

File diff suppressed because it is too large Load Diff

4509
api/js/api/device_pb.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: api/frame_log.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,11 +13,13 @@ var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
goog.exportSymbol('proto.api.DownlinkFrameLog', null, global);
goog.exportSymbol('proto.api.UplinkFrameLog', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -30,8 +35,34 @@ proto.api.UplinkFrameLog = function(opt_data) {
};
goog.inherits(proto.api.UplinkFrameLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.UplinkFrameLog.displayName = 'proto.api.UplinkFrameLog';
}
/**
* 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.api.DownlinkFrameLog = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.DownlinkFrameLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.DownlinkFrameLog.displayName = 'proto.api.DownlinkFrameLog';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -43,13 +74,15 @@ proto.api.UplinkFrameLog.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.UplinkFrameLog.prototype.toObject = function(opt_includeInstance) {
@ -59,11 +92,12 @@ proto.api.UplinkFrameLog.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.UplinkFrameLog} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.UplinkFrameLog.toObject = function(includeInstance, msg) {
var f, obj = {
@ -71,11 +105,11 @@ proto.api.UplinkFrameLog.toObject = function(includeInstance, msg) {
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.toObject(includeInstance, f),
rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
gw_gw_pb.UplinkRxInfo.toObject, includeInstance),
mType: msg.getMType(),
devAddr: msg.getDevAddr(),
devEui: msg.getDevEui(),
mType: jspb.Message.getFieldWithDefault(msg, 4, 0),
devAddr: jspb.Message.getFieldWithDefault(msg, 5, ""),
devEui: jspb.Message.getFieldWithDefault(msg, 6, ""),
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
plaintextMacCommands: msg.getPlaintextMacCommands()
plaintextMacCommands: jspb.Message.getBooleanFieldWithDefault(msg, 8, false)
};
if (includeInstance) {
@ -124,8 +158,7 @@ proto.api.UplinkFrameLog.deserializeBinaryFromReader = function(msg, reader) {
case 3:
var value = new gw_gw_pb.UplinkRxInfo;
reader.readMessage(value,gw_gw_pb.UplinkRxInfo.deserializeBinaryFromReader);
msg.getRxInfoList().push(value);
msg.setRxInfoList(msg.getRxInfoList());
msg.addRxInfo(value);
break;
case 4:
var value = /** @type {!proto.common.MType} */ (reader.readEnum());
@ -157,43 +190,34 @@ proto.api.UplinkFrameLog.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.UplinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.UplinkFrameLog.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.UplinkFrameLog.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.api.UplinkFrameLog.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.UplinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.UplinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
proto.api.UplinkFrameLog.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getPhyPayload_asU8();
f = message.getPhyPayload_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = this.getTxInfo();
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
2,
@ -201,7 +225,7 @@ proto.api.UplinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
gw_gw_pb.UplinkTxInfo.serializeBinaryToWriter
);
}
f = this.getRxInfoList();
f = message.getRxInfoList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -209,28 +233,28 @@ proto.api.UplinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
gw_gw_pb.UplinkRxInfo.serializeBinaryToWriter
);
}
f = this.getMType();
f = message.getMType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getDevAddr();
f = message.getDevAddr();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getDevEui();
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getTime();
f = message.getTime();
if (f != null) {
writer.writeMessage(
7,
@ -238,7 +262,7 @@ proto.api.UplinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getPlaintextMacCommands();
f = message.getPlaintextMacCommands();
if (f) {
writer.writeBool(
8,
@ -248,21 +272,12 @@ proto.api.UplinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.UplinkFrameLog} The clone.
*/
proto.api.UplinkFrameLog.prototype.cloneMessage = function() {
return /** @type {!proto.api.UplinkFrameLog} */ (jspb.Message.cloneMessage(this));
};
/**
* optional bytes phy_payload = 1;
* @return {!(string|Uint8Array)}
*/
proto.api.UplinkFrameLog.prototype.getPhyPayload = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
@ -290,36 +305,46 @@ proto.api.UplinkFrameLog.prototype.getPhyPayload_asU8 = function() {
};
/** @param {!(string|Uint8Array)} value */
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setPhyPayload = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional gw.UplinkTxInfo tx_info = 2;
* @return {proto.gw.UplinkTxInfo}
* @return {?proto.gw.UplinkTxInfo}
*/
proto.api.UplinkFrameLog.prototype.getTxInfo = function() {
return /** @type{proto.gw.UplinkTxInfo} */ (
return /** @type{?proto.gw.UplinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTxInfo, 2));
};
/** @param {proto.gw.UplinkTxInfo|undefined} value */
/**
* @param {?proto.gw.UplinkTxInfo|undefined} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setTxInfo = function(value) {
jspb.Message.setWrapperField(this, 2, value);
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.clearTxInfo = function() {
this.setTxInfo(undefined);
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.api.UplinkFrameLog.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 2) != null;
@ -328,24 +353,39 @@ proto.api.UplinkFrameLog.prototype.hasTxInfo = function() {
/**
* repeated gw.UplinkRxInfo rx_info = 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.gw.UplinkRxInfo>}
* @return {!Array<!proto.gw.UplinkRxInfo>}
*/
proto.api.UplinkFrameLog.prototype.getRxInfoList = function() {
return /** @type{!Array.<!proto.gw.UplinkRxInfo>} */ (
return /** @type{!Array<!proto.gw.UplinkRxInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRxInfo, 3));
};
/** @param {Array.<!proto.gw.UplinkRxInfo>} value */
/**
* @param {!Array<!proto.gw.UplinkRxInfo>} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setRxInfoList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.gw.UplinkRxInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.gw.UplinkRxInfo}
*/
proto.api.UplinkFrameLog.prototype.addRxInfo = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gw.UplinkRxInfo, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.clearRxInfoList = function() {
this.setRxInfoList([]);
return this.setRxInfoList([]);
};
@ -354,13 +394,16 @@ proto.api.UplinkFrameLog.prototype.clearRxInfoList = function() {
* @return {!proto.common.MType}
*/
proto.api.UplinkFrameLog.prototype.getMType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {!proto.common.MType} value */
/**
* @param {!proto.common.MType} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setMType = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3EnumField(this, 4, value);
};
@ -369,13 +412,16 @@ proto.api.UplinkFrameLog.prototype.setMType = function(value) {
* @return {string}
*/
proto.api.UplinkFrameLog.prototype.getDevAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setDevAddr = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3StringField(this, 5, value);
};
@ -384,40 +430,50 @@ proto.api.UplinkFrameLog.prototype.setDevAddr = function(value) {
* @return {string}
*/
proto.api.UplinkFrameLog.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setDevEui = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional google.protobuf.Timestamp time = 7;
* @return {proto.google.protobuf.Timestamp}
* @return {?proto.google.protobuf.Timestamp}
*/
proto.api.UplinkFrameLog.prototype.getTime = function() {
return /** @type{proto.google.protobuf.Timestamp} */ (
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
};
/** @param {proto.google.protobuf.Timestamp|undefined} value */
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.setTime = function(value) {
jspb.Message.setWrapperField(this, 7, value);
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.UplinkFrameLog.prototype.clearTime = function() {
this.setTime(undefined);
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.api.UplinkFrameLog.prototype.hasTime = function() {
return jspb.Message.getField(this, 7) != null;
@ -426,50 +482,36 @@ proto.api.UplinkFrameLog.prototype.hasTime = function() {
/**
* optional bool plaintext_mac_commands = 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.api.UplinkFrameLog.prototype.getPlaintextMacCommands = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 8, false));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};
/** @param {boolean} value */
proto.api.UplinkFrameLog.prototype.setPlaintextMacCommands = function(value) {
jspb.Message.setField(this, 8, 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
* @param {boolean} value
* @return {!proto.api.UplinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.api.UplinkFrameLog.prototype.setPlaintextMacCommands = function(value) {
return jspb.Message.setProto3BooleanField(this, 8, value);
};
goog.inherits(proto.api.DownlinkFrameLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.api.DownlinkFrameLog.displayName = 'proto.api.DownlinkFrameLog';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.DownlinkFrameLog.prototype.toObject = function(opt_includeInstance) {
@ -479,23 +521,24 @@ proto.api.DownlinkFrameLog.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.DownlinkFrameLog} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.DownlinkFrameLog.toObject = function(includeInstance, msg) {
var f, obj = {
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
phyPayload: msg.getPhyPayload_asB64(),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTxInfo.toObject(includeInstance, f),
downlinkId: msg.getDownlinkId(),
gatewayId: msg.getGatewayId(),
mType: msg.getMType(),
devAddr: msg.getDevAddr(),
devEui: msg.getDevEui(),
plaintextMacCommands: msg.getPlaintextMacCommands()
downlinkId: jspb.Message.getFieldWithDefault(msg, 4, 0),
gatewayId: jspb.Message.getFieldWithDefault(msg, 5, ""),
mType: jspb.Message.getFieldWithDefault(msg, 6, 0),
devAddr: jspb.Message.getFieldWithDefault(msg, 7, ""),
devEui: jspb.Message.getFieldWithDefault(msg, 8, ""),
plaintextMacCommands: jspb.Message.getBooleanFieldWithDefault(msg, 9, false)
};
if (includeInstance) {
@ -579,36 +622,27 @@ proto.api.DownlinkFrameLog.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.DownlinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.DownlinkFrameLog.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.DownlinkFrameLog.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.api.DownlinkFrameLog.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.DownlinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.DownlinkFrameLog.prototype.serializeBinaryToWriter = function (writer) {
proto.api.DownlinkFrameLog.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getTime();
f = message.getTime();
if (f != null) {
writer.writeMessage(
1,
@ -616,14 +650,14 @@ proto.api.DownlinkFrameLog.prototype.serializeBinaryToWriter = function (writer)
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getPhyPayload_asU8();
f = message.getPhyPayload_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = this.getTxInfo();
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
3,
@ -631,42 +665,42 @@ proto.api.DownlinkFrameLog.prototype.serializeBinaryToWriter = function (writer)
gw_gw_pb.DownlinkTxInfo.serializeBinaryToWriter
);
}
f = this.getDownlinkId();
f = message.getDownlinkId();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
f = this.getGatewayId();
f = message.getGatewayId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getMType();
f = message.getMType();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = this.getDevAddr();
f = message.getDevAddr();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = this.getDevEui();
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = this.getPlaintextMacCommands();
f = message.getPlaintextMacCommands();
if (f) {
writer.writeBool(
9,
@ -676,39 +710,37 @@ proto.api.DownlinkFrameLog.prototype.serializeBinaryToWriter = function (writer)
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.DownlinkFrameLog} The clone.
*/
proto.api.DownlinkFrameLog.prototype.cloneMessage = function() {
return /** @type {!proto.api.DownlinkFrameLog} */ (jspb.Message.cloneMessage(this));
};
/**
* optional google.protobuf.Timestamp time = 1;
* @return {proto.google.protobuf.Timestamp}
* @return {?proto.google.protobuf.Timestamp}
*/
proto.api.DownlinkFrameLog.prototype.getTime = function() {
return /** @type{proto.google.protobuf.Timestamp} */ (
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};
/** @param {proto.google.protobuf.Timestamp|undefined} value */
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setTime = function(value) {
jspb.Message.setWrapperField(this, 1, value);
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.clearTime = function() {
this.setTime(undefined);
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.api.DownlinkFrameLog.prototype.hasTime = function() {
return jspb.Message.getField(this, 1) != null;
@ -720,7 +752,7 @@ proto.api.DownlinkFrameLog.prototype.hasTime = function() {
* @return {!(string|Uint8Array)}
*/
proto.api.DownlinkFrameLog.prototype.getPhyPayload = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
@ -748,36 +780,46 @@ proto.api.DownlinkFrameLog.prototype.getPhyPayload_asU8 = function() {
};
/** @param {!(string|Uint8Array)} value */
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setPhyPayload = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional gw.DownlinkTxInfo tx_info = 3;
* @return {proto.gw.DownlinkTxInfo}
* @return {?proto.gw.DownlinkTxInfo}
*/
proto.api.DownlinkFrameLog.prototype.getTxInfo = function() {
return /** @type{proto.gw.DownlinkTxInfo} */ (
return /** @type{?proto.gw.DownlinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTxInfo, 3));
};
/** @param {proto.gw.DownlinkTxInfo|undefined} value */
/**
* @param {?proto.gw.DownlinkTxInfo|undefined} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setTxInfo = function(value) {
jspb.Message.setWrapperField(this, 3, value);
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.clearTxInfo = function() {
this.setTxInfo(undefined);
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.api.DownlinkFrameLog.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 3) != null;
@ -789,13 +831,16 @@ proto.api.DownlinkFrameLog.prototype.hasTxInfo = function() {
* @return {number}
*/
proto.api.DownlinkFrameLog.prototype.getDownlinkId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setDownlinkId = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -804,13 +849,16 @@ proto.api.DownlinkFrameLog.prototype.setDownlinkId = function(value) {
* @return {string}
*/
proto.api.DownlinkFrameLog.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setGatewayId = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3StringField(this, 5, value);
};
@ -819,13 +867,16 @@ proto.api.DownlinkFrameLog.prototype.setGatewayId = function(value) {
* @return {!proto.common.MType}
*/
proto.api.DownlinkFrameLog.prototype.getMType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldProto3(this, 6, 0));
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {!proto.common.MType} value */
/**
* @param {!proto.common.MType} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setMType = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3EnumField(this, 6, value);
};
@ -834,13 +885,16 @@ proto.api.DownlinkFrameLog.prototype.setMType = function(value) {
* @return {string}
*/
proto.api.DownlinkFrameLog.prototype.getDevAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setDevAddr = function(value) {
jspb.Message.setField(this, 7, value);
return jspb.Message.setProto3StringField(this, 7, value);
};
@ -849,30 +903,34 @@ proto.api.DownlinkFrameLog.prototype.setDevAddr = function(value) {
* @return {string}
*/
proto.api.DownlinkFrameLog.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setDevEui = function(value) {
jspb.Message.setField(this, 8, value);
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional bool plaintext_mac_commands = 9;
* 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.api.DownlinkFrameLog.prototype.getPlaintextMacCommands = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 9, false));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};
/** @param {boolean} value */
/**
* @param {boolean} value
* @return {!proto.api.DownlinkFrameLog} returns this
*/
proto.api.DownlinkFrameLog.prototype.setPlaintextMacCommands = function(value) {
jspb.Message.setField(this, 9, value);
return jspb.Message.setProto3BooleanField(this, 9, value);
};

1869
api/js/api/gateway_pb.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: api/request_log.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,10 +13,12 @@ var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
goog.exportSymbol('proto.api.RequestLog', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -29,19 +34,26 @@ proto.api.RequestLog = function(opt_data) {
};
goog.inherits(proto.api.RequestLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.RequestLog.displayName = 'proto.api.RequestLog';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.RequestLog.prototype.toObject = function(opt_includeInstance) {
@ -51,17 +63,18 @@ proto.api.RequestLog.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.RequestLog} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.RequestLog.toObject = function(includeInstance, msg) {
var f, obj = {
service: msg.getService(),
method: msg.getMethod(),
metadataMap: (f = msg.getMetadataMap(true)) ? f.toArray() : []
service: jspb.Message.getFieldWithDefault(msg, 1, ""),
method: jspb.Message.getFieldWithDefault(msg, 2, ""),
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
@ -109,7 +122,7 @@ proto.api.RequestLog.deserializeBinaryFromReader = function(msg, reader) {
case 3:
var value = msg.getMetadataMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
@ -121,77 +134,62 @@ proto.api.RequestLog.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.RequestLog} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.RequestLog.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.RequestLog.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.api.RequestLog.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.RequestLog} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.RequestLog.prototype.serializeBinaryToWriter = function (writer) {
proto.api.RequestLog.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getService();
f = message.getService();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMethod();
f = message.getMethod();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getMetadataMap(true);
f = message.getMetadataMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(3, 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.api.RequestLog} The clone.
*/
proto.api.RequestLog.prototype.cloneMessage = function() {
return /** @type {!proto.api.RequestLog} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string service = 1;
* @return {string}
*/
proto.api.RequestLog.prototype.getService = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.RequestLog} returns this
*/
proto.api.RequestLog.prototype.setService = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -200,13 +198,16 @@ proto.api.RequestLog.prototype.setService = function(value) {
* @return {string}
*/
proto.api.RequestLog.prototype.getMethod = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.api.RequestLog} returns this
*/
proto.api.RequestLog.prototype.setMethod = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -223,4 +224,13 @@ proto.api.RequestLog.prototype.getMetadataMap = function(opt_noLazyCreate) {
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.api.RequestLog} returns this
*/
proto.api.RequestLog.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};
goog.object.extend(exports, proto.api);

2514
api/js/api/tenant_pb.js vendored

File diff suppressed because it is too large Load Diff

1521
api/js/api/user_pb.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: common/common.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,6 +13,7 @@ var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.common.Aggregation', null, global);
goog.exportSymbol('proto.common.KeyEnvelope', null, global);
goog.exportSymbol('proto.common.Location', null, global);
@ -22,7 +26,6 @@ goog.exportSymbol('proto.common.MetricKind', null, global);
goog.exportSymbol('proto.common.Modulation', null, global);
goog.exportSymbol('proto.common.RegParamsRevision', null, global);
goog.exportSymbol('proto.common.Region', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -38,19 +41,89 @@ proto.common.Location = function(opt_data) {
};
goog.inherits(proto.common.Location, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.Location.displayName = 'proto.common.Location';
}
/**
* 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.common.KeyEnvelope = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.common.KeyEnvelope, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.KeyEnvelope.displayName = 'proto.common.KeyEnvelope';
}
/**
* 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.common.Metric = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.Metric.repeatedFields_, null);
};
goog.inherits(proto.common.Metric, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.Metric.displayName = 'proto.common.Metric';
}
/**
* 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.common.MetricDataset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.MetricDataset.repeatedFields_, null);
};
goog.inherits(proto.common.MetricDataset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.MetricDataset.displayName = 'proto.common.MetricDataset';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.Location.prototype.toObject = function(opt_includeInstance) {
@ -60,19 +133,20 @@ proto.common.Location.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.Location} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Location.toObject = function(includeInstance, msg) {
var f, obj = {
latitude: msg.getLatitude(),
longitude: msg.getLongitude(),
altitude: msg.getAltitude(),
source: msg.getSource(),
accuracy: msg.getAccuracy()
latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
altitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
source: jspb.Message.getFieldWithDefault(msg, 4, 0),
accuracy: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0)
};
if (includeInstance) {
@ -138,64 +212,55 @@ proto.common.Location.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.Location} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.Location.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.Location.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.common.Location.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.Location} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Location.prototype.serializeBinaryToWriter = function (writer) {
proto.common.Location.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getLatitude();
f = message.getLatitude();
if (f !== 0.0) {
writer.writeDouble(
1,
f
);
}
f = this.getLongitude();
f = message.getLongitude();
if (f !== 0.0) {
writer.writeDouble(
2,
f
);
}
f = this.getAltitude();
f = message.getAltitude();
if (f !== 0.0) {
writer.writeDouble(
3,
f
);
}
f = this.getSource();
f = message.getSource();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getAccuracy();
f = message.getAccuracy();
if (f !== 0.0) {
writer.writeFloat(
5,
@ -205,27 +270,21 @@ proto.common.Location.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.Location} The clone.
*/
proto.common.Location.prototype.cloneMessage = function() {
return /** @type {!proto.common.Location} */ (jspb.Message.cloneMessage(this));
};
/**
* optional double latitude = 1;
* @return {number}
*/
proto.common.Location.prototype.getLatitude = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.common.Location} returns this
*/
proto.common.Location.prototype.setLatitude = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3FloatField(this, 1, value);
};
@ -234,13 +293,16 @@ proto.common.Location.prototype.setLatitude = function(value) {
* @return {number}
*/
proto.common.Location.prototype.getLongitude = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.common.Location} returns this
*/
proto.common.Location.prototype.setLongitude = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3FloatField(this, 2, value);
};
@ -249,13 +311,16 @@ proto.common.Location.prototype.setLongitude = function(value) {
* @return {number}
*/
proto.common.Location.prototype.getAltitude = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.common.Location} returns this
*/
proto.common.Location.prototype.setAltitude = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3FloatField(this, 3, value);
};
@ -264,13 +329,16 @@ proto.common.Location.prototype.setAltitude = function(value) {
* @return {!proto.common.LocationSource}
*/
proto.common.Location.prototype.getSource = function() {
return /** @type {!proto.common.LocationSource} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {!proto.common.LocationSource} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {!proto.common.LocationSource} value */
/**
* @param {!proto.common.LocationSource} value
* @return {!proto.common.Location} returns this
*/
proto.common.Location.prototype.setSource = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3EnumField(this, 4, value);
};
@ -279,45 +347,33 @@ proto.common.Location.prototype.setSource = function(value) {
* @return {number}
*/
proto.common.Location.prototype.getAccuracy = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
};
/** @param {number} value */
proto.common.Location.prototype.setAccuracy = function(value) {
jspb.Message.setField(this, 5, 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
* @param {number} value
* @return {!proto.common.Location} returns this
*/
proto.common.KeyEnvelope = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.common.Location.prototype.setAccuracy = function(value) {
return jspb.Message.setProto3FloatField(this, 5, value);
};
goog.inherits(proto.common.KeyEnvelope, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.common.KeyEnvelope.displayName = 'proto.common.KeyEnvelope';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.KeyEnvelope.prototype.toObject = function(opt_includeInstance) {
@ -327,15 +383,16 @@ proto.common.KeyEnvelope.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.KeyEnvelope} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.KeyEnvelope.toObject = function(includeInstance, msg) {
var f, obj = {
kekLabel: msg.getKekLabel(),
kekLabel: jspb.Message.getFieldWithDefault(msg, 1, ""),
aesKey: msg.getAesKey_asB64()
};
@ -390,43 +447,34 @@ proto.common.KeyEnvelope.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.KeyEnvelope} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.KeyEnvelope.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.KeyEnvelope.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.common.KeyEnvelope.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.KeyEnvelope} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.KeyEnvelope.prototype.serializeBinaryToWriter = function (writer) {
proto.common.KeyEnvelope.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getKekLabel();
f = message.getKekLabel();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAesKey_asU8();
f = message.getAesKey_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
@ -436,27 +484,21 @@ proto.common.KeyEnvelope.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.KeyEnvelope} The clone.
*/
proto.common.KeyEnvelope.prototype.cloneMessage = function() {
return /** @type {!proto.common.KeyEnvelope} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string kek_label = 1;
* @return {string}
*/
proto.common.KeyEnvelope.prototype.getKekLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.common.KeyEnvelope} returns this
*/
proto.common.KeyEnvelope.prototype.setKekLabel = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -465,7 +507,7 @@ proto.common.KeyEnvelope.prototype.setKekLabel = function(value) {
* @return {!(string|Uint8Array)}
*/
proto.common.KeyEnvelope.prototype.getAesKey = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
@ -493,30 +535,16 @@ proto.common.KeyEnvelope.prototype.getAesKey_asU8 = function() {
};
/** @param {!(string|Uint8Array)} value */
proto.common.KeyEnvelope.prototype.setAesKey = 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
* @param {!(string|Uint8Array)} value
* @return {!proto.common.KeyEnvelope} returns this
*/
proto.common.Metric = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.Metric.repeatedFields_, null);
proto.common.KeyEnvelope.prototype.setAesKey = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
goog.inherits(proto.common.Metric, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.common.Metric.displayName = 'proto.common.Metric';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -528,13 +556,15 @@ proto.common.Metric.repeatedFields_ = [2,3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.Metric.prototype.toObject = function(opt_includeInstance) {
@ -544,20 +574,21 @@ proto.common.Metric.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.Metric} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Metric.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
timestampsList: jspb.Message.toObjectList(msg.getTimestampsList(),
google_protobuf_timestamp_pb.Timestamp.toObject, includeInstance),
datasetsList: jspb.Message.toObjectList(msg.getDatasetsList(),
proto.common.MetricDataset.toObject, includeInstance),
kind: msg.getKind()
kind: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
@ -601,14 +632,12 @@ proto.common.Metric.deserializeBinaryFromReader = function(msg, reader) {
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.getTimestampsList().push(value);
msg.setTimestampsList(msg.getTimestampsList());
msg.addTimestamps(value);
break;
case 3:
var value = new proto.common.MetricDataset;
reader.readMessage(value,proto.common.MetricDataset.deserializeBinaryFromReader);
msg.getDatasetsList().push(value);
msg.setDatasetsList(msg.getDatasetsList());
msg.addDatasets(value);
break;
case 4:
var value = /** @type {!proto.common.MetricKind} */ (reader.readEnum());
@ -623,43 +652,34 @@ proto.common.Metric.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.Metric} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.Metric.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.Metric.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.common.Metric.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.Metric} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Metric.prototype.serializeBinaryToWriter = function (writer) {
proto.common.Metric.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getTimestampsList();
f = message.getTimestampsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -667,7 +687,7 @@ proto.common.Metric.prototype.serializeBinaryToWriter = function (writer) {
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getDatasetsList();
f = message.getDatasetsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -675,7 +695,7 @@ proto.common.Metric.prototype.serializeBinaryToWriter = function (writer) {
proto.common.MetricDataset.serializeBinaryToWriter
);
}
f = this.getKind();
f = message.getKind();
if (f !== 0.0) {
writer.writeEnum(
4,
@ -685,73 +705,97 @@ proto.common.Metric.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.Metric} The clone.
*/
proto.common.Metric.prototype.cloneMessage = function() {
return /** @type {!proto.common.Metric} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.common.Metric.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated google.protobuf.Timestamp timestamps = 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.protobuf.Timestamp>}
* @return {!Array<!proto.google.protobuf.Timestamp>}
*/
proto.common.Metric.prototype.getTimestampsList = function() {
return /** @type{!Array.<!proto.google.protobuf.Timestamp>} */ (
return /** @type{!Array<!proto.google.protobuf.Timestamp>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/** @param {Array.<!proto.google.protobuf.Timestamp>} value */
/**
* @param {!Array<!proto.google.protobuf.Timestamp>} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setTimestampsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.google.protobuf.Timestamp=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Timestamp}
*/
proto.common.Metric.prototype.addTimestamps = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Timestamp, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.clearTimestampsList = function() {
this.setTimestampsList([]);
return this.setTimestampsList([]);
};
/**
* repeated MetricDataset datasets = 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.common.MetricDataset>}
* @return {!Array<!proto.common.MetricDataset>}
*/
proto.common.Metric.prototype.getDatasetsList = function() {
return /** @type{!Array.<!proto.common.MetricDataset>} */ (
return /** @type{!Array<!proto.common.MetricDataset>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.common.MetricDataset, 3));
};
/** @param {Array.<!proto.common.MetricDataset>} value */
/**
* @param {!Array<!proto.common.MetricDataset>} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setDatasetsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.common.MetricDataset=} opt_value
* @param {number=} opt_index
* @return {!proto.common.MetricDataset}
*/
proto.common.Metric.prototype.addDatasets = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.common.MetricDataset, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.clearDatasetsList = function() {
this.setDatasetsList([]);
return this.setDatasetsList([]);
};
@ -760,34 +804,20 @@ proto.common.Metric.prototype.clearDatasetsList = function() {
* @return {!proto.common.MetricKind}
*/
proto.common.Metric.prototype.getKind = function() {
return /** @type {!proto.common.MetricKind} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {!proto.common.MetricKind} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {!proto.common.MetricKind} value */
proto.common.Metric.prototype.setKind = function(value) {
jspb.Message.setField(this, 4, 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
* @param {!proto.common.MetricKind} value
* @return {!proto.common.Metric} returns this
*/
proto.common.MetricDataset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.MetricDataset.repeatedFields_, null);
proto.common.Metric.prototype.setKind = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
goog.inherits(proto.common.MetricDataset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.common.MetricDataset.displayName = 'proto.common.MetricDataset';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -799,13 +829,15 @@ proto.common.MetricDataset.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.MetricDataset.prototype.toObject = function(opt_includeInstance) {
@ -815,16 +847,17 @@ proto.common.MetricDataset.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.MetricDataset} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.MetricDataset.toObject = function(includeInstance, msg) {
var f, obj = {
label: msg.getLabel(),
dataList: jspb.Message.getRepeatedFloatingPointField(msg, 2)
label: jspb.Message.getFieldWithDefault(msg, 1, ""),
dataList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f
};
if (includeInstance) {
@ -866,7 +899,7 @@ proto.common.MetricDataset.deserializeBinaryFromReader = function(msg, reader) {
msg.setLabel(value);
break;
case 2:
var value = /** @type {!Array.<number>} */ (reader.readPackedFloat());
var value = /** @type {!Array<number>} */ (reader.readPackedFloat());
msg.setDataList(value);
break;
default:
@ -878,43 +911,34 @@ proto.common.MetricDataset.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.MetricDataset} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.MetricDataset.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.MetricDataset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.common.MetricDataset.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.MetricDataset} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.MetricDataset.prototype.serializeBinaryToWriter = function (writer) {
proto.common.MetricDataset.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getLabel();
f = message.getLabel();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDataList();
f = message.getDataList();
if (f.length > 0) {
writer.writePackedFloat(
2,
@ -924,49 +948,58 @@ proto.common.MetricDataset.prototype.serializeBinaryToWriter = function (writer)
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.MetricDataset} The clone.
*/
proto.common.MetricDataset.prototype.cloneMessage = function() {
return /** @type {!proto.common.MetricDataset} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string label = 1;
* @return {string}
*/
proto.common.MetricDataset.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.setLabel = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated float data = 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.<number>}
* @return {!Array<number>}
*/
proto.common.MetricDataset.prototype.getDataList = function() {
return /** @type {!Array.<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
};
/** @param {Array.<number>} value */
/**
* @param {!Array<number>} value
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.setDataList = function(value) {
jspb.Message.setField(this, 2, value || []);
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.addData = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.clearDataList = function() {
jspb.Message.setField(this, 2, []);
return this.setDataList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/annotations.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,13 +13,15 @@ var goog = jspb;
var global = Function('return this')();
var google_api_http_pb = require('../../google/api/http_pb.js');
goog.object.extend(proto, google_api_http_pb);
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.exportSymbol('google.api.http', null, global);
goog.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.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>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.HttpRule>}
*/
proto.google.api.http = new jspb.ExtensionFieldInfo(
72295728,

View File

@ -78,6 +78,11 @@ export class JwtLocation extends jspb.Message {
getQuery(): string;
setQuery(value: string): void;
hasCookie(): boolean;
clearCookie(): void;
getCookie(): string;
setCookie(value: string): void;
getValuePrefix(): string;
setValuePrefix(value: string): void;
@ -96,6 +101,7 @@ export namespace JwtLocation {
export type AsObject = {
header: string,
query: string,
cookie: string,
valuePrefix: string,
}
@ -103,6 +109,7 @@ export namespace JwtLocation {
IN_NOT_SET = 0,
HEADER = 1,
QUERY = 2,
COOKIE = 4,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: google/api/backend.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,8 +14,8 @@ 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.AuthenticationCase', 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
@ -28,8 +31,34 @@ proto.google.api.Backend = function(opt_data) {
};
goog.inherits(proto.google.api.Backend, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Backend.displayName = 'proto.google.api.Backend';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.BackendRule.displayName = 'proto.google.api.BackendRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +70,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,11 +88,12 @@ proto.google.api.Backend.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Backend.toObject = function(includeInstance, msg) {
var f, obj = {
@ -106,8 +138,7 @@ proto.google.api.Backend.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addRules(value);
break;
default:
reader.skipField();
@ -118,36 +149,27 @@ proto.google.api.Backend.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Backend.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Backend.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Backend.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -158,56 +180,45 @@ proto.google.api.Backend.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
* @return {!Array<!proto.google.api.BackendRule>}
*/
proto.google.api.Backend.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.BackendRule>} */ (
return /** @type{!Array<!proto.google.api.BackendRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.BackendRule, 1));
};
/** @param {Array.<!proto.google.api.BackendRule>} value */
/**
* @param {!Array<!proto.google.api.BackendRule>} value
* @return {!proto.google.api.Backend} returns this
*/
proto.google.api.Backend.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return 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
* @param {!proto.google.api.BackendRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.BackendRule}
*/
proto.google.api.BackendRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.BackendRule.oneofGroups_);
proto.google.api.Backend.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.BackendRule, opt_index);
};
goog.inherits(proto.google.api.BackendRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.BackendRule.displayName = 'proto.google.api.BackendRule';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Backend} returns this
*/
proto.google.api.Backend.prototype.clearRulesList = function() {
return this.setRulesList([]);
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
@ -238,13 +249,15 @@ proto.google.api.BackendRule.prototype.getAuthenticationCase = function() {
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -254,23 +267,24 @@ proto.google.api.BackendRule.prototype.toObject = function(opt_includeInstance)
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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()
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
address: jspb.Message.getFieldWithDefault(msg, 2, ""),
deadline: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
minDeadline: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
operationDeadline: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
pathTranslation: jspb.Message.getFieldWithDefault(msg, 6, 0),
jwtAudience: jspb.Message.getFieldWithDefault(msg, 7, ""),
disableAuth: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
protocol: jspb.Message.getFieldWithDefault(msg, 9, "")
};
if (includeInstance) {
@ -352,92 +366,83 @@ proto.google.api.BackendRule.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.BackendRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.BackendRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.BackendRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAddress();
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDeadline();
f = message.getDeadline();
if (f !== 0.0) {
writer.writeDouble(
3,
f
);
}
f = this.getMinDeadline();
f = message.getMinDeadline();
if (f !== 0.0) {
writer.writeDouble(
4,
f
);
}
f = this.getOperationDeadline();
f = message.getOperationDeadline();
if (f !== 0.0) {
writer.writeDouble(
5,
f
);
}
f = this.getPathTranslation();
f = message.getPathTranslation();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = jspb.Message.getField(this, 7);
f = /** @type {string} */ (jspb.Message.getField(message, 7));
if (f != null) {
writer.writeString(
7,
f
);
}
f = jspb.Message.getField(this, 8);
f = /** @type {boolean} */ (jspb.Message.getField(message, 8));
if (f != null) {
writer.writeBool(
8,
f
);
}
f = this.getProtocol();
f = message.getProtocol();
if (f.length > 0) {
writer.writeString(
9,
@ -447,180 +452,6 @@ proto.google.api.BackendRule.prototype.serializeBinaryToWriter = function (write
};
/**
* 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}
*/
@ -630,4 +461,202 @@ proto.google.api.BackendRule.PathTranslation = {
APPEND_PATH_TO_ADDRESS: 2
};
/**
* optional string selector = 1;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getSelector = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setSelector = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string address = 2;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional double deadline = 3;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getDeadline = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setDeadline = function(value) {
return jspb.Message.setProto3FloatField(this, 3, value);
};
/**
* optional double min_deadline = 4;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getMinDeadline = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setMinDeadline = function(value) {
return jspb.Message.setProto3FloatField(this, 4, value);
};
/**
* optional double operation_deadline = 5;
* @return {number}
*/
proto.google.api.BackendRule.prototype.getOperationDeadline = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setOperationDeadline = function(value) {
return jspb.Message.setProto3FloatField(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.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.google.api.BackendRule.PathTranslation} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setPathTranslation = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};
/**
* optional string jwt_audience = 7;
* @return {string}
*/
proto.google.api.BackendRule.prototype.getJwtAudience = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setJwtAudience = function(value) {
return jspb.Message.setOneofField(this, 7, proto.google.api.BackendRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.clearJwtAudience = function() {
return 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;
* @return {boolean}
*/
proto.google.api.BackendRule.prototype.getDisableAuth = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};
/**
* @param {boolean} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setDisableAuth = function(value) {
return jspb.Message.setOneofField(this, 8, proto.google.api.BackendRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.clearDisableAuth = function() {
return 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.getFieldWithDefault(this, 9, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.BackendRule} returns this
*/
proto.google.api.BackendRule.prototype.setProtocol = function(value) {
return jspb.Message.setProto3StringField(this, 9, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -1,6 +1,9 @@
// source: google/api/billing.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ var global = Function('return this')();
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
@ -27,8 +29,34 @@ proto.google.api.Billing = function(opt_data) {
};
goog.inherits(proto.google.api.Billing, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Billing.displayName = 'proto.google.api.Billing';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Billing.BillingDestination.displayName = 'proto.google.api.Billing.BillingDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +68,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,11 +86,12 @@ proto.google.api.Billing.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Billing.toObject = function(includeInstance, msg) {
var f, obj = {
@ -105,8 +136,7 @@ proto.google.api.Billing.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addConsumerDestinations(value);
break;
default:
reader.skipField();
@ -117,36 +147,27 @@ proto.google.api.Billing.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Billing.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Billing.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Billing.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getConsumerDestinationsList();
f = message.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
@ -157,56 +178,7 @@ proto.google.api.Billing.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
@ -218,13 +190,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -234,16 +208,17 @@ proto.google.api.Billing.BillingDestination.prototype.toObject = function(opt_in
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Billing.BillingDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
metricsList: jspb.Message.getField(msg, 2)
monitoredResource: jspb.Message.getFieldWithDefault(msg, 1, ""),
metricsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
};
if (includeInstance) {
@ -286,8 +261,7 @@ proto.google.api.Billing.BillingDestination.deserializeBinaryFromReader = functi
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getMetricsList().push(value);
msg.setMetricsList(msg.getMetricsList());
msg.addMetrics(value);
break;
default:
reader.skipField();
@ -298,43 +272,34 @@ proto.google.api.Billing.BillingDestination.deserializeBinaryFromReader = functi
};
/**
* 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);
proto.google.api.Billing.BillingDestination.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Billing.BillingDestination.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Billing.BillingDestination.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getMonitoredResource();
f = message.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricsList();
f = message.getMetricsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
@ -344,49 +309,96 @@ proto.google.api.Billing.BillingDestination.prototype.serializeBinaryToWriter =
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Billing.BillingDestination} returns this
*/
proto.google.api.Billing.BillingDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<string>}
*/
proto.google.api.Billing.BillingDestination.prototype.getMetricsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.Billing.BillingDestination} returns this
*/
proto.google.api.Billing.BillingDestination.prototype.setMetricsList = function(value) {
jspb.Message.setField(this, 2, value || []);
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.Billing.BillingDestination} returns this
*/
proto.google.api.Billing.BillingDestination.prototype.addMetrics = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Billing.BillingDestination} returns this
*/
proto.google.api.Billing.BillingDestination.prototype.clearMetricsList = function() {
jspb.Message.setField(this, 2, []);
return this.setMetricsList([]);
};
/**
* repeated BillingDestination consumer_destinations = 8;
* @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
* @return {!proto.google.api.Billing} returns this
*/
proto.google.api.Billing.prototype.setConsumerDestinationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 8, value);
};
/**
* @param {!proto.google.api.Billing.BillingDestination=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Billing.BillingDestination}
*/
proto.google.api.Billing.prototype.addConsumerDestinations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.api.Billing.BillingDestination, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Billing} returns this
*/
proto.google.api.Billing.prototype.clearConsumerDestinationsList = function() {
return this.setConsumerDestinationsList([]);
};

View File

@ -2,7 +2,416 @@
// file: google/api/client.proto
import * as jspb from "google-protobuf";
import * as google_api_launch_stage_pb from "../../google/api/launch_stage_pb";
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
export class CommonLanguageSettings extends jspb.Message {
getReferenceDocsUri(): string;
setReferenceDocsUri(value: string): void;
clearDestinationsList(): void;
getDestinationsList(): Array<ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap]>;
setDestinationsList(value: Array<ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap]>): void;
addDestinations(value: ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap], index?: number): ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap];
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CommonLanguageSettings.AsObject;
static toObject(includeInstance: boolean, msg: CommonLanguageSettings): CommonLanguageSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CommonLanguageSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CommonLanguageSettings;
static deserializeBinaryFromReader(message: CommonLanguageSettings, reader: jspb.BinaryReader): CommonLanguageSettings;
}
export namespace CommonLanguageSettings {
export type AsObject = {
referenceDocsUri: string,
destinationsList: Array<ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap]>,
}
}
export class ClientLibrarySettings extends jspb.Message {
getVersion(): string;
setVersion(value: string): 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;
getRestNumericEnums(): boolean;
setRestNumericEnums(value: boolean): void;
hasJavaSettings(): boolean;
clearJavaSettings(): void;
getJavaSettings(): JavaSettings | undefined;
setJavaSettings(value?: JavaSettings): void;
hasCppSettings(): boolean;
clearCppSettings(): void;
getCppSettings(): CppSettings | undefined;
setCppSettings(value?: CppSettings): void;
hasPhpSettings(): boolean;
clearPhpSettings(): void;
getPhpSettings(): PhpSettings | undefined;
setPhpSettings(value?: PhpSettings): void;
hasPythonSettings(): boolean;
clearPythonSettings(): void;
getPythonSettings(): PythonSettings | undefined;
setPythonSettings(value?: PythonSettings): void;
hasNodeSettings(): boolean;
clearNodeSettings(): void;
getNodeSettings(): NodeSettings | undefined;
setNodeSettings(value?: NodeSettings): void;
hasDotnetSettings(): boolean;
clearDotnetSettings(): void;
getDotnetSettings(): DotnetSettings | undefined;
setDotnetSettings(value?: DotnetSettings): void;
hasRubySettings(): boolean;
clearRubySettings(): void;
getRubySettings(): RubySettings | undefined;
setRubySettings(value?: RubySettings): void;
hasGoSettings(): boolean;
clearGoSettings(): void;
getGoSettings(): GoSettings | undefined;
setGoSettings(value?: GoSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ClientLibrarySettings.AsObject;
static toObject(includeInstance: boolean, msg: ClientLibrarySettings): ClientLibrarySettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ClientLibrarySettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ClientLibrarySettings;
static deserializeBinaryFromReader(message: ClientLibrarySettings, reader: jspb.BinaryReader): ClientLibrarySettings;
}
export namespace ClientLibrarySettings {
export type AsObject = {
version: string,
launchStage: google_api_launch_stage_pb.LaunchStageMap[keyof google_api_launch_stage_pb.LaunchStageMap],
restNumericEnums: boolean,
javaSettings?: JavaSettings.AsObject,
cppSettings?: CppSettings.AsObject,
phpSettings?: PhpSettings.AsObject,
pythonSettings?: PythonSettings.AsObject,
nodeSettings?: NodeSettings.AsObject,
dotnetSettings?: DotnetSettings.AsObject,
rubySettings?: RubySettings.AsObject,
goSettings?: GoSettings.AsObject,
}
}
export class Publishing extends jspb.Message {
clearMethodSettingsList(): void;
getMethodSettingsList(): Array<MethodSettings>;
setMethodSettingsList(value: Array<MethodSettings>): void;
addMethodSettings(value?: MethodSettings, index?: number): MethodSettings;
getNewIssueUri(): string;
setNewIssueUri(value: string): void;
getDocumentationUri(): string;
setDocumentationUri(value: string): void;
getApiShortName(): string;
setApiShortName(value: string): void;
getGithubLabel(): string;
setGithubLabel(value: string): void;
clearCodeownerGithubTeamsList(): void;
getCodeownerGithubTeamsList(): Array<string>;
setCodeownerGithubTeamsList(value: Array<string>): void;
addCodeownerGithubTeams(value: string, index?: number): string;
getDocTagPrefix(): string;
setDocTagPrefix(value: string): void;
getOrganization(): ClientLibraryOrganizationMap[keyof ClientLibraryOrganizationMap];
setOrganization(value: ClientLibraryOrganizationMap[keyof ClientLibraryOrganizationMap]): void;
clearLibrarySettingsList(): void;
getLibrarySettingsList(): Array<ClientLibrarySettings>;
setLibrarySettingsList(value: Array<ClientLibrarySettings>): void;
addLibrarySettings(value?: ClientLibrarySettings, index?: number): ClientLibrarySettings;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Publishing.AsObject;
static toObject(includeInstance: boolean, msg: Publishing): Publishing.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Publishing, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Publishing;
static deserializeBinaryFromReader(message: Publishing, reader: jspb.BinaryReader): Publishing;
}
export namespace Publishing {
export type AsObject = {
methodSettingsList: Array<MethodSettings.AsObject>,
newIssueUri: string,
documentationUri: string,
apiShortName: string,
githubLabel: string,
codeownerGithubTeamsList: Array<string>,
docTagPrefix: string,
organization: ClientLibraryOrganizationMap[keyof ClientLibraryOrganizationMap],
librarySettingsList: Array<ClientLibrarySettings.AsObject>,
}
}
export class JavaSettings extends jspb.Message {
getLibraryPackage(): string;
setLibraryPackage(value: string): void;
getServiceClassNamesMap(): jspb.Map<string, string>;
clearServiceClassNamesMap(): void;
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): JavaSettings.AsObject;
static toObject(includeInstance: boolean, msg: JavaSettings): JavaSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: JavaSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): JavaSettings;
static deserializeBinaryFromReader(message: JavaSettings, reader: jspb.BinaryReader): JavaSettings;
}
export namespace JavaSettings {
export type AsObject = {
libraryPackage: string,
serviceClassNamesMap: Array<[string, string]>,
common?: CommonLanguageSettings.AsObject,
}
}
export class CppSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CppSettings.AsObject;
static toObject(includeInstance: boolean, msg: CppSettings): CppSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CppSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CppSettings;
static deserializeBinaryFromReader(message: CppSettings, reader: jspb.BinaryReader): CppSettings;
}
export namespace CppSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class PhpSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PhpSettings.AsObject;
static toObject(includeInstance: boolean, msg: PhpSettings): PhpSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PhpSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PhpSettings;
static deserializeBinaryFromReader(message: PhpSettings, reader: jspb.BinaryReader): PhpSettings;
}
export namespace PhpSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class PythonSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PythonSettings.AsObject;
static toObject(includeInstance: boolean, msg: PythonSettings): PythonSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PythonSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PythonSettings;
static deserializeBinaryFromReader(message: PythonSettings, reader: jspb.BinaryReader): PythonSettings;
}
export namespace PythonSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class NodeSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): NodeSettings.AsObject;
static toObject(includeInstance: boolean, msg: NodeSettings): NodeSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: NodeSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): NodeSettings;
static deserializeBinaryFromReader(message: NodeSettings, reader: jspb.BinaryReader): NodeSettings;
}
export namespace NodeSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class DotnetSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DotnetSettings.AsObject;
static toObject(includeInstance: boolean, msg: DotnetSettings): DotnetSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DotnetSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DotnetSettings;
static deserializeBinaryFromReader(message: DotnetSettings, reader: jspb.BinaryReader): DotnetSettings;
}
export namespace DotnetSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class RubySettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RubySettings.AsObject;
static toObject(includeInstance: boolean, msg: RubySettings): RubySettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RubySettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RubySettings;
static deserializeBinaryFromReader(message: RubySettings, reader: jspb.BinaryReader): RubySettings;
}
export namespace RubySettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class GoSettings extends jspb.Message {
hasCommon(): boolean;
clearCommon(): void;
getCommon(): CommonLanguageSettings | undefined;
setCommon(value?: CommonLanguageSettings): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GoSettings.AsObject;
static toObject(includeInstance: boolean, msg: GoSettings): GoSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GoSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GoSettings;
static deserializeBinaryFromReader(message: GoSettings, reader: jspb.BinaryReader): GoSettings;
}
export namespace GoSettings {
export type AsObject = {
common?: CommonLanguageSettings.AsObject,
}
}
export class MethodSettings extends jspb.Message {
getSelector(): string;
setSelector(value: string): void;
hasLongRunning(): boolean;
clearLongRunning(): void;
getLongRunning(): MethodSettings.LongRunning | undefined;
setLongRunning(value?: MethodSettings.LongRunning): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MethodSettings.AsObject;
static toObject(includeInstance: boolean, msg: MethodSettings): MethodSettings.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MethodSettings, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MethodSettings;
static deserializeBinaryFromReader(message: MethodSettings, reader: jspb.BinaryReader): MethodSettings;
}
export namespace MethodSettings {
export type AsObject = {
selector: string,
longRunning?: MethodSettings.LongRunning.AsObject,
}
export class LongRunning extends jspb.Message {
hasInitialPollDelay(): boolean;
clearInitialPollDelay(): void;
getInitialPollDelay(): google_protobuf_duration_pb.Duration | undefined;
setInitialPollDelay(value?: google_protobuf_duration_pb.Duration): void;
getPollDelayMultiplier(): number;
setPollDelayMultiplier(value: number): void;
hasMaxPollDelay(): boolean;
clearMaxPollDelay(): void;
getMaxPollDelay(): google_protobuf_duration_pb.Duration | undefined;
setMaxPollDelay(value?: google_protobuf_duration_pb.Duration): void;
hasTotalPollTimeout(): boolean;
clearTotalPollTimeout(): void;
getTotalPollTimeout(): google_protobuf_duration_pb.Duration | undefined;
setTotalPollTimeout(value?: google_protobuf_duration_pb.Duration): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LongRunning.AsObject;
static toObject(includeInstance: boolean, msg: LongRunning): LongRunning.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LongRunning, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LongRunning;
static deserializeBinaryFromReader(message: LongRunning, reader: jspb.BinaryReader): LongRunning;
}
export namespace LongRunning {
export type AsObject = {
initialPollDelay?: google_protobuf_duration_pb.Duration.AsObject,
pollDelayMultiplier: number,
maxPollDelay?: google_protobuf_duration_pb.Duration.AsObject,
totalPollTimeout?: google_protobuf_duration_pb.Duration.AsObject,
}
}
}
export const methodSignature: jspb.ExtensionFieldInfo<string>;
@ -10,3 +419,21 @@ import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/
export const oauthScopes: jspb.ExtensionFieldInfo<string>;
export interface ClientLibraryOrganizationMap {
CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED: 0;
CLOUD: 1;
ADS: 2;
PHOTOS: 3;
STREET_VIEW: 4;
}
export const ClientLibraryOrganization: ClientLibraryOrganizationMap;
export interface ClientLibraryDestinationMap {
CLIENT_LIBRARY_DESTINATION_UNSPECIFIED: 0;
GITHUB: 10;
PACKAGE_MANAGER: 20;
}
export const ClientLibraryDestination: ClientLibraryDestinationMap;

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: google/api/config_change.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,6 @@ 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
@ -28,8 +30,34 @@ proto.google.api.ConfigChange = function(opt_data) {
};
goog.inherits(proto.google.api.ConfigChange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.ConfigChange.displayName = 'proto.google.api.ConfigChange';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Advice.displayName = 'proto.google.api.Advice';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +69,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,18 +87,19 @@ proto.google.api.ConfigChange.prototype.toObject = function(opt_includeInstance)
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ConfigChange.toObject = function(includeInstance, msg) {
var f, obj = {
element: msg.getElement(),
oldValue: msg.getOldValue(),
newValue: msg.getNewValue(),
changeType: msg.getChangeType(),
element: jspb.Message.getFieldWithDefault(msg, 1, ""),
oldValue: jspb.Message.getFieldWithDefault(msg, 2, ""),
newValue: jspb.Message.getFieldWithDefault(msg, 3, ""),
changeType: jspb.Message.getFieldWithDefault(msg, 4, 0),
advicesList: jspb.Message.toObjectList(msg.getAdvicesList(),
proto.google.api.Advice.toObject, includeInstance)
};
@ -126,8 +157,7 @@ proto.google.api.ConfigChange.deserializeBinaryFromReader = function(msg, reader
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());
msg.addAdvices(value);
break;
default:
reader.skipField();
@ -138,64 +168,55 @@ proto.google.api.ConfigChange.deserializeBinaryFromReader = function(msg, reader
};
/**
* 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);
proto.google.api.ConfigChange.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ConfigChange.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.ConfigChange.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getElement();
f = message.getElement();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getOldValue();
f = message.getOldValue();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getNewValue();
f = message.getNewValue();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getChangeType();
f = message.getChangeType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getAdvicesList();
f = message.getAdvicesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
@ -206,27 +227,21 @@ proto.google.api.ConfigChange.prototype.serializeBinaryToWriter = function (writ
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.setElement = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -235,13 +250,16 @@ proto.google.api.ConfigChange.prototype.setElement = function(value) {
* @return {string}
*/
proto.google.api.ConfigChange.prototype.getOldValue = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.setOldValue = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -250,13 +268,16 @@ proto.google.api.ConfigChange.prototype.setOldValue = function(value) {
* @return {string}
*/
proto.google.api.ConfigChange.prototype.getNewValue = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.setNewValue = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3StringField(this, 3, value);
};
@ -265,68 +286,71 @@ proto.google.api.ConfigChange.prototype.setNewValue = function(value) {
* @return {!proto.google.api.ChangeType}
*/
proto.google.api.ConfigChange.prototype.getChangeType = function() {
return /** @type {!proto.google.api.ChangeType} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {!proto.google.api.ChangeType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {!proto.google.api.ChangeType} value */
/**
* @param {!proto.google.api.ChangeType} value
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.setChangeType = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3EnumField(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>}
* @return {!Array<!proto.google.api.Advice>}
*/
proto.google.api.ConfigChange.prototype.getAdvicesList = function() {
return /** @type{!Array.<!proto.google.api.Advice>} */ (
return /** @type{!Array<!proto.google.api.Advice>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Advice, 5));
};
/** @param {Array.<!proto.google.api.Advice>} value */
/**
* @param {!Array<!proto.google.api.Advice>} value
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.setAdvicesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 5, value);
return 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
* @param {!proto.google.api.Advice=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Advice}
*/
proto.google.api.Advice = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.ConfigChange.prototype.addAdvices = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.api.Advice, opt_index);
};
goog.inherits(proto.google.api.Advice, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Advice.displayName = 'proto.google.api.Advice';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ConfigChange} returns this
*/
proto.google.api.ConfigChange.prototype.clearAdvicesList = function() {
return this.setAdvicesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -336,15 +360,16 @@ proto.google.api.Advice.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Advice.toObject = function(includeInstance, msg) {
var f, obj = {
description: msg.getDescription()
description: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -394,36 +419,27 @@ proto.google.api.Advice.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Advice.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Advice.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Advice.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
@ -433,27 +449,21 @@ proto.google.api.Advice.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Advice} returns this
*/
proto.google.api.Advice.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/consumer.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,6 @@ 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
@ -28,8 +30,34 @@ proto.google.api.ProjectProperties = function(opt_data) {
};
goog.inherits(proto.google.api.ProjectProperties, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.ProjectProperties.displayName = 'proto.google.api.ProjectProperties';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Property.displayName = 'proto.google.api.Property';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +69,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,11 +87,12 @@ proto.google.api.ProjectProperties.prototype.toObject = function(opt_includeInst
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ProjectProperties.toObject = function(includeInstance, msg) {
var f, obj = {
@ -106,8 +137,7 @@ proto.google.api.ProjectProperties.deserializeBinaryFromReader = function(msg, r
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());
msg.addProperties(value);
break;
default:
reader.skipField();
@ -118,36 +148,27 @@ proto.google.api.ProjectProperties.deserializeBinaryFromReader = function(msg, r
};
/**
* 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);
proto.google.api.ProjectProperties.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ProjectProperties.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.ProjectProperties.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getPropertiesList();
f = message.getPropertiesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -158,67 +179,58 @@ proto.google.api.ProjectProperties.prototype.serializeBinaryToWriter = function
};
/**
* 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>}
* @return {!Array<!proto.google.api.Property>}
*/
proto.google.api.ProjectProperties.prototype.getPropertiesList = function() {
return /** @type{!Array.<!proto.google.api.Property>} */ (
return /** @type{!Array<!proto.google.api.Property>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Property, 1));
};
/** @param {Array.<!proto.google.api.Property>} value */
/**
* @param {!Array<!proto.google.api.Property>} value
* @return {!proto.google.api.ProjectProperties} returns this
*/
proto.google.api.ProjectProperties.prototype.setPropertiesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return 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
* @param {!proto.google.api.Property=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Property}
*/
proto.google.api.Property = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.ProjectProperties.prototype.addProperties = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.Property, opt_index);
};
goog.inherits(proto.google.api.Property, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.Property.displayName = 'proto.google.api.Property';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ProjectProperties} returns this
*/
proto.google.api.ProjectProperties.prototype.clearPropertiesList = function() {
return this.setPropertiesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -228,17 +240,18 @@ proto.google.api.Property.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Property.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
type: msg.getType(),
description: msg.getDescription()
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, 0),
description: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@ -296,50 +309,41 @@ proto.google.api.Property.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Property.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Property.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Property.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getType();
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
@ -349,60 +353,6 @@ proto.google.api.Property.prototype.serializeBinaryToWriter = function (writer)
};
/**
* 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}
*/
@ -414,4 +364,58 @@ proto.google.api.Property.PropertyType = {
DOUBLE: 4
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.api.Property.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.Property} returns this
*/
proto.google.api.Property.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(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.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.google.api.Property.PropertyType} value
* @return {!proto.google.api.Property} returns this
*/
proto.google.api.Property.prototype.setType = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.Property.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.Property} returns this
*/
proto.google.api.Property.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -1,6 +1,9 @@
// source: google/api/context.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ 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
@ -27,8 +29,34 @@ proto.google.api.Context = function(opt_data) {
};
goog.inherits(proto.google.api.Context, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Context.displayName = 'proto.google.api.Context';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.ContextRule.displayName = 'proto.google.api.ContextRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +68,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,11 +86,12 @@ proto.google.api.Context.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Context.toObject = function(includeInstance, msg) {
var f, obj = {
@ -105,8 +136,7 @@ proto.google.api.Context.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addRules(value);
break;
default:
reader.skipField();
@ -117,36 +147,27 @@ proto.google.api.Context.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Context.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Context.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Context.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -157,56 +178,45 @@ proto.google.api.Context.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
* @return {!Array<!proto.google.api.ContextRule>}
*/
proto.google.api.Context.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.ContextRule>} */ (
return /** @type{!Array<!proto.google.api.ContextRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.ContextRule, 1));
};
/** @param {Array.<!proto.google.api.ContextRule>} value */
/**
* @param {!Array<!proto.google.api.ContextRule>} value
* @return {!proto.google.api.Context} returns this
*/
proto.google.api.Context.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return 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
* @param {!proto.google.api.ContextRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.ContextRule}
*/
proto.google.api.ContextRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ContextRule.repeatedFields_, null);
proto.google.api.Context.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.ContextRule, opt_index);
};
goog.inherits(proto.google.api.ContextRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ContextRule.displayName = 'proto.google.api.ContextRule';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Context} returns this
*/
proto.google.api.Context.prototype.clearRulesList = function() {
return this.setRulesList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -218,13 +228,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -234,19 +246,20 @@ proto.google.api.ContextRule.prototype.toObject = function(opt_includeInstance)
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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)
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
requestedList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
providedList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
allowedRequestExtensionsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
allowedResponseExtensionsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
};
if (includeInstance) {
@ -289,23 +302,19 @@ proto.google.api.ContextRule.deserializeBinaryFromReader = function(msg, reader)
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getRequestedList().push(value);
msg.setRequestedList(msg.getRequestedList());
msg.addRequested(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.getProvidedList().push(value);
msg.setProvidedList(msg.getProvidedList());
msg.addProvided(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.getAllowedRequestExtensionsList().push(value);
msg.setAllowedRequestExtensionsList(msg.getAllowedRequestExtensionsList());
msg.addAllowedRequestExtensions(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.getAllowedResponseExtensionsList().push(value);
msg.setAllowedResponseExtensionsList(msg.getAllowedResponseExtensionsList());
msg.addAllowedResponseExtensions(value);
break;
default:
reader.skipField();
@ -316,64 +325,55 @@ proto.google.api.ContextRule.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.ContextRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ContextRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.ContextRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getRequestedList();
f = message.getRequestedList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getProvidedList();
f = message.getProvidedList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
f = this.getAllowedRequestExtensionsList();
f = message.getAllowedRequestExtensionsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
f = this.getAllowedResponseExtensionsList();
f = message.getAllowedResponseExtensionsList();
if (f.length > 0) {
writer.writeRepeatedString(
5,
@ -383,115 +383,169 @@ proto.google.api.ContextRule.prototype.serializeBinaryToWriter = function (write
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<string>}
*/
proto.google.api.ContextRule.prototype.getRequestedList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.setRequestedList = function(value) {
jspb.Message.setField(this, 2, value || []);
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.addRequested = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.clearRequestedList = function() {
jspb.Message.setField(this, 2, []);
return this.setRequestedList([]);
};
/**
* 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>}
* @return {!Array<string>}
*/
proto.google.api.ContextRule.prototype.getProvidedList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 3));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.setProvidedList = function(value) {
jspb.Message.setField(this, 3, value || []);
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.addProvided = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.clearProvidedList = function() {
jspb.Message.setField(this, 3, []);
return this.setProvidedList([]);
};
/**
* 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>}
* @return {!Array<string>}
*/
proto.google.api.ContextRule.prototype.getAllowedRequestExtensionsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 4));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.setAllowedRequestExtensionsList = function(value) {
jspb.Message.setField(this, 4, value || []);
return jspb.Message.setField(this, 4, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.addAllowedRequestExtensions = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.clearAllowedRequestExtensionsList = function() {
jspb.Message.setField(this, 4, []);
return this.setAllowedRequestExtensionsList([]);
};
/**
* 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>}
* @return {!Array<string>}
*/
proto.google.api.ContextRule.prototype.getAllowedResponseExtensionsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 5));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.setAllowedResponseExtensionsList = function(value) {
jspb.Message.setField(this, 5, value || []);
return jspb.Message.setField(this, 5, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.addAllowedResponseExtensions = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ContextRule} returns this
*/
proto.google.api.ContextRule.prototype.clearAllowedResponseExtensionsList = function() {
jspb.Message.setField(this, 5, []);
return this.setAllowedResponseExtensionsList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/control.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,7 +13,6 @@ 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
@ -26,19 +28,26 @@ proto.google.api.Control = function(opt_data) {
};
goog.inherits(proto.google.api.Control, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -48,15 +57,16 @@ proto.google.api.Control.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Control.toObject = function(includeInstance, msg) {
var f, obj = {
environment: msg.getEnvironment()
environment: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
@ -106,36 +116,27 @@ proto.google.api.Control.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Control.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Control.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Control.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getEnvironment();
f = message.getEnvironment();
if (f.length > 0) {
writer.writeString(
1,
@ -145,27 +146,21 @@ proto.google.api.Control.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Control} returns this
*/
proto.google.api.Control.prototype.setEnvironment = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: google/api/documentation.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,6 @@ 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
@ -28,8 +30,55 @@ proto.google.api.Documentation = function(opt_data) {
};
goog.inherits(proto.google.api.Documentation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Documentation.displayName = 'proto.google.api.Documentation';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.DocumentationRule.displayName = 'proto.google.api.DocumentationRule';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Page.displayName = 'proto.google.api.Page';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +90,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,22 +108,23 @@ proto.google.api.Documentation.prototype.toObject = function(opt_includeInstance
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Documentation.toObject = function(includeInstance, msg) {
var f, obj = {
summary: msg.getSummary(),
summary: jspb.Message.getFieldWithDefault(msg, 1, ""),
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()
documentationRootUrl: jspb.Message.getFieldWithDefault(msg, 4, ""),
serviceRootUrl: jspb.Message.getFieldWithDefault(msg, 6, ""),
overview: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -116,14 +168,12 @@ proto.google.api.Documentation.deserializeBinaryFromReader = function(msg, reade
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());
msg.addPages(value);
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());
msg.addRules(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
@ -146,43 +196,34 @@ proto.google.api.Documentation.deserializeBinaryFromReader = function(msg, reade
};
/**
* 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);
proto.google.api.Documentation.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Documentation.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Documentation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSummary();
f = message.getSummary();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPagesList();
f = message.getPagesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
@ -190,7 +231,7 @@ proto.google.api.Documentation.prototype.serializeBinaryToWriter = function (wri
proto.google.api.Page.serializeBinaryToWriter
);
}
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -198,21 +239,21 @@ proto.google.api.Documentation.prototype.serializeBinaryToWriter = function (wri
proto.google.api.DocumentationRule.serializeBinaryToWriter
);
}
f = this.getDocumentationRootUrl();
f = message.getDocumentationRootUrl();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = this.getServiceRootUrl();
f = message.getServiceRootUrl();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getOverview();
f = message.getOverview();
if (f.length > 0) {
writer.writeString(
2,
@ -222,73 +263,97 @@ proto.google.api.Documentation.prototype.serializeBinaryToWriter = function (wri
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.setSummary = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.Page>}
*/
proto.google.api.Documentation.prototype.getPagesList = function() {
return /** @type{!Array.<!proto.google.api.Page>} */ (
return /** @type{!Array<!proto.google.api.Page>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Page, 5));
};
/** @param {Array.<!proto.google.api.Page>} value */
/**
* @param {!Array<!proto.google.api.Page>} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.setPagesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 5, value);
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.google.api.Page=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Page}
*/
proto.google.api.Documentation.prototype.addPages = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.api.Page, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.clearPagesList = function() {
this.setPagesList([]);
return 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>}
* @return {!Array<!proto.google.api.DocumentationRule>}
*/
proto.google.api.Documentation.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.DocumentationRule>} */ (
return /** @type{!Array<!proto.google.api.DocumentationRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.DocumentationRule, 3));
};
/** @param {Array.<!proto.google.api.DocumentationRule>} value */
/**
* @param {!Array<!proto.google.api.DocumentationRule>} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.api.DocumentationRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.DocumentationRule}
*/
proto.google.api.Documentation.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.DocumentationRule, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.clearRulesList = function() {
this.setRulesList([]);
return this.setRulesList([]);
};
@ -297,13 +362,16 @@ proto.google.api.Documentation.prototype.clearRulesList = function() {
* @return {string}
*/
proto.google.api.Documentation.prototype.getDocumentationRootUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.setDocumentationRootUrl = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3StringField(this, 4, value);
};
@ -312,13 +380,16 @@ proto.google.api.Documentation.prototype.setDocumentationRootUrl = function(valu
* @return {string}
*/
proto.google.api.Documentation.prototype.getServiceRootUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.Documentation.prototype.setServiceRootUrl = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3StringField(this, 6, value);
};
@ -327,45 +398,33 @@ proto.google.api.Documentation.prototype.setServiceRootUrl = function(value) {
* @return {string}
*/
proto.google.api.Documentation.prototype.getOverview = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(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
* @param {string} value
* @return {!proto.google.api.Documentation} returns this
*/
proto.google.api.DocumentationRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.Documentation.prototype.setOverview = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -375,17 +434,18 @@ proto.google.api.DocumentationRule.prototype.toObject = function(opt_includeInst
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.DocumentationRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
description: msg.getDescription(),
deprecationDescription: msg.getDeprecationDescription()
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
deprecationDescription: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@ -443,50 +503,41 @@ proto.google.api.DocumentationRule.deserializeBinaryFromReader = function(msg, r
};
/**
* 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);
proto.google.api.DocumentationRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.DocumentationRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.DocumentationRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDeprecationDescription();
f = message.getDeprecationDescription();
if (f.length > 0) {
writer.writeString(
3,
@ -496,27 +547,21 @@ proto.google.api.DocumentationRule.prototype.serializeBinaryToWriter = function
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.DocumentationRule} returns this
*/
proto.google.api.DocumentationRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -525,13 +570,16 @@ proto.google.api.DocumentationRule.prototype.setSelector = function(value) {
* @return {string}
*/
proto.google.api.DocumentationRule.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.DocumentationRule} returns this
*/
proto.google.api.DocumentationRule.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -540,34 +588,20 @@ proto.google.api.DocumentationRule.prototype.setDescription = function(value) {
* @return {string}
*/
proto.google.api.DocumentationRule.prototype.getDeprecationDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(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
* @param {string} value
* @return {!proto.google.api.DocumentationRule} returns this
*/
proto.google.api.Page = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Page.repeatedFields_, null);
proto.google.api.DocumentationRule.prototype.setDeprecationDescription = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
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>}
@ -579,13 +613,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -595,16 +631,17 @@ proto.google.api.Page.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Page.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
content: msg.getContent(),
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
content: jspb.Message.getFieldWithDefault(msg, 2, ""),
subpagesList: jspb.Message.toObjectList(msg.getSubpagesList(),
proto.google.api.Page.toObject, includeInstance)
};
@ -654,8 +691,7 @@ proto.google.api.Page.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addSubpages(value);
break;
default:
reader.skipField();
@ -666,50 +702,41 @@ proto.google.api.Page.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Page.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Page.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Page.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getContent();
f = message.getContent();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getSubpagesList();
f = message.getSubpagesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -720,27 +747,21 @@ proto.google.api.Page.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Page} returns this
*/
proto.google.api.Page.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -749,36 +770,54 @@ proto.google.api.Page.prototype.setName = function(value) {
* @return {string}
*/
proto.google.api.Page.prototype.getContent = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Page} returns this
*/
proto.google.api.Page.prototype.setContent = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.Page>}
*/
proto.google.api.Page.prototype.getSubpagesList = function() {
return /** @type{!Array.<!proto.google.api.Page>} */ (
return /** @type{!Array<!proto.google.api.Page>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Page, 3));
};
/** @param {Array.<!proto.google.api.Page>} value */
/**
* @param {!Array<!proto.google.api.Page>} value
* @return {!proto.google.api.Page} returns this
*/
proto.google.api.Page.prototype.setSubpagesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.api.Page=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Page}
*/
proto.google.api.Page.prototype.addSubpages = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.Page, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Page} returns this
*/
proto.google.api.Page.prototype.clearSubpagesList = function() {
this.setSubpagesList([]);
return this.setSubpagesList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/endpoint.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,7 +13,6 @@ 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
@ -26,8 +28,13 @@ proto.google.api.Endpoint = function(opt_data) {
};
goog.inherits(proto.google.api.Endpoint, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Endpoint.displayName = 'proto.google.api.Endpoint';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -39,13 +46,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -55,18 +64,19 @@ proto.google.api.Endpoint.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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()
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
aliasesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
target: jspb.Message.getFieldWithDefault(msg, 101, ""),
allowCors: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
};
if (includeInstance) {
@ -109,8 +119,7 @@ proto.google.api.Endpoint.deserializeBinaryFromReader = function(msg, reader) {
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getAliasesList().push(value);
msg.setAliasesList(msg.getAliasesList());
msg.addAliases(value);
break;
case 101:
var value = /** @type {string} */ (reader.readString());
@ -129,57 +138,48 @@ proto.google.api.Endpoint.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Endpoint.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Endpoint.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Endpoint.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAliasesList();
f = message.getAliasesList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getTarget();
f = message.getTarget();
if (f.length > 0) {
writer.writeString(
101,
f
);
}
f = this.getAllowCors();
f = message.getAllowCors();
if (f) {
writer.writeBool(
5,
@ -189,49 +189,58 @@ proto.google.api.Endpoint.prototype.serializeBinaryToWriter = function (writer)
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<string>}
*/
proto.google.api.Endpoint.prototype.getAliasesList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.setAliasesList = function(value) {
jspb.Message.setField(this, 2, value || []);
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.addAliases = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.clearAliasesList = function() {
jspb.Message.setField(this, 2, []);
return this.setAliasesList([]);
};
@ -240,30 +249,34 @@ proto.google.api.Endpoint.prototype.clearAliasesList = function() {
* @return {string}
*/
proto.google.api.Endpoint.prototype.getTarget = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 101, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 101, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.setTarget = function(value) {
jspb.Message.setField(this, 101, value);
return jspb.Message.setProto3StringField(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));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
/**
* @param {boolean} value
* @return {!proto.google.api.Endpoint} returns this
*/
proto.google.api.Endpoint.prototype.setAllowCors = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3BooleanField(this, 5, value);
};

View File

@ -24,6 +24,14 @@ export interface ErrorReasonMap {
ACCESS_TOKEN_SCOPE_INSUFFICIENT: 17;
ACCOUNT_STATE_INVALID: 18;
ACCESS_TOKEN_TYPE_UNSUPPORTED: 19;
CREDENTIALS_MISSING: 20;
RESOURCE_PROJECT_INVALID: 21;
SESSION_COOKIE_INVALID: 23;
USER_BLOCKED_BY_ADMIN: 24;
RESOURCE_USAGE_RESTRICTION_VIOLATED: 25;
SYSTEM_PARAMETER_UNSUPPORTED: 26;
ORG_RESTRICTION_VIOLATION: 27;
ORG_RESTRICTION_HEADER_INVALID: 28;
}
export const ErrorReason: ErrorReasonMap;

View File

@ -1,6 +1,9 @@
// source: google/api/error_reason.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -33,7 +36,15 @@ proto.google.api.ErrorReason = {
ACCESS_TOKEN_EXPIRED: 16,
ACCESS_TOKEN_SCOPE_INSUFFICIENT: 17,
ACCOUNT_STATE_INVALID: 18,
ACCESS_TOKEN_TYPE_UNSUPPORTED: 19
ACCESS_TOKEN_TYPE_UNSUPPORTED: 19,
CREDENTIALS_MISSING: 20,
RESOURCE_PROJECT_INVALID: 21,
SESSION_COOKIE_INVALID: 23,
USER_BLOCKED_BY_ADMIN: 24,
RESOURCE_USAGE_RESTRICTION_VIOLATED: 25,
SYSTEM_PARAMETER_UNSUPPORTED: 26,
ORG_RESTRICTION_VIOLATION: 27,
ORG_RESTRICTION_HEADER_INVALID: 28
};
goog.object.extend(exports, proto.google.api);

View File

@ -1,6 +1,9 @@
// source: google/api/field_behavior.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,8 +13,9 @@ 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.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.google.api.FieldBehavior', null, global);
goog.exportSymbol('proto.google.api.fieldBehaviorList', null, global);
/**
* @enum {number}
*/
@ -30,7 +34,7 @@ proto.google.api.FieldBehavior = {
/**
* A tuple of {field number, class constructor} for the extension
* field named `fieldBehaviorList`.
* @type {!jspb.ExtensionFieldInfo.<!Array.<!proto.google.api.FieldBehavior>>}
* @type {!jspb.ExtensionFieldInfo<!Array<!proto.google.api.FieldBehavior>>}
*/
proto.google.api.fieldBehaviorList = new jspb.ExtensionFieldInfo(
1052,
@ -44,8 +48,8 @@ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1052] = new jspb.Ext
proto.google.api.fieldBehaviorList,
jspb.BinaryReader.prototype.readPackedEnum,
jspb.BinaryWriter.prototype.writePackedEnum,
null,
null,
undefined,
undefined,
true);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.

View File

@ -1,6 +1,9 @@
// source: google/api/http.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,7 @@ 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);
goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -28,8 +31,55 @@ proto.google.api.Http = function(opt_data) {
};
goog.inherits(proto.google.api.Http, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Http.displayName = 'proto.google.api.Http';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +91,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,17 +109,18 @@ proto.google.api.Http.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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()
fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
};
if (includeInstance) {
@ -107,8 +160,7 @@ proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addRules(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
@ -123,36 +175,27 @@ proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Http.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Http.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Http.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -160,7 +203,7 @@ proto.google.api.Http.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.HttpRule.serializeBinaryToWriter
);
}
f = this.getFullyDecodeReservedExpansion();
f = message.getFullyDecodeReservedExpansion();
if (f) {
writer.writeBool(
2,
@ -170,73 +213,63 @@ proto.google.api.Http.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
* @return {!Array<!proto.google.api.HttpRule>}
*/
proto.google.api.Http.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.HttpRule>} */ (
return /** @type{!Array<!proto.google.api.HttpRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1));
};
/** @param {Array.<!proto.google.api.HttpRule>} value */
/**
* @param {!Array<!proto.google.api.HttpRule>} value
* @return {!proto.google.api.Http} returns this
*/
proto.google.api.Http.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.api.HttpRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.HttpRule}
*/
proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Http} returns this
*/
proto.google.api.Http.prototype.clearRulesList = function() {
this.setRulesList([]);
return 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));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(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
* @param {boolean} value
* @return {!proto.google.api.Http} returns this
*/
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_);
proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) {
return jspb.Message.setProto3BooleanField(this, 2, value);
};
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>}
@ -278,13 +311,15 @@ proto.google.api.HttpRule.prototype.getPatternCase = function() {
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -294,23 +329,24 @@ proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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),
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
get: jspb.Message.getFieldWithDefault(msg, 2, ""),
put: jspb.Message.getFieldWithDefault(msg, 3, ""),
post: jspb.Message.getFieldWithDefault(msg, 4, ""),
pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""),
patch: jspb.Message.getFieldWithDefault(msg, 6, ""),
custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f),
body: msg.getBody(),
responseBody: msg.getResponseBody(),
body: jspb.Message.getFieldWithDefault(msg, 7, ""),
responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""),
additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(),
proto.google.api.HttpRule.toObject, includeInstance)
};
@ -389,8 +425,7 @@ proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addAdditionalBindings(value);
break;
default:
reader.skipField();
@ -401,78 +436,69 @@ proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.HttpRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.HttpRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = jspb.Message.getField(this, 2);
f = /** @type {string} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeString(
2,
f
);
}
f = jspb.Message.getField(this, 3);
f = /** @type {string} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeString(
3,
f
);
}
f = jspb.Message.getField(this, 4);
f = /** @type {string} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeString(
4,
f
);
}
f = jspb.Message.getField(this, 5);
f = /** @type {string} */ (jspb.Message.getField(message, 5));
if (f != null) {
writer.writeString(
5,
f
);
}
f = jspb.Message.getField(this, 6);
f = /** @type {string} */ (jspb.Message.getField(message, 6));
if (f != null) {
writer.writeString(
6,
f
);
}
f = this.getCustom();
f = message.getCustom();
if (f != null) {
writer.writeMessage(
8,
@ -480,21 +506,21 @@ proto.google.api.HttpRule.prototype.serializeBinaryToWriter = function (writer)
proto.google.api.CustomHttpPattern.serializeBinaryToWriter
);
}
f = this.getBody();
f = message.getBody();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = this.getResponseBody();
f = message.getResponseBody();
if (f.length > 0) {
writer.writeString(
12,
f
);
}
f = this.getAdditionalBindingsList();
f = message.getAdditionalBindingsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
11,
@ -505,27 +531,21 @@ proto.google.api.HttpRule.prototype.serializeBinaryToWriter = function (writer)
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -534,24 +554,31 @@ proto.google.api.HttpRule.prototype.setSelector = function(value) {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getGet = function() {
return /** @type {string} */ (!this.hasGet() ? "" : jspb.Message.getField(this, 2));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string?|undefined} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setGet = function(value) {
jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearGet = function() {
jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined);
return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasGet = function() {
return jspb.Message.getField(this, 2) != null;
@ -563,24 +590,31 @@ proto.google.api.HttpRule.prototype.hasGet = function() {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPut = function() {
return /** @type {string} */ (!this.hasPut() ? "" : jspb.Message.getField(this, 3));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string?|undefined} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setPut = function(value) {
jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearPut = function() {
jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined);
return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasPut = function() {
return jspb.Message.getField(this, 3) != null;
@ -592,24 +626,31 @@ proto.google.api.HttpRule.prototype.hasPut = function() {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPost = function() {
return /** @type {string} */ (!this.hasPost() ? "" : jspb.Message.getField(this, 4));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string?|undefined} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setPost = function(value) {
jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearPost = function() {
jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined);
return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasPost = function() {
return jspb.Message.getField(this, 4) != null;
@ -621,24 +662,31 @@ proto.google.api.HttpRule.prototype.hasPost = function() {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getDelete = function() {
return /** @type {string} */ (!this.hasDelete() ? "" : jspb.Message.getField(this, 5));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string?|undefined} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setDelete = function(value) {
jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearDelete = function() {
jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined);
return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasDelete = function() {
return jspb.Message.getField(this, 5) != null;
@ -650,24 +698,31 @@ proto.google.api.HttpRule.prototype.hasDelete = function() {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getPatch = function() {
return /** @type {string} */ (!this.hasPatch() ? "" : jspb.Message.getField(this, 6));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string?|undefined} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setPatch = function(value) {
jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearPatch = function() {
jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined);
return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasPatch = function() {
return jspb.Message.getField(this, 6) != null;
@ -676,28 +731,35 @@ proto.google.api.HttpRule.prototype.hasPatch = function() {
/**
* optional CustomHttpPattern custom = 8;
* @return {proto.google.api.CustomHttpPattern}
* @return {?proto.google.api.CustomHttpPattern}
*/
proto.google.api.HttpRule.prototype.getCustom = function() {
return /** @type{proto.google.api.CustomHttpPattern} */ (
return /** @type{?proto.google.api.CustomHttpPattern} */ (
jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8));
};
/** @param {proto.google.api.CustomHttpPattern|undefined} value */
/**
* @param {?proto.google.api.CustomHttpPattern|undefined} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setCustom = function(value) {
jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value);
return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearCustom = function() {
this.setCustom(undefined);
return this.setCustom(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.HttpRule.prototype.hasCustom = function() {
return jspb.Message.getField(this, 8) != null;
@ -709,13 +771,16 @@ proto.google.api.HttpRule.prototype.hasCustom = function() {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getBody = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setBody = function(value) {
jspb.Message.setField(this, 7, value);
return jspb.Message.setProto3StringField(this, 7, value);
};
@ -724,68 +789,71 @@ proto.google.api.HttpRule.prototype.setBody = function(value) {
* @return {string}
*/
proto.google.api.HttpRule.prototype.getResponseBody = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 12, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setResponseBody = function(value) {
jspb.Message.setField(this, 12, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.HttpRule>}
*/
proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() {
return /** @type{!Array.<!proto.google.api.HttpRule>} */ (
return /** @type{!Array<!proto.google.api.HttpRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11));
};
/** @param {Array.<!proto.google.api.HttpRule>} value */
/**
* @param {!Array<!proto.google.api.HttpRule>} value
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 11, value);
return 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
* @param {!proto.google.api.HttpRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.HttpRule}
*/
proto.google.api.CustomHttpPattern = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index);
};
goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.HttpRule} returns this
*/
proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() {
return this.setAdditionalBindingsList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -795,16 +863,17 @@ proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInst
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) {
var f, obj = {
kind: msg.getKind(),
path: msg.getPath()
kind: jspb.Message.getFieldWithDefault(msg, 1, ""),
path: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -858,43 +927,34 @@ proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, r
};
/**
* 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);
proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.CustomHttpPattern.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getKind();
f = message.getKind();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPath();
f = message.getPath();
if (f.length > 0) {
writer.writeString(
2,
@ -904,27 +964,21 @@ proto.google.api.CustomHttpPattern.prototype.serializeBinaryToWriter = function
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.CustomHttpPattern} returns this
*/
proto.google.api.CustomHttpPattern.prototype.setKind = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -933,13 +987,16 @@ proto.google.api.CustomHttpPattern.prototype.setKind = function(value) {
* @return {string}
*/
proto.google.api.CustomHttpPattern.prototype.getPath = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.CustomHttpPattern} returns this
*/
proto.google.api.CustomHttpPattern.prototype.setPath = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/httpbody.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,8 +13,8 @@ var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.google.api.HttpBody', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -27,8 +30,13 @@ proto.google.api.HttpBody = function(opt_data) {
};
goog.inherits(proto.google.api.HttpBody, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +48,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,15 +66,16 @@ proto.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.HttpBody.toObject = function(includeInstance, msg) {
var f, obj = {
contentType: msg.getContentType(),
contentType: jspb.Message.getFieldWithDefault(msg, 1, ""),
data: msg.getData_asB64(),
extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(),
google_protobuf_any_pb.Any.toObject, includeInstance)
@ -115,8 +126,7 @@ proto.google.api.HttpBody.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addExtensions(value);
break;
default:
reader.skipField();
@ -127,50 +137,41 @@ proto.google.api.HttpBody.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.HttpBody.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.HttpBody.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getContentType();
f = message.getContentType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getData_asU8();
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = this.getExtensionsList();
f = message.getExtensionsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -181,27 +182,21 @@ proto.google.api.HttpBody.prototype.serializeBinaryToWriter = function (writer)
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.HttpBody} returns this
*/
proto.google.api.HttpBody.prototype.setContentType = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -210,7 +205,7 @@ proto.google.api.HttpBody.prototype.setContentType = function(value) {
* @return {!(string|Uint8Array)}
*/
proto.google.api.HttpBody.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
@ -238,32 +233,50 @@ proto.google.api.HttpBody.prototype.getData_asU8 = function() {
};
/** @param {!(string|Uint8Array)} value */
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.google.api.HttpBody} returns this
*/
proto.google.api.HttpBody.prototype.setData = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3BytesField(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>}
* @return {!Array<!proto.google.protobuf.Any>}
*/
proto.google.api.HttpBody.prototype.getExtensionsList = function() {
return /** @type{!Array.<!proto.google.protobuf.Any>} */ (
return /** @type{!Array<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/** @param {Array.<!proto.google.protobuf.Any>} value */
/**
* @param {!Array<!proto.google.protobuf.Any>} value
* @return {!proto.google.api.HttpBody} returns this
*/
proto.google.api.HttpBody.prototype.setExtensionsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.protobuf.Any=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Any}
*/
proto.google.api.HttpBody.prototype.addExtensions = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.HttpBody} returns this
*/
proto.google.api.HttpBody.prototype.clearExtensionsList = function() {
this.setExtensionsList([]);
return this.setExtensionsList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/label.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ 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
@ -27,19 +29,26 @@ proto.google.api.LabelDescriptor = function(opt_data) {
};
goog.inherits(proto.google.api.LabelDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -49,17 +58,18 @@ proto.google.api.LabelDescriptor.prototype.toObject = function(opt_includeInstan
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.LabelDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
key: msg.getKey(),
valueType: msg.getValueType(),
description: msg.getDescription()
key: jspb.Message.getFieldWithDefault(msg, 1, ""),
valueType: jspb.Message.getFieldWithDefault(msg, 2, 0),
description: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@ -117,50 +127,41 @@ proto.google.api.LabelDescriptor.deserializeBinaryFromReader = function(msg, rea
};
/**
* 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);
proto.google.api.LabelDescriptor.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.LabelDescriptor.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.LabelDescriptor.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getKey();
f = message.getKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getValueType();
f = message.getValueType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
@ -170,60 +171,6 @@ proto.google.api.LabelDescriptor.prototype.serializeBinaryToWriter = function (w
};
/**
* 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}
*/
@ -233,4 +180,58 @@ proto.google.api.LabelDescriptor.ValueType = {
INT64: 2
};
/**
* optional string key = 1;
* @return {string}
*/
proto.google.api.LabelDescriptor.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.LabelDescriptor} returns this
*/
proto.google.api.LabelDescriptor.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(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.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.google.api.LabelDescriptor.ValueType} value
* @return {!proto.google.api.LabelDescriptor} returns this
*/
proto.google.api.LabelDescriptor.prototype.setValueType = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.google.api.LabelDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.LabelDescriptor} returns this
*/
proto.google.api.LabelDescriptor.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
goog.object.extend(exports, proto.google.api);

View File

@ -1,6 +1,9 @@
// source: google/api/launch_stage.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!

View File

@ -1,6 +1,9 @@
// source: google/api/log.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,8 +13,8 @@ var goog = jspb;
var global = Function('return this')();
var google_api_label_pb = require('../../google/api/label_pb.js');
goog.object.extend(proto, google_api_label_pb);
goog.exportSymbol('proto.google.api.LogDescriptor', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -27,8 +30,13 @@ proto.google.api.LogDescriptor = function(opt_data) {
};
goog.inherits(proto.google.api.LogDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.LogDescriptor.displayName = 'proto.google.api.LogDescriptor';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +48,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,19 +66,20 @@ proto.google.api.LogDescriptor.prototype.toObject = function(opt_includeInstance
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.LogDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
google_api_label_pb.LabelDescriptor.toObject, includeInstance),
description: msg.getDescription(),
displayName: msg.getDisplayName()
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
displayName: jspb.Message.getFieldWithDefault(msg, 4, "")
};
if (includeInstance) {
@ -112,8 +123,7 @@ proto.google.api.LogDescriptor.deserializeBinaryFromReader = function(msg, reade
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());
msg.addLabels(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
@ -132,43 +142,34 @@ proto.google.api.LogDescriptor.deserializeBinaryFromReader = function(msg, reade
};
/**
* 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);
proto.google.api.LogDescriptor.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.LogDescriptor.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.LogDescriptor.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getLabelsList();
f = message.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -176,14 +177,14 @@ proto.google.api.LogDescriptor.prototype.serializeBinaryToWriter = function (wri
google_api_label_pb.LabelDescriptor.serializeBinaryToWriter
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getDisplayName();
f = message.getDisplayName();
if (f.length > 0) {
writer.writeString(
4,
@ -193,50 +194,59 @@ proto.google.api.LogDescriptor.prototype.serializeBinaryToWriter = function (wri
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.LogDescriptor} returns this
*/
proto.google.api.LogDescriptor.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.LabelDescriptor>}
*/
proto.google.api.LogDescriptor.prototype.getLabelsList = function() {
return /** @type{!Array.<!proto.google.api.LabelDescriptor>} */ (
return /** @type{!Array<!proto.google.api.LabelDescriptor>} */ (
jspb.Message.getRepeatedWrapperField(this, google_api_label_pb.LabelDescriptor, 2));
};
/** @param {Array.<!proto.google.api.LabelDescriptor>} value */
/**
* @param {!Array<!proto.google.api.LabelDescriptor>} value
* @return {!proto.google.api.LogDescriptor} returns this
*/
proto.google.api.LogDescriptor.prototype.setLabelsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.google.api.LabelDescriptor=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.LabelDescriptor}
*/
proto.google.api.LogDescriptor.prototype.addLabels = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.LabelDescriptor, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.LogDescriptor} returns this
*/
proto.google.api.LogDescriptor.prototype.clearLabelsList = function() {
this.setLabelsList([]);
return this.setLabelsList([]);
};
@ -245,13 +255,16 @@ proto.google.api.LogDescriptor.prototype.clearLabelsList = function() {
* @return {string}
*/
proto.google.api.LogDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.LogDescriptor} returns this
*/
proto.google.api.LogDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3StringField(this, 3, value);
};
@ -260,13 +273,16 @@ proto.google.api.LogDescriptor.prototype.setDescription = function(value) {
* @return {string}
*/
proto.google.api.LogDescriptor.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.LogDescriptor} returns this
*/
proto.google.api.LogDescriptor.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3StringField(this, 4, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/logging.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ 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
@ -27,8 +29,34 @@ proto.google.api.Logging = function(opt_data) {
};
goog.inherits(proto.google.api.Logging, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Logging.displayName = 'proto.google.api.Logging';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Logging.LoggingDestination.displayName = 'proto.google.api.Logging.LoggingDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +68,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,11 +86,12 @@ proto.google.api.Logging.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Logging.toObject = function(includeInstance, msg) {
var f, obj = {
@ -107,14 +138,12 @@ proto.google.api.Logging.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addProducerDestinations(value);
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());
msg.addConsumerDestinations(value);
break;
default:
reader.skipField();
@ -125,36 +154,27 @@ proto.google.api.Logging.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Logging.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Logging.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Logging.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getProducerDestinationsList();
f = message.getProducerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -162,7 +182,7 @@ proto.google.api.Logging.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter
);
}
f = this.getConsumerDestinationsList();
f = message.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -173,79 +193,7 @@ proto.google.api.Logging.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
@ -257,13 +205,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -273,16 +223,17 @@ proto.google.api.Logging.LoggingDestination.prototype.toObject = function(opt_in
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Logging.LoggingDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
logsList: jspb.Message.getField(msg, 1)
monitoredResource: jspb.Message.getFieldWithDefault(msg, 3, ""),
logsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
};
if (includeInstance) {
@ -325,8 +276,7 @@ proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader = functi
break;
case 1:
var value = /** @type {string} */ (reader.readString());
msg.getLogsList().push(value);
msg.setLogsList(msg.getLogsList());
msg.addLogs(value);
break;
default:
reader.skipField();
@ -337,43 +287,34 @@ proto.google.api.Logging.LoggingDestination.deserializeBinaryFromReader = functi
};
/**
* 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);
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Logging.LoggingDestination.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Logging.LoggingDestination.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getMonitoredResource();
f = message.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getLogsList();
f = message.getLogsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
@ -383,49 +324,134 @@ proto.google.api.Logging.LoggingDestination.prototype.serializeBinaryToWriter =
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Logging.LoggingDestination} returns this
*/
proto.google.api.Logging.LoggingDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<string>}
*/
proto.google.api.Logging.LoggingDestination.prototype.getLogsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 1));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.Logging.LoggingDestination} returns this
*/
proto.google.api.Logging.LoggingDestination.prototype.setLogsList = function(value) {
jspb.Message.setField(this, 1, value || []);
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.Logging.LoggingDestination} returns this
*/
proto.google.api.Logging.LoggingDestination.prototype.addLogs = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Logging.LoggingDestination} returns this
*/
proto.google.api.Logging.LoggingDestination.prototype.clearLogsList = function() {
jspb.Message.setField(this, 1, []);
return this.setLogsList([]);
};
/**
* repeated LoggingDestination producer_destinations = 1;
* @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
* @return {!proto.google.api.Logging} returns this
*/
proto.google.api.Logging.prototype.setProducerDestinationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.api.Logging.LoggingDestination=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Logging.LoggingDestination}
*/
proto.google.api.Logging.prototype.addProducerDestinations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.Logging.LoggingDestination, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Logging} returns this
*/
proto.google.api.Logging.prototype.clearProducerDestinationsList = function() {
return this.setProducerDestinationsList([]);
};
/**
* repeated LoggingDestination consumer_destinations = 2;
* @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
* @return {!proto.google.api.Logging} returns this
*/
proto.google.api.Logging.prototype.setConsumerDestinationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.google.api.Logging.LoggingDestination=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Logging.LoggingDestination}
*/
proto.google.api.Logging.prototype.addConsumerDestinations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.Logging.LoggingDestination, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Logging} returns this
*/
proto.google.api.Logging.prototype.clearConsumerDestinationsList = function() {
return this.setConsumerDestinationsList([]);
};

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: google/api/monitored_resource.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,12 +13,14 @@ var goog = jspb;
var global = Function('return this')();
var google_api_label_pb = require('../../google/api/label_pb.js');
goog.object.extend(proto, google_api_label_pb);
var google_api_launch_stage_pb = require('../../google/api/launch_stage_pb.js');
goog.object.extend(proto, google_api_launch_stage_pb);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
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
@ -31,8 +36,55 @@ proto.google.api.MonitoredResourceDescriptor = function(opt_data) {
};
goog.inherits(proto.google.api.MonitoredResourceDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.MonitoredResourceDescriptor.displayName = 'proto.google.api.MonitoredResourceDescriptor';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.MonitoredResource.displayName = 'proto.google.api.MonitoredResource';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.MonitoredResourceMetadata.displayName = 'proto.google.api.MonitoredResourceMetadata';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -44,13 +96,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -60,21 +114,22 @@ proto.google.api.MonitoredResourceDescriptor.prototype.toObject = function(opt_i
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MonitoredResourceDescriptor.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
type: msg.getType(),
displayName: msg.getDisplayName(),
description: msg.getDescription(),
name: jspb.Message.getFieldWithDefault(msg, 5, ""),
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
displayName: jspb.Message.getFieldWithDefault(msg, 2, ""),
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
google_api_label_pb.LabelDescriptor.toObject, includeInstance),
launchStage: msg.getLaunchStage()
launchStage: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
@ -130,8 +185,7 @@ proto.google.api.MonitoredResourceDescriptor.deserializeBinaryFromReader = funct
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());
msg.addLabels(value);
break;
case 7:
var value = /** @type {!proto.google.api.LaunchStage} */ (reader.readEnum());
@ -146,64 +200,55 @@ proto.google.api.MonitoredResourceDescriptor.deserializeBinaryFromReader = funct
};
/**
* 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);
proto.google.api.MonitoredResourceDescriptor.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MonitoredResourceDescriptor.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.MonitoredResourceDescriptor.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getType();
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDisplayName();
f = message.getDisplayName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getLabelsList();
f = message.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
@ -211,7 +256,7 @@ proto.google.api.MonitoredResourceDescriptor.prototype.serializeBinaryToWriter =
google_api_label_pb.LabelDescriptor.serializeBinaryToWriter
);
}
f = this.getLaunchStage();
f = message.getLaunchStage();
if (f !== 0.0) {
writer.writeEnum(
7,
@ -221,27 +266,21 @@ proto.google.api.MonitoredResourceDescriptor.prototype.serializeBinaryToWriter =
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.setName = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3StringField(this, 5, value);
};
@ -250,13 +289,16 @@ proto.google.api.MonitoredResourceDescriptor.prototype.setName = function(value)
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -265,13 +307,16 @@ proto.google.api.MonitoredResourceDescriptor.prototype.setType = function(value)
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -280,36 +325,54 @@ proto.google.api.MonitoredResourceDescriptor.prototype.setDisplayName = function
* @return {string}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.setDescription = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.LabelDescriptor>}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getLabelsList = function() {
return /** @type{!Array.<!proto.google.api.LabelDescriptor>} */ (
return /** @type{!Array<!proto.google.api.LabelDescriptor>} */ (
jspb.Message.getRepeatedWrapperField(this, google_api_label_pb.LabelDescriptor, 4));
};
/** @param {Array.<!proto.google.api.LabelDescriptor>} value */
/**
* @param {!Array<!proto.google.api.LabelDescriptor>} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.setLabelsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 4, value);
return jspb.Message.setRepeatedWrapperField(this, 4, value);
};
/**
* @param {!proto.google.api.LabelDescriptor=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.LabelDescriptor}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.addLabels = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.api.LabelDescriptor, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResourceDescriptor.prototype.clearLabelsList = function() {
this.setLabelsList([]);
return this.setLabelsList([]);
};
@ -318,45 +381,33 @@ proto.google.api.MonitoredResourceDescriptor.prototype.clearLabelsList = functio
* @return {!proto.google.api.LaunchStage}
*/
proto.google.api.MonitoredResourceDescriptor.prototype.getLaunchStage = function() {
return /** @type {!proto.google.api.LaunchStage} */ (jspb.Message.getFieldProto3(this, 7, 0));
return /** @type {!proto.google.api.LaunchStage} */ (jspb.Message.getFieldWithDefault(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
* @param {!proto.google.api.LaunchStage} value
* @return {!proto.google.api.MonitoredResourceDescriptor} returns this
*/
proto.google.api.MonitoredResource = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.MonitoredResourceDescriptor.prototype.setLaunchStage = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -366,16 +417,17 @@ proto.google.api.MonitoredResource.prototype.toObject = function(opt_includeInst
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MonitoredResource.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
labelsMap: (f = msg.getLabelsMap(true)) ? f.toArray() : []
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
@ -419,7 +471,7 @@ proto.google.api.MonitoredResource.deserializeBinaryFromReader = function(msg, r
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);
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
@ -431,70 +483,55 @@ proto.google.api.MonitoredResource.deserializeBinaryFromReader = function(msg, r
};
/**
* 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);
proto.google.api.MonitoredResource.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MonitoredResource.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.MonitoredResource.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getType();
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getLabelsMap(true);
f = message.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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MonitoredResource} returns this
*/
proto.google.api.MonitoredResource.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -511,35 +548,29 @@ proto.google.api.MonitoredResource.prototype.getLabelsMap = function(opt_noLazyC
};
/**
* 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
* Clears values from the map. The map will be non-null.
* @return {!proto.google.api.MonitoredResource} returns this
*/
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';
}
proto.google.api.MonitoredResource.prototype.clearLabelsMap = function() {
this.getLabelsMap().clear();
return this;};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -549,16 +580,17 @@ proto.google.api.MonitoredResourceMetadata.prototype.toObject = function(opt_inc
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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() : []
userLabelsMap: (f = msg.getUserLabelsMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
@ -603,7 +635,7 @@ proto.google.api.MonitoredResourceMetadata.deserializeBinaryFromReader = functio
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);
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
@ -615,36 +647,27 @@ proto.google.api.MonitoredResourceMetadata.deserializeBinaryFromReader = functio
};
/**
* 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);
proto.google.api.MonitoredResourceMetadata.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MonitoredResourceMetadata.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.MonitoredResourceMetadata.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSystemLabels();
f = message.getSystemLabels();
if (f != null) {
writer.writeMessage(
1,
@ -652,46 +675,44 @@ proto.google.api.MonitoredResourceMetadata.prototype.serializeBinaryToWriter = f
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = this.getUserLabelsMap(true);
f = message.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}
* @return {?proto.google.protobuf.Struct}
*/
proto.google.api.MonitoredResourceMetadata.prototype.getSystemLabels = function() {
return /** @type{proto.google.protobuf.Struct} */ (
return /** @type{?proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 1));
};
/** @param {proto.google.protobuf.Struct|undefined} value */
/**
* @param {?proto.google.protobuf.Struct|undefined} value
* @return {!proto.google.api.MonitoredResourceMetadata} returns this
*/
proto.google.api.MonitoredResourceMetadata.prototype.setSystemLabels = function(value) {
jspb.Message.setWrapperField(this, 1, value);
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.MonitoredResourceMetadata} returns this
*/
proto.google.api.MonitoredResourceMetadata.prototype.clearSystemLabels = function() {
this.setSystemLabels(undefined);
return this.setSystemLabels(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.google.api.MonitoredResourceMetadata.prototype.hasSystemLabels = function() {
return jspb.Message.getField(this, 1) != null;
@ -711,4 +732,13 @@ proto.google.api.MonitoredResourceMetadata.prototype.getUserLabelsMap = function
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.google.api.MonitoredResourceMetadata} returns this
*/
proto.google.api.MonitoredResourceMetadata.prototype.clearUserLabelsMap = function() {
this.getUserLabelsMap().clear();
return this;};
goog.object.extend(exports, proto.google.api);

View File

@ -1,6 +1,9 @@
// source: google/api/monitoring.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ 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
@ -27,8 +29,34 @@ proto.google.api.Monitoring = function(opt_data) {
};
goog.inherits(proto.google.api.Monitoring, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Monitoring.displayName = 'proto.google.api.Monitoring';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.Monitoring.MonitoringDestination.displayName = 'proto.google.api.Monitoring.MonitoringDestination';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +68,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,11 +86,12 @@ proto.google.api.Monitoring.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Monitoring.toObject = function(includeInstance, msg) {
var f, obj = {
@ -107,14 +138,12 @@ proto.google.api.Monitoring.deserializeBinaryFromReader = function(msg, reader)
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());
msg.addProducerDestinations(value);
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());
msg.addConsumerDestinations(value);
break;
default:
reader.skipField();
@ -125,36 +154,27 @@ proto.google.api.Monitoring.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.Monitoring.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Monitoring.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Monitoring.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getProducerDestinationsList();
f = message.getProducerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -162,7 +182,7 @@ proto.google.api.Monitoring.prototype.serializeBinaryToWriter = function (writer
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter
);
}
f = this.getConsumerDestinationsList();
f = message.getConsumerDestinationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -173,79 +193,7 @@ proto.google.api.Monitoring.prototype.serializeBinaryToWriter = function (writer
};
/**
* 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>}
@ -257,13 +205,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -273,16 +223,17 @@ proto.google.api.Monitoring.MonitoringDestination.prototype.toObject = function(
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Monitoring.MonitoringDestination.toObject = function(includeInstance, msg) {
var f, obj = {
monitoredResource: msg.getMonitoredResource(),
metricsList: jspb.Message.getField(msg, 2)
monitoredResource: jspb.Message.getFieldWithDefault(msg, 1, ""),
metricsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
};
if (includeInstance) {
@ -325,8 +276,7 @@ proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader =
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getMetricsList().push(value);
msg.setMetricsList(msg.getMetricsList());
msg.addMetrics(value);
break;
default:
reader.skipField();
@ -337,43 +287,34 @@ proto.google.api.Monitoring.MonitoringDestination.deserializeBinaryFromReader =
};
/**
* 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);
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Monitoring.MonitoringDestination.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getMonitoredResource();
f = message.getMonitoredResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricsList();
f = message.getMetricsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
@ -383,49 +324,134 @@ proto.google.api.Monitoring.MonitoringDestination.prototype.serializeBinaryToWri
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.Monitoring.MonitoringDestination} returns this
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.setMonitoredResource = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<string>}
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.getMetricsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {Array.<string>} value */
/**
* @param {!Array<string>} value
* @return {!proto.google.api.Monitoring.MonitoringDestination} returns this
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.setMetricsList = function(value) {
jspb.Message.setField(this, 2, value || []);
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.Monitoring.MonitoringDestination} returns this
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.addMetrics = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Monitoring.MonitoringDestination} returns this
*/
proto.google.api.Monitoring.MonitoringDestination.prototype.clearMetricsList = function() {
jspb.Message.setField(this, 2, []);
return this.setMetricsList([]);
};
/**
* repeated MonitoringDestination producer_destinations = 1;
* @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
* @return {!proto.google.api.Monitoring} returns this
*/
proto.google.api.Monitoring.prototype.setProducerDestinationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.api.Monitoring.MonitoringDestination=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Monitoring.MonitoringDestination}
*/
proto.google.api.Monitoring.prototype.addProducerDestinations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.Monitoring.MonitoringDestination, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Monitoring} returns this
*/
proto.google.api.Monitoring.prototype.clearProducerDestinationsList = function() {
return this.setProducerDestinationsList([]);
};
/**
* repeated MonitoringDestination consumer_destinations = 2;
* @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
* @return {!proto.google.api.Monitoring} returns this
*/
proto.google.api.Monitoring.prototype.setConsumerDestinationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.google.api.Monitoring.MonitoringDestination=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.Monitoring.MonitoringDestination}
*/
proto.google.api.Monitoring.prototype.addConsumerDestinations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.Monitoring.MonitoringDestination, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Monitoring} returns this
*/
proto.google.api.Monitoring.prototype.clearConsumerDestinationsList = function() {
return this.setConsumerDestinationsList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/quota.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,6 @@ 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
@ -28,8 +30,55 @@ proto.google.api.Quota = function(opt_data) {
};
goog.inherits(proto.google.api.Quota, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Quota.displayName = 'proto.google.api.Quota';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.MetricRule.displayName = 'proto.google.api.MetricRule';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.QuotaLimit.displayName = 'proto.google.api.QuotaLimit';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +90,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,11 +108,12 @@ proto.google.api.Quota.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Quota.toObject = function(includeInstance, msg) {
var f, obj = {
@ -108,14 +160,12 @@ proto.google.api.Quota.deserializeBinaryFromReader = function(msg, reader) {
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());
msg.addLimits(value);
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());
msg.addMetricRules(value);
break;
default:
reader.skipField();
@ -126,36 +176,27 @@ proto.google.api.Quota.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Quota.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Quota.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Quota.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getLimitsList();
f = message.getLimitsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -163,7 +204,7 @@ proto.google.api.Quota.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.QuotaLimit.serializeBinaryToWriter
);
}
f = this.getMetricRulesList();
f = message.getMetricRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
@ -174,90 +215,96 @@ proto.google.api.Quota.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* 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>}
* @return {!Array<!proto.google.api.QuotaLimit>}
*/
proto.google.api.Quota.prototype.getLimitsList = function() {
return /** @type{!Array.<!proto.google.api.QuotaLimit>} */ (
return /** @type{!Array<!proto.google.api.QuotaLimit>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.QuotaLimit, 3));
};
/** @param {Array.<!proto.google.api.QuotaLimit>} value */
/**
* @param {!Array<!proto.google.api.QuotaLimit>} value
* @return {!proto.google.api.Quota} returns this
*/
proto.google.api.Quota.prototype.setLimitsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.api.QuotaLimit=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.QuotaLimit}
*/
proto.google.api.Quota.prototype.addLimits = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.QuotaLimit, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Quota} returns this
*/
proto.google.api.Quota.prototype.clearLimitsList = function() {
this.setLimitsList([]);
return 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>}
* @return {!Array<!proto.google.api.MetricRule>}
*/
proto.google.api.Quota.prototype.getMetricRulesList = function() {
return /** @type{!Array.<!proto.google.api.MetricRule>} */ (
return /** @type{!Array<!proto.google.api.MetricRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.MetricRule, 4));
};
/** @param {Array.<!proto.google.api.MetricRule>} value */
/**
* @param {!Array<!proto.google.api.MetricRule>} value
* @return {!proto.google.api.Quota} returns this
*/
proto.google.api.Quota.prototype.setMetricRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 4, value);
return 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
* @param {!proto.google.api.MetricRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.MetricRule}
*/
proto.google.api.MetricRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.Quota.prototype.addMetricRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.api.MetricRule, opt_index);
};
goog.inherits(proto.google.api.MetricRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.MetricRule.displayName = 'proto.google.api.MetricRule';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Quota} returns this
*/
proto.google.api.Quota.prototype.clearMetricRulesList = function() {
return this.setMetricRulesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -267,16 +314,17 @@ proto.google.api.MetricRule.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MetricRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
metricCostsMap: (f = msg.getMetricCostsMap(true)) ? f.toArray() : []
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
metricCostsMap: (f = msg.getMetricCostsMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
@ -320,7 +368,7 @@ proto.google.api.MetricRule.deserializeBinaryFromReader = function(msg, reader)
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);
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0);
});
break;
default:
@ -332,70 +380,55 @@ proto.google.api.MetricRule.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.MetricRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.MetricRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.MetricRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMetricCostsMap(true);
f = message.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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.MetricRule} returns this
*/
proto.google.api.MetricRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -412,35 +445,29 @@ proto.google.api.MetricRule.prototype.getMetricCostsMap = function(opt_noLazyCre
};
/**
* 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
* Clears values from the map. The map will be non-null.
* @return {!proto.google.api.MetricRule} returns this
*/
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';
}
proto.google.api.MetricRule.prototype.clearMetricCostsMap = function() {
this.getMetricCostsMap().clear();
return this;};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -450,24 +477,25 @@ proto.google.api.QuotaLimit.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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()
name: jspb.Message.getFieldWithDefault(msg, 6, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
defaultLimit: jspb.Message.getFieldWithDefault(msg, 3, 0),
maxLimit: jspb.Message.getFieldWithDefault(msg, 4, 0),
freeTier: jspb.Message.getFieldWithDefault(msg, 7, 0),
duration: jspb.Message.getFieldWithDefault(msg, 5, ""),
metric: jspb.Message.getFieldWithDefault(msg, 8, ""),
unit: jspb.Message.getFieldWithDefault(msg, 9, ""),
valuesMap: (f = msg.getValuesMap()) ? f.toObject(includeInstance, undefined) : [],
displayName: jspb.Message.getFieldWithDefault(msg, 12, "")
};
if (includeInstance) {
@ -539,7 +567,7 @@ proto.google.api.QuotaLimit.deserializeBinaryFromReader = function(msg, reader)
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);
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0);
});
break;
case 12:
@ -555,96 +583,87 @@ proto.google.api.QuotaLimit.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.QuotaLimit.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.QuotaLimit.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.QuotaLimit.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getDescription();
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getDefaultLimit();
f = message.getDefaultLimit();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = this.getMaxLimit();
f = message.getMaxLimit();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = this.getFreeTier();
f = message.getFreeTier();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = this.getDuration();
f = message.getDuration();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getMetric();
f = message.getMetric();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = this.getUnit();
f = message.getUnit();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = this.getValuesMap(true);
f = message.getValuesMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64);
}
f = this.getDisplayName();
f = message.getDisplayName();
if (f.length > 0) {
writer.writeString(
12,
@ -654,27 +673,21 @@ proto.google.api.QuotaLimit.prototype.serializeBinaryToWriter = function (writer
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setName = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3StringField(this, 6, value);
};
@ -683,13 +696,16 @@ proto.google.api.QuotaLimit.prototype.setName = function(value) {
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setDescription = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -698,13 +714,16 @@ proto.google.api.QuotaLimit.prototype.setDescription = function(value) {
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getDefaultLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setDefaultLimit = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3IntField(this, 3, value);
};
@ -713,13 +732,16 @@ proto.google.api.QuotaLimit.prototype.setDefaultLimit = function(value) {
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getMaxLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setMaxLimit = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -728,13 +750,16 @@ proto.google.api.QuotaLimit.prototype.setMaxLimit = function(value) {
* @return {number}
*/
proto.google.api.QuotaLimit.prototype.getFreeTier = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setFreeTier = function(value) {
jspb.Message.setField(this, 7, value);
return jspb.Message.setProto3IntField(this, 7, value);
};
@ -743,13 +768,16 @@ proto.google.api.QuotaLimit.prototype.setFreeTier = function(value) {
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDuration = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setDuration = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3StringField(this, 5, value);
};
@ -758,13 +786,16 @@ proto.google.api.QuotaLimit.prototype.setDuration = function(value) {
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getMetric = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setMetric = function(value) {
jspb.Message.setField(this, 8, value);
return jspb.Message.setProto3StringField(this, 8, value);
};
@ -773,13 +804,16 @@ proto.google.api.QuotaLimit.prototype.setMetric = function(value) {
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getUnit = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 9, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setUnit = function(value) {
jspb.Message.setField(this, 9, value);
return jspb.Message.setProto3StringField(this, 9, value);
};
@ -796,18 +830,30 @@ proto.google.api.QuotaLimit.prototype.getValuesMap = function(opt_noLazyCreate)
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.clearValuesMap = function() {
this.getValuesMap().clear();
return this;};
/**
* optional string display_name = 12;
* @return {string}
*/
proto.google.api.QuotaLimit.prototype.getDisplayName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 12, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.QuotaLimit} returns this
*/
proto.google.api.QuotaLimit.prototype.setDisplayName = function(value) {
jspb.Message.setField(this, 12, value);
return jspb.Message.setProto3StringField(this, 12, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/resource.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,14 +13,14 @@ 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.object.extend(proto, google_protobuf_descriptor_pb);
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);
goog.exportSymbol('proto.google.api.resource', null, global);
goog.exportSymbol('proto.google.api.resourceDefinitionList', null, global);
goog.exportSymbol('proto.google.api.resourceReference', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -33,8 +36,34 @@ proto.google.api.ResourceDescriptor = function(opt_data) {
};
goog.inherits(proto.google.api.ResourceDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.ResourceDescriptor.displayName = 'proto.google.api.ResourceDescriptor';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.ResourceReference.displayName = 'proto.google.api.ResourceReference';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -46,13 +75,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -62,21 +93,22 @@ proto.google.api.ResourceDescriptor.prototype.toObject = function(opt_includeIns
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
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)
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
patternList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
nameField: jspb.Message.getFieldWithDefault(msg, 3, ""),
history: jspb.Message.getFieldWithDefault(msg, 4, 0),
plural: jspb.Message.getFieldWithDefault(msg, 5, ""),
singular: jspb.Message.getFieldWithDefault(msg, 6, ""),
styleList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f
};
if (includeInstance) {
@ -119,8 +151,7 @@ proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(msg,
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.getPatternList().push(value);
msg.setPatternList(msg.getPatternList());
msg.addPattern(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
@ -139,7 +170,7 @@ proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(msg,
msg.setSingular(value);
break;
case 10:
var value = /** @type {!Array.<!proto.google.api.ResourceDescriptor.Style>} */ (reader.readPackedEnum());
var value = /** @type {!Array<!proto.google.api.ResourceDescriptor.Style>} */ (reader.readPackedEnum());
msg.setStyleList(value);
break;
default:
@ -151,78 +182,69 @@ proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(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);
proto.google.api.ResourceDescriptor.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ResourceDescriptor.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.ResourceDescriptor.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getType();
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPatternList();
f = message.getPatternList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = this.getNameField();
f = message.getNameField();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = this.getHistory();
f = message.getHistory();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = this.getPlural();
f = message.getPlural();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = this.getSingular();
f = message.getSingular();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = this.getStyleList();
f = message.getStyleList();
if (f.length > 0) {
writer.writePackedEnum(
10,
@ -232,134 +254,6 @@ proto.google.api.ResourceDescriptor.prototype.serializeBinaryToWriter = function
};
/**
* 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}
*/
@ -377,35 +271,184 @@ proto.google.api.ResourceDescriptor.Style = {
DECLARATIVE_FRIENDLY: 1
};
/**
* optional string type = 1;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 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
* @param {string} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceReference = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.ResourceDescriptor.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
goog.inherits(proto.google.api.ResourceReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.ResourceReference.displayName = 'proto.google.api.ResourceReference';
}
/**
* repeated string pattern = 2;
* @return {!Array<string>}
*/
proto.google.api.ResourceDescriptor.prototype.getPatternList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setPatternList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.addPattern = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.clearPatternList = function() {
return this.setPatternList([]);
};
/**
* optional string name_field = 3;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getNameField = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setNameField = function(value) {
return jspb.Message.setProto3StringField(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.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.google.api.ResourceDescriptor.History} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setHistory = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* optional string plural = 5;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getPlural = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setPlural = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string singular = 6;
* @return {string}
*/
proto.google.api.ResourceDescriptor.prototype.getSingular = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setSingular = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* repeated Style style = 10;
* @return {!Array<!proto.google.api.ResourceDescriptor.Style>}
*/
proto.google.api.ResourceDescriptor.prototype.getStyleList = function() {
return /** @type {!Array<!proto.google.api.ResourceDescriptor.Style>} */ (jspb.Message.getRepeatedField(this, 10));
};
/**
* @param {!Array<!proto.google.api.ResourceDescriptor.Style>} value
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.setStyleList = function(value) {
return jspb.Message.setField(this, 10, value || []);
};
/**
* @param {!proto.google.api.ResourceDescriptor.Style} value
* @param {number=} opt_index
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.addStyle = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 10, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.ResourceDescriptor} returns this
*/
proto.google.api.ResourceDescriptor.prototype.clearStyleList = function() {
return this.setStyleList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -415,16 +458,17 @@ proto.google.api.ResourceReference.prototype.toObject = function(opt_includeInst
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ResourceReference.toObject = function(includeInstance, msg) {
var f, obj = {
type: msg.getType(),
childType: msg.getChildType()
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
childType: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -478,43 +522,34 @@ proto.google.api.ResourceReference.deserializeBinaryFromReader = function(msg, r
};
/**
* 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);
proto.google.api.ResourceReference.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.ResourceReference.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.ResourceReference.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getType();
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getChildType();
f = message.getChildType();
if (f.length > 0) {
writer.writeString(
2,
@ -524,27 +559,21 @@ proto.google.api.ResourceReference.prototype.serializeBinaryToWriter = function
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ResourceReference} returns this
*/
proto.google.api.ResourceReference.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -553,13 +582,16 @@ proto.google.api.ResourceReference.prototype.setType = function(value) {
* @return {string}
*/
proto.google.api.ResourceReference.prototype.getChildType = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.ResourceReference} returns this
*/
proto.google.api.ResourceReference.prototype.setChildType = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -567,7 +599,7 @@ proto.google.api.ResourceReference.prototype.setChildType = function(value) {
/**
* A tuple of {field number, class constructor} for the extension
* field named `resourceReference`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.ResourceReference>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.ResourceReference>}
*/
proto.google.api.resourceReference = new jspb.ExtensionFieldInfo(
1055,
@ -592,7 +624,7 @@ google_protobuf_descriptor_pb.FieldOptions.extensions[1055] = proto.google.api.r
/**
* A tuple of {field number, class constructor} for the extension
* field named `resourceDefinitionList`.
* @type {!jspb.ExtensionFieldInfo.<!Array.<!proto.google.api.ResourceDescriptor>>}
* @type {!jspb.ExtensionFieldInfo<!Array<!proto.google.api.ResourceDescriptor>>}
*/
proto.google.api.resourceDefinitionList = new jspb.ExtensionFieldInfo(
1053,
@ -617,7 +649,7 @@ google_protobuf_descriptor_pb.FileOptions.extensions[1053] = proto.google.api.re
/**
* A tuple of {field number, class constructor} for the extension
* field named `resource`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.ResourceDescriptor>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.ResourceDescriptor>}
*/
proto.google.api.resource = new jspb.ExtensionFieldInfo(
1053,

View File

@ -1,6 +1,9 @@
// source: google/api/routing.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,10 +13,10 @@ 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.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.google.api.RoutingParameter', null, global);
goog.exportSymbol('proto.google.api.RoutingRule', null, global);
goog.exportSymbol('proto.google.api.routing', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -29,8 +32,34 @@ proto.google.api.RoutingRule = function(opt_data) {
};
goog.inherits(proto.google.api.RoutingRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.RoutingRule.displayName = 'proto.google.api.RoutingRule';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.RoutingParameter.displayName = 'proto.google.api.RoutingParameter';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -42,13 +71,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -58,11 +89,12 @@ proto.google.api.RoutingRule.prototype.toObject = function(opt_includeInstance)
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.RoutingRule.toObject = function(includeInstance, msg) {
var f, obj = {
@ -107,8 +139,7 @@ proto.google.api.RoutingRule.deserializeBinaryFromReader = function(msg, reader)
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());
msg.addRoutingParameters(value);
break;
default:
reader.skipField();
@ -119,36 +150,27 @@ proto.google.api.RoutingRule.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.RoutingRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.RoutingRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.RoutingRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRoutingParametersList();
f = message.getRoutingParametersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -159,67 +181,58 @@ proto.google.api.RoutingRule.prototype.serializeBinaryToWriter = function (write
};
/**
* 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>}
* @return {!Array<!proto.google.api.RoutingParameter>}
*/
proto.google.api.RoutingRule.prototype.getRoutingParametersList = function() {
return /** @type{!Array.<!proto.google.api.RoutingParameter>} */ (
return /** @type{!Array<!proto.google.api.RoutingParameter>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.RoutingParameter, 2));
};
/** @param {Array.<!proto.google.api.RoutingParameter>} value */
/**
* @param {!Array<!proto.google.api.RoutingParameter>} value
* @return {!proto.google.api.RoutingRule} returns this
*/
proto.google.api.RoutingRule.prototype.setRoutingParametersList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
return 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
* @param {!proto.google.api.RoutingParameter=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.RoutingParameter}
*/
proto.google.api.RoutingParameter = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.RoutingRule.prototype.addRoutingParameters = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.RoutingParameter, opt_index);
};
goog.inherits(proto.google.api.RoutingParameter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.RoutingParameter.displayName = 'proto.google.api.RoutingParameter';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.RoutingRule} returns this
*/
proto.google.api.RoutingRule.prototype.clearRoutingParametersList = function() {
return this.setRoutingParametersList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -229,16 +242,17 @@ proto.google.api.RoutingParameter.prototype.toObject = function(opt_includeInsta
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.RoutingParameter.toObject = function(includeInstance, msg) {
var f, obj = {
field: msg.getField(),
pathTemplate: msg.getPathTemplate()
field: jspb.Message.getFieldWithDefault(msg, 1, ""),
pathTemplate: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -292,43 +306,34 @@ proto.google.api.RoutingParameter.deserializeBinaryFromReader = function(msg, re
};
/**
* 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);
proto.google.api.RoutingParameter.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.RoutingParameter.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.RoutingParameter.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getField();
f = message.getField();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getPathTemplate();
f = message.getPathTemplate();
if (f.length > 0) {
writer.writeString(
2,
@ -338,27 +343,21 @@ proto.google.api.RoutingParameter.prototype.serializeBinaryToWriter = function (
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.RoutingParameter} returns this
*/
proto.google.api.RoutingParameter.prototype.setField = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -367,13 +366,16 @@ proto.google.api.RoutingParameter.prototype.setField = function(value) {
* @return {string}
*/
proto.google.api.RoutingParameter.prototype.getPathTemplate = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.RoutingParameter} returns this
*/
proto.google.api.RoutingParameter.prototype.setPathTemplate = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -381,7 +383,7 @@ proto.google.api.RoutingParameter.prototype.setPathTemplate = function(value) {
/**
* A tuple of {field number, class constructor} for the extension
* field named `routing`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.RoutingRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.RoutingRule>}
*/
proto.google.api.routing = new jspb.ExtensionFieldInfo(
72295729,

View File

@ -5,6 +5,7 @@ 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_client_pb from "../../google/api/client_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";
@ -136,6 +137,11 @@ export class Service extends jspb.Message {
getSourceInfo(): google_api_source_info_pb.SourceInfo | undefined;
setSourceInfo(value?: google_api_source_info_pb.SourceInfo): void;
hasPublishing(): boolean;
clearPublishing(): void;
getPublishing(): google_api_client_pb.Publishing | undefined;
setPublishing(value?: google_api_client_pb.Publishing): void;
hasConfigVersion(): boolean;
clearConfigVersion(): void;
getConfigVersion(): google_protobuf_wrappers_pb.UInt32Value | undefined;
@ -177,6 +183,7 @@ export namespace Service {
monitoring?: google_api_monitoring_pb.Monitoring.AsObject,
systemParameters?: google_api_system_parameter_pb.SystemParameters.AsObject,
sourceInfo?: google_api_source_info_pb.SourceInfo.AsObject,
publishing?: google_api_client_pb.Publishing.AsObject,
configVersion?: google_protobuf_wrappers_pb.UInt32Value.AsObject,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,9 @@
// source: google/api/source_info.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,8 +13,8 @@ var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.google.api.SourceInfo', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -27,8 +30,13 @@ proto.google.api.SourceInfo = function(opt_data) {
};
goog.inherits(proto.google.api.SourceInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.SourceInfo.displayName = 'proto.google.api.SourceInfo';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +48,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,11 +66,12 @@ proto.google.api.SourceInfo.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SourceInfo.toObject = function(includeInstance, msg) {
var f, obj = {
@ -105,8 +116,7 @@ proto.google.api.SourceInfo.deserializeBinaryFromReader = function(msg, reader)
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());
msg.addSourceFiles(value);
break;
default:
reader.skipField();
@ -117,36 +127,27 @@ proto.google.api.SourceInfo.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.SourceInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SourceInfo.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.SourceInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSourceFilesList();
f = message.getSourceFilesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -157,35 +158,41 @@ proto.google.api.SourceInfo.prototype.serializeBinaryToWriter = function (writer
};
/**
* 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>}
* @return {!Array<!proto.google.protobuf.Any>}
*/
proto.google.api.SourceInfo.prototype.getSourceFilesList = function() {
return /** @type{!Array.<!proto.google.protobuf.Any>} */ (
return /** @type{!Array<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1));
};
/** @param {Array.<!proto.google.protobuf.Any>} value */
/**
* @param {!Array<!proto.google.protobuf.Any>} value
* @return {!proto.google.api.SourceInfo} returns this
*/
proto.google.api.SourceInfo.prototype.setSourceFilesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.protobuf.Any=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Any}
*/
proto.google.api.SourceInfo.prototype.addSourceFiles = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.SourceInfo} returns this
*/
proto.google.api.SourceInfo.prototype.clearSourceFilesList = function() {
this.setSourceFilesList([]);
return this.setSourceFilesList([]);
};

View File

@ -1,6 +1,9 @@
// source: google/api/system_parameter.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -12,7 +15,6 @@ 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
@ -28,8 +30,55 @@ proto.google.api.SystemParameters = function(opt_data) {
};
goog.inherits(proto.google.api.SystemParameters, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.SystemParameters.displayName = 'proto.google.api.SystemParameters';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.SystemParameterRule.displayName = 'proto.google.api.SystemParameterRule';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.SystemParameter.displayName = 'proto.google.api.SystemParameter';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -41,13 +90,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -57,11 +108,12 @@ proto.google.api.SystemParameters.prototype.toObject = function(opt_includeInsta
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameters.toObject = function(includeInstance, msg) {
var f, obj = {
@ -106,8 +158,7 @@ proto.google.api.SystemParameters.deserializeBinaryFromReader = function(msg, re
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());
msg.addRules(value);
break;
default:
reader.skipField();
@ -118,36 +169,27 @@ proto.google.api.SystemParameters.deserializeBinaryFromReader = function(msg, re
};
/**
* 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);
proto.google.api.SystemParameters.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameters.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.SystemParameters.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -158,56 +200,45 @@ proto.google.api.SystemParameters.prototype.serializeBinaryToWriter = function (
};
/**
* 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>}
* @return {!Array<!proto.google.api.SystemParameterRule>}
*/
proto.google.api.SystemParameters.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.SystemParameterRule>} */ (
return /** @type{!Array<!proto.google.api.SystemParameterRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.SystemParameterRule, 1));
};
/** @param {Array.<!proto.google.api.SystemParameterRule>} value */
/**
* @param {!Array<!proto.google.api.SystemParameterRule>} value
* @return {!proto.google.api.SystemParameters} returns this
*/
proto.google.api.SystemParameters.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return 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
* @param {!proto.google.api.SystemParameterRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.SystemParameterRule}
*/
proto.google.api.SystemParameterRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.SystemParameterRule.repeatedFields_, null);
proto.google.api.SystemParameters.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.SystemParameterRule, opt_index);
};
goog.inherits(proto.google.api.SystemParameterRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SystemParameterRule.displayName = 'proto.google.api.SystemParameterRule';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.SystemParameters} returns this
*/
proto.google.api.SystemParameters.prototype.clearRulesList = function() {
return this.setRulesList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -219,13 +250,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -235,15 +268,16 @@ proto.google.api.SystemParameterRule.prototype.toObject = function(opt_includeIn
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameterRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
parametersList: jspb.Message.toObjectList(msg.getParametersList(),
proto.google.api.SystemParameter.toObject, includeInstance)
};
@ -289,8 +323,7 @@ proto.google.api.SystemParameterRule.deserializeBinaryFromReader = function(msg,
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());
msg.addParameters(value);
break;
default:
reader.skipField();
@ -301,43 +334,34 @@ proto.google.api.SystemParameterRule.deserializeBinaryFromReader = function(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);
proto.google.api.SystemParameterRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameterRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.SystemParameterRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getParametersList();
f = message.getParametersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
@ -348,82 +372,76 @@ proto.google.api.SystemParameterRule.prototype.serializeBinaryToWriter = functio
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.SystemParameterRule} returns this
*/
proto.google.api.SystemParameterRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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>}
* @return {!Array<!proto.google.api.SystemParameter>}
*/
proto.google.api.SystemParameterRule.prototype.getParametersList = function() {
return /** @type{!Array.<!proto.google.api.SystemParameter>} */ (
return /** @type{!Array<!proto.google.api.SystemParameter>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.SystemParameter, 2));
};
/** @param {Array.<!proto.google.api.SystemParameter>} value */
/**
* @param {!Array<!proto.google.api.SystemParameter>} value
* @return {!proto.google.api.SystemParameterRule} returns this
*/
proto.google.api.SystemParameterRule.prototype.setParametersList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
return 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
* @param {!proto.google.api.SystemParameter=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.SystemParameter}
*/
proto.google.api.SystemParameter = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.SystemParameterRule.prototype.addParameters = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.SystemParameter, opt_index);
};
goog.inherits(proto.google.api.SystemParameter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.SystemParameter.displayName = 'proto.google.api.SystemParameter';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.SystemParameterRule} returns this
*/
proto.google.api.SystemParameterRule.prototype.clearParametersList = function() {
return this.setParametersList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -433,17 +451,18 @@ proto.google.api.SystemParameter.prototype.toObject = function(opt_includeInstan
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameter.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
httpHeader: msg.getHttpHeader(),
urlQueryParameter: msg.getUrlQueryParameter()
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
httpHeader: jspb.Message.getFieldWithDefault(msg, 2, ""),
urlQueryParameter: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@ -501,50 +520,41 @@ proto.google.api.SystemParameter.deserializeBinaryFromReader = function(msg, rea
};
/**
* 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);
proto.google.api.SystemParameter.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.SystemParameter.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.SystemParameter.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getName();
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getHttpHeader();
f = message.getHttpHeader();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getUrlQueryParameter();
f = message.getUrlQueryParameter();
if (f.length > 0) {
writer.writeString(
3,
@ -554,27 +564,21 @@ proto.google.api.SystemParameter.prototype.serializeBinaryToWriter = function (w
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.SystemParameter} returns this
*/
proto.google.api.SystemParameter.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -583,13 +587,16 @@ proto.google.api.SystemParameter.prototype.setName = function(value) {
* @return {string}
*/
proto.google.api.SystemParameter.prototype.getHttpHeader = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.SystemParameter} returns this
*/
proto.google.api.SystemParameter.prototype.setHttpHeader = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -598,13 +605,16 @@ proto.google.api.SystemParameter.prototype.setHttpHeader = function(value) {
* @return {string}
*/
proto.google.api.SystemParameter.prototype.getUrlQueryParameter = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.SystemParameter} returns this
*/
proto.google.api.SystemParameter.prototype.setUrlQueryParameter = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3StringField(this, 3, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/usage.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -11,7 +14,6 @@ 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
@ -27,8 +29,34 @@ proto.google.api.Usage = function(opt_data) {
};
goog.inherits(proto.google.api.Usage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Usage.displayName = 'proto.google.api.Usage';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.UsageRule.displayName = 'proto.google.api.UsageRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -40,13 +68,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -56,18 +86,19 @@ proto.google.api.Usage.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Usage.toObject = function(includeInstance, msg) {
var f, obj = {
requirementsList: jspb.Message.getField(msg, 1),
requirementsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
proto.google.api.UsageRule.toObject, includeInstance),
producerNotificationChannel: msg.getProducerNotificationChannel()
producerNotificationChannel: jspb.Message.getFieldWithDefault(msg, 7, "")
};
if (includeInstance) {
@ -106,14 +137,12 @@ proto.google.api.Usage.deserializeBinaryFromReader = function(msg, reader) {
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.getRequirementsList().push(value);
msg.setRequirementsList(msg.getRequirementsList());
msg.addRequirements(value);
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());
msg.addRules(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
@ -128,43 +157,34 @@ proto.google.api.Usage.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.Usage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Usage.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Usage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRequirementsList();
f = message.getRequirementsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
@ -172,7 +192,7 @@ proto.google.api.Usage.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.UsageRule.serializeBinaryToWriter
);
}
f = this.getProducerNotificationChannel();
f = message.getProducerNotificationChannel();
if (f.length > 0) {
writer.writeString(
7,
@ -183,56 +203,77 @@ proto.google.api.Usage.prototype.serializeBinaryToWriter = function (writer) {
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.google.api.Usage} The clone.
* repeated string requirements = 1;
* @return {!Array<string>}
*/
proto.google.api.Usage.prototype.cloneMessage = function() {
return /** @type {!proto.google.api.Usage} */ (jspb.Message.cloneMessage(this));
proto.google.api.Usage.prototype.getRequirementsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* 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>}
* @param {!Array<string>} value
* @return {!proto.google.api.Usage} returns this
*/
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 || []);
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.api.Usage} returns this
*/
proto.google.api.Usage.prototype.addRequirements = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Usage} returns this
*/
proto.google.api.Usage.prototype.clearRequirementsList = function() {
jspb.Message.setField(this, 1, []);
return this.setRequirementsList([]);
};
/**
* 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>}
* @return {!Array<!proto.google.api.UsageRule>}
*/
proto.google.api.Usage.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.UsageRule>} */ (
return /** @type{!Array<!proto.google.api.UsageRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.UsageRule, 6));
};
/** @param {Array.<!proto.google.api.UsageRule>} value */
/**
* @param {!Array<!proto.google.api.UsageRule>} value
* @return {!proto.google.api.Usage} returns this
*/
proto.google.api.Usage.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 6, value);
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.google.api.UsageRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.UsageRule}
*/
proto.google.api.Usage.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.api.UsageRule, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Usage} returns this
*/
proto.google.api.Usage.prototype.clearRulesList = function() {
this.setRulesList([]);
return this.setRulesList([]);
};
@ -241,45 +282,33 @@ proto.google.api.Usage.prototype.clearRulesList = function() {
* @return {string}
*/
proto.google.api.Usage.prototype.getProducerNotificationChannel = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(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
* @param {string} value
* @return {!proto.google.api.Usage} returns this
*/
proto.google.api.UsageRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.Usage.prototype.setProducerNotificationChannel = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -289,17 +318,18 @@ proto.google.api.UsageRule.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.UsageRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
allowUnregisteredCalls: msg.getAllowUnregisteredCalls(),
skipServiceControl: msg.getSkipServiceControl()
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
allowUnregisteredCalls: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
skipServiceControl: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
if (includeInstance) {
@ -357,50 +387,41 @@ proto.google.api.UsageRule.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* 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);
proto.google.api.UsageRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.UsageRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.UsageRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getAllowUnregisteredCalls();
f = message.getAllowUnregisteredCalls();
if (f) {
writer.writeBool(
2,
f
);
}
f = this.getSkipServiceControl();
f = message.getSkipServiceControl();
if (f) {
writer.writeBool(
3,
@ -410,61 +431,57 @@ proto.google.api.UsageRule.prototype.serializeBinaryToWriter = function (writer)
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.UsageRule} returns this
*/
proto.google.api.UsageRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(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));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};
/** @param {boolean} value */
/**
* @param {boolean} value
* @return {!proto.google.api.UsageRule} returns this
*/
proto.google.api.UsageRule.prototype.setAllowUnregisteredCalls = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3BooleanField(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));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/** @param {boolean} value */
/**
* @param {boolean} value
* @return {!proto.google.api.UsageRule} returns this
*/
proto.google.api.UsageRule.prototype.setSkipServiceControl = function(value) {
jspb.Message.setField(this, 3, value);
return jspb.Message.setProto3BooleanField(this, 3, value);
};

View File

@ -1,6 +1,9 @@
// source: google/api/visibility.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,15 +13,15 @@ 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.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.google.api.Visibility', null, global);
goog.exportSymbol('proto.google.api.VisibilityRule', null, global);
goog.exportSymbol('proto.google.api.apiVisibility', null, global);
goog.exportSymbol('proto.google.api.enumVisibility', null, global);
goog.exportSymbol('proto.google.api.fieldVisibility', null, global);
goog.exportSymbol('proto.google.api.messageVisibility', null, global);
goog.exportSymbol('proto.google.api.methodVisibility', null, global);
goog.exportSymbol('proto.google.api.valueVisibility', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -34,8 +37,34 @@ proto.google.api.Visibility = function(opt_data) {
};
goog.inherits(proto.google.api.Visibility, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Visibility.displayName = 'proto.google.api.Visibility';
}
/**
* 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) {
/**
* @public
* @override
*/
proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -47,13 +76,15 @@ 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.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -63,11 +94,12 @@ proto.google.api.Visibility.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Visibility.toObject = function(includeInstance, msg) {
var f, obj = {
@ -112,8 +144,7 @@ proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader)
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());
msg.addRules(value);
break;
default:
reader.skipField();
@ -124,36 +155,27 @@ proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader)
};
/**
* 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);
proto.google.api.Visibility.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Visibility.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.Visibility.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getRulesList();
f = message.getRulesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
@ -164,67 +186,58 @@ proto.google.api.Visibility.prototype.serializeBinaryToWriter = function (writer
};
/**
* 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>}
* @return {!Array<!proto.google.api.VisibilityRule>}
*/
proto.google.api.Visibility.prototype.getRulesList = function() {
return /** @type{!Array.<!proto.google.api.VisibilityRule>} */ (
return /** @type{!Array<!proto.google.api.VisibilityRule>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.VisibilityRule, 1));
};
/** @param {Array.<!proto.google.api.VisibilityRule>} value */
/**
* @param {!Array<!proto.google.api.VisibilityRule>} value
* @return {!proto.google.api.Visibility} returns this
*/
proto.google.api.Visibility.prototype.setRulesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
return 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
* @param {!proto.google.api.VisibilityRule=} opt_value
* @param {number=} opt_index
* @return {!proto.google.api.VisibilityRule}
*/
proto.google.api.VisibilityRule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.google.api.Visibility.prototype.addRules = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.VisibilityRule, opt_index);
};
goog.inherits(proto.google.api.VisibilityRule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule';
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Visibility} returns this
*/
proto.google.api.Visibility.prototype.clearRulesList = function() {
return this.setRulesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. 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) {
@ -234,16 +247,17 @@ proto.google.api.VisibilityRule.prototype.toObject = function(opt_includeInstanc
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. 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}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.VisibilityRule.toObject = function(includeInstance, msg) {
var f, obj = {
selector: msg.getSelector(),
restriction: msg.getRestriction()
selector: jspb.Message.getFieldWithDefault(msg, 1, ""),
restriction: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@ -297,43 +311,34 @@ proto.google.api.VisibilityRule.deserializeBinaryFromReader = function(msg, read
};
/**
* 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);
proto.google.api.VisibilityRule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* 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
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.VisibilityRule.prototype.serializeBinaryToWriter = function (writer) {
proto.google.api.VisibilityRule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getSelector();
f = message.getSelector();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getRestriction();
f = message.getRestriction();
if (f.length > 0) {
writer.writeString(
2,
@ -343,27 +348,21 @@ proto.google.api.VisibilityRule.prototype.serializeBinaryToWriter = function (wr
};
/**
* 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, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.VisibilityRule} returns this
*/
proto.google.api.VisibilityRule.prototype.setSelector = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -372,13 +371,16 @@ proto.google.api.VisibilityRule.prototype.setSelector = function(value) {
* @return {string}
*/
proto.google.api.VisibilityRule.prototype.getRestriction = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.google.api.VisibilityRule} returns this
*/
proto.google.api.VisibilityRule.prototype.setRestriction = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -386,7 +388,7 @@ proto.google.api.VisibilityRule.prototype.setRestriction = function(value) {
/**
* A tuple of {field number, class constructor} for the extension
* field named `enumVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.enumVisibility = new jspb.ExtensionFieldInfo(
72295727,
@ -411,7 +413,7 @@ google_protobuf_descriptor_pb.EnumOptions.extensions[72295727] = proto.google.ap
/**
* A tuple of {field number, class constructor} for the extension
* field named `valueVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.valueVisibility = new jspb.ExtensionFieldInfo(
72295727,
@ -436,7 +438,7 @@ google_protobuf_descriptor_pb.EnumValueOptions.extensions[72295727] = proto.goog
/**
* A tuple of {field number, class constructor} for the extension
* field named `fieldVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.fieldVisibility = new jspb.ExtensionFieldInfo(
72295727,
@ -461,7 +463,7 @@ google_protobuf_descriptor_pb.FieldOptions.extensions[72295727] = proto.google.a
/**
* A tuple of {field number, class constructor} for the extension
* field named `messageVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.messageVisibility = new jspb.ExtensionFieldInfo(
72295727,
@ -486,7 +488,7 @@ google_protobuf_descriptor_pb.MessageOptions.extensions[72295727] = proto.google
/**
* A tuple of {field number, class constructor} for the extension
* field named `methodVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.methodVisibility = new jspb.ExtensionFieldInfo(
72295727,
@ -511,7 +513,7 @@ google_protobuf_descriptor_pb.MethodOptions.extensions[72295727] = proto.google.
/**
* A tuple of {field number, class constructor} for the extension
* field named `apiVisibility`.
* @type {!jspb.ExtensionFieldInfo.<!proto.google.api.VisibilityRule>}
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.VisibilityRule>}
*/
proto.google.api.apiVisibility = new jspb.ExtensionFieldInfo(
72295727,

15
api/js/gw/gw_pb.d.ts vendored
View File

@ -305,8 +305,8 @@ export class GatewayStats extends jspb.Message {
getTxPacketsEmitted(): number;
setTxPacketsEmitted(value: number): void;
getMetaDataMap(): jspb.Map<string, string>;
clearMetaDataMap(): void;
getMetadataMap(): jspb.Map<string, string>;
clearMetadataMap(): void;
getTxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearTxPacketsPerFrequencyMap(): void;
getRxPacketsPerFrequencyMap(): jspb.Map<number, number>;
@ -344,7 +344,7 @@ export namespace GatewayStats {
rxPacketsReceivedOk: number,
txPacketsReceived: number,
txPacketsEmitted: number,
metaDataMap: Array<[string, string]>,
metadataMap: Array<[string, string]>,
txPacketsPerFrequencyMap: Array<[number, number]>,
rxPacketsPerFrequencyMap: Array<[number, number]>,
txPacketsPerModulationList: Array<PerModulationCount.AsObject>,
@ -535,11 +535,8 @@ export class UplinkRxInfo extends jspb.Message {
getContext_asB64(): string;
setContext(value: Uint8Array | string): void;
hasMetadata(): boolean;
clearMetadata(): void;
getMetadata(): google_protobuf_struct_pb.Struct | undefined;
setMetadata(value?: google_protobuf_struct_pb.Struct): void;
getMetadataMap(): jspb.Map<string, string>;
clearMetadataMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UplinkRxInfo.AsObject;
static toObject(includeInstance: boolean, msg: UplinkRxInfo): UplinkRxInfo.AsObject;
@ -565,7 +562,7 @@ export namespace UplinkRxInfo {
antenna: number,
location?: common_common_pb.Location.AsObject,
context: Uint8Array | string,
metadata?: google_protobuf_struct_pb.Struct.AsObject,
metadataMap: Array<[string, string]>,
}
}

5351
api/js/gw/gw_pb.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

375
api/js/meta/meta_pb.js vendored
View File

@ -1,6 +1,9 @@
// source: meta/meta.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
@ -10,10 +13,11 @@ var goog = jspb;
var global = Function('return this')();
var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
goog.exportSymbol('proto.meta.DownlinkMeta', null, global);
goog.exportSymbol('proto.meta.UplinkMeta', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -29,8 +33,34 @@ proto.meta.UplinkMeta = function(opt_data) {
};
goog.inherits(proto.meta.UplinkMeta, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.meta.UplinkMeta.displayName = 'proto.meta.UplinkMeta';
}
/**
* 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.meta.DownlinkMeta = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.meta.DownlinkMeta, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.meta.DownlinkMeta.displayName = 'proto.meta.DownlinkMeta';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
@ -42,13 +72,15 @@ proto.meta.UplinkMeta.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.meta.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
@ -58,22 +90,23 @@ proto.meta.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.meta.UplinkMeta} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.UplinkMeta.toObject = function(includeInstance, msg) {
var f, obj = {
devEui: msg.getDevEui(),
devEui: jspb.Message.getFieldWithDefault(msg, 1, ""),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.toObject(includeInstance, f),
rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
gw_gw_pb.UplinkRxInfo.toObject, includeInstance),
phyPayloadByteCount: msg.getPhyPayloadByteCount(),
macCommandByteCount: msg.getMacCommandByteCount(),
applicationPayloadByteCount: msg.getApplicationPayloadByteCount(),
messageType: msg.getMessageType()
phyPayloadByteCount: jspb.Message.getFieldWithDefault(msg, 4, 0),
macCommandByteCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
applicationPayloadByteCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
messageType: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
@ -122,8 +155,7 @@ proto.meta.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
case 3:
var value = new gw_gw_pb.UplinkRxInfo;
reader.readMessage(value,gw_gw_pb.UplinkRxInfo.deserializeBinaryFromReader);
msg.getRxInfoList().push(value);
msg.setRxInfoList(msg.getRxInfoList());
msg.addRxInfo(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint32());
@ -150,43 +182,34 @@ proto.meta.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.meta.UplinkMeta} message
* @param {!jspb.BinaryWriter} writer
*/
proto.meta.UplinkMeta.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.meta.UplinkMeta.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.meta.UplinkMeta.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.meta.UplinkMeta} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
proto.meta.UplinkMeta.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getDevEui();
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getTxInfo();
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
2,
@ -194,7 +217,7 @@ proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
gw_gw_pb.UplinkTxInfo.serializeBinaryToWriter
);
}
f = this.getRxInfoList();
f = message.getRxInfoList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
@ -202,28 +225,28 @@ proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
gw_gw_pb.UplinkRxInfo.serializeBinaryToWriter
);
}
f = this.getPhyPayloadByteCount();
f = message.getPhyPayloadByteCount();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
f = this.getMacCommandByteCount();
f = message.getMacCommandByteCount();
if (f !== 0) {
writer.writeUint32(
5,
f
);
}
f = this.getApplicationPayloadByteCount();
f = message.getApplicationPayloadByteCount();
if (f !== 0) {
writer.writeUint32(
6,
f
);
}
f = this.getMessageType();
f = message.getMessageType();
if (f !== 0.0) {
writer.writeEnum(
7,
@ -233,54 +256,55 @@ proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.meta.UplinkMeta} The clone.
*/
proto.meta.UplinkMeta.prototype.cloneMessage = function() {
return /** @type {!proto.meta.UplinkMeta} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string dev_eui = 1;
* @return {string}
*/
proto.meta.UplinkMeta.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setDevEui = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional gw.UplinkTxInfo tx_info = 2;
* @return {proto.gw.UplinkTxInfo}
* @return {?proto.gw.UplinkTxInfo}
*/
proto.meta.UplinkMeta.prototype.getTxInfo = function() {
return /** @type{proto.gw.UplinkTxInfo} */ (
return /** @type{?proto.gw.UplinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTxInfo, 2));
};
/** @param {proto.gw.UplinkTxInfo|undefined} value */
/**
* @param {?proto.gw.UplinkTxInfo|undefined} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setTxInfo = function(value) {
jspb.Message.setWrapperField(this, 2, value);
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.clearTxInfo = function() {
this.setTxInfo(undefined);
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.meta.UplinkMeta.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 2) != null;
@ -289,24 +313,39 @@ proto.meta.UplinkMeta.prototype.hasTxInfo = function() {
/**
* repeated gw.UplinkRxInfo rx_info = 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.gw.UplinkRxInfo>}
* @return {!Array<!proto.gw.UplinkRxInfo>}
*/
proto.meta.UplinkMeta.prototype.getRxInfoList = function() {
return /** @type{!Array.<!proto.gw.UplinkRxInfo>} */ (
return /** @type{!Array<!proto.gw.UplinkRxInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRxInfo, 3));
};
/** @param {Array.<!proto.gw.UplinkRxInfo>} value */
/**
* @param {!Array<!proto.gw.UplinkRxInfo>} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setRxInfoList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.gw.UplinkRxInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.gw.UplinkRxInfo}
*/
proto.meta.UplinkMeta.prototype.addRxInfo = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gw.UplinkRxInfo, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.clearRxInfoList = function() {
this.setRxInfoList([]);
return this.setRxInfoList([]);
};
@ -315,13 +354,16 @@ proto.meta.UplinkMeta.prototype.clearRxInfoList = function() {
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getPhyPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setPhyPayloadByteCount = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -330,13 +372,16 @@ proto.meta.UplinkMeta.prototype.setPhyPayloadByteCount = function(value) {
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getMacCommandByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setMacCommandByteCount = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3IntField(this, 5, value);
};
@ -345,13 +390,16 @@ proto.meta.UplinkMeta.prototype.setMacCommandByteCount = function(value) {
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getApplicationPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3IntField(this, 6, value);
};
@ -360,45 +408,33 @@ proto.meta.UplinkMeta.prototype.setApplicationPayloadByteCount = function(value)
* @return {!proto.common.MType}
*/
proto.meta.UplinkMeta.prototype.getMessageType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldProto3(this, 7, 0));
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {!proto.common.MType} value */
proto.meta.UplinkMeta.prototype.setMessageType = 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
* @param {!proto.common.MType} value
* @return {!proto.meta.UplinkMeta} returns this
*/
proto.meta.DownlinkMeta = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
proto.meta.UplinkMeta.prototype.setMessageType = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
goog.inherits(proto.meta.DownlinkMeta, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.meta.DownlinkMeta.displayName = 'proto.meta.DownlinkMeta';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* 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
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.meta.DownlinkMeta.prototype.toObject = function(opt_includeInstance) {
@ -408,22 +444,23 @@ proto.meta.DownlinkMeta.prototype.toObject = function(opt_includeInstance) {
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.meta.DownlinkMeta} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.DownlinkMeta.toObject = function(includeInstance, msg) {
var f, obj = {
devEui: msg.getDevEui(),
multicastGroupId: msg.getMulticastGroupId(),
devEui: jspb.Message.getFieldWithDefault(msg, 1, ""),
multicastGroupId: jspb.Message.getFieldWithDefault(msg, 2, ""),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTxInfo.toObject(includeInstance, f),
phyPayloadByteCount: msg.getPhyPayloadByteCount(),
macCommandByteCount: msg.getMacCommandByteCount(),
applicationPayloadByteCount: msg.getApplicationPayloadByteCount(),
messageType: msg.getMessageType(),
gatewayId: msg.getGatewayId()
phyPayloadByteCount: jspb.Message.getFieldWithDefault(msg, 4, 0),
macCommandByteCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
applicationPayloadByteCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
messageType: jspb.Message.getFieldWithDefault(msg, 7, 0),
gatewayId: jspb.Message.getFieldWithDefault(msg, 8, "")
};
if (includeInstance) {
@ -502,50 +539,41 @@ proto.meta.DownlinkMeta.deserializeBinaryFromReader = function(msg, reader) {
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.meta.DownlinkMeta} message
* @param {!jspb.BinaryWriter} writer
*/
proto.meta.DownlinkMeta.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.meta.DownlinkMeta.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
proto.meta.DownlinkMeta.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.meta.DownlinkMeta} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.DownlinkMeta.prototype.serializeBinaryToWriter = function (writer) {
proto.meta.DownlinkMeta.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = this.getDevEui();
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getMulticastGroupId();
f = message.getMulticastGroupId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getTxInfo();
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
3,
@ -553,35 +581,35 @@ proto.meta.DownlinkMeta.prototype.serializeBinaryToWriter = function (writer) {
gw_gw_pb.DownlinkTxInfo.serializeBinaryToWriter
);
}
f = this.getPhyPayloadByteCount();
f = message.getPhyPayloadByteCount();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
f = this.getMacCommandByteCount();
f = message.getMacCommandByteCount();
if (f !== 0) {
writer.writeUint32(
5,
f
);
}
f = this.getApplicationPayloadByteCount();
f = message.getApplicationPayloadByteCount();
if (f !== 0) {
writer.writeUint32(
6,
f
);
}
f = this.getMessageType();
f = message.getMessageType();
if (f !== 0.0) {
writer.writeEnum(
7,
f
);
}
f = this.getGatewayId();
f = message.getGatewayId();
if (f.length > 0) {
writer.writeString(
8,
@ -591,27 +619,21 @@ proto.meta.DownlinkMeta.prototype.serializeBinaryToWriter = function (writer) {
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.meta.DownlinkMeta} The clone.
*/
proto.meta.DownlinkMeta.prototype.cloneMessage = function() {
return /** @type {!proto.meta.DownlinkMeta} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string dev_eui = 1;
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setDevEui = function(value) {
jspb.Message.setField(this, 1, value);
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -620,40 +642,50 @@ proto.meta.DownlinkMeta.prototype.setDevEui = function(value) {
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getMulticastGroupId = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMulticastGroupId = function(value) {
jspb.Message.setField(this, 2, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional gw.DownlinkTxInfo tx_info = 3;
* @return {proto.gw.DownlinkTxInfo}
* @return {?proto.gw.DownlinkTxInfo}
*/
proto.meta.DownlinkMeta.prototype.getTxInfo = function() {
return /** @type{proto.gw.DownlinkTxInfo} */ (
return /** @type{?proto.gw.DownlinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTxInfo, 3));
};
/** @param {proto.gw.DownlinkTxInfo|undefined} value */
/**
* @param {?proto.gw.DownlinkTxInfo|undefined} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setTxInfo = function(value) {
jspb.Message.setWrapperField(this, 3, value);
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.clearTxInfo = function() {
this.setTxInfo(undefined);
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
* @return {boolean}
*/
proto.meta.DownlinkMeta.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 3) != null;
@ -665,13 +697,16 @@ proto.meta.DownlinkMeta.prototype.hasTxInfo = function() {
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getPhyPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setPhyPayloadByteCount = function(value) {
jspb.Message.setField(this, 4, value);
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -680,13 +715,16 @@ proto.meta.DownlinkMeta.prototype.setPhyPayloadByteCount = function(value) {
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getMacCommandByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMacCommandByteCount = function(value) {
jspb.Message.setField(this, 5, value);
return jspb.Message.setProto3IntField(this, 5, value);
};
@ -695,13 +733,16 @@ proto.meta.DownlinkMeta.prototype.setMacCommandByteCount = function(value) {
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getApplicationPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0));
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
jspb.Message.setField(this, 6, value);
return jspb.Message.setProto3IntField(this, 6, value);
};
@ -710,13 +751,16 @@ proto.meta.DownlinkMeta.prototype.setApplicationPayloadByteCount = function(valu
* @return {!proto.common.MType}
*/
proto.meta.DownlinkMeta.prototype.getMessageType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldProto3(this, 7, 0));
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {!proto.common.MType} value */
/**
* @param {!proto.common.MType} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMessageType = function(value) {
jspb.Message.setField(this, 7, value);
return jspb.Message.setProto3EnumField(this, 7, value);
};
@ -725,13 +769,16 @@ proto.meta.DownlinkMeta.prototype.setMessageType = function(value) {
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/** @param {string} value */
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setGatewayId = function(value) {
jspb.Message.setField(this, 8, value);
return jspb.Message.setProto3StringField(this, 8, value);
};

View File

@ -224,7 +224,7 @@ message GatewayStats {
uint32 tx_packets_emitted = 8;
// Additional gateway meta-data.
map<string, string> meta_data = 10;
map<string, string> metadata = 10;
// Tx packets per frequency.
map<uint32, uint32> tx_packets_per_frequency = 12;
@ -350,8 +350,8 @@ message UplinkRxInfo {
// This value must be returned to the gateway on (Class-A) downlink.
bytes context = 13;
// Properties.
google.protobuf.Struct metadata = 14;
// Additional gateway meta-data.
map<string, string> metadata = 15;
}
message DownlinkTxInfoLegacy {

File diff suppressed because one or more lines are too long

View File

@ -224,7 +224,7 @@ message GatewayStats {
uint32 tx_packets_emitted = 8;
// Additional gateway meta-data.
map<string, string> meta_data = 10;
map<string, string> metadata = 10;
// Tx packets per frequency.
map<uint32, uint32> tx_packets_per_frequency = 12;
@ -350,8 +350,8 @@ message UplinkRxInfo {
// This value must be returned to the gateway on (Class-A) downlink.
bytes context = 13;
// Properties.
google.protobuf.Struct metadata = 14;
// Additional gateway meta-data.
map<string, string> metadata = 15;
}
message DownlinkTxInfoLegacy {

47
api/rust/src/gw.rs vendored
View File

@ -127,58 +127,13 @@ impl UplinkFrame {
antenna: rx_info.antenna,
location: rx_info.location.clone(),
context: rx_info.context.clone(),
metadata: Some(pbjson_types::Struct {
fields: rx_info
.metadata
.iter()
.map(|(k, v)| {
(
k.to_string(),
pbjson_types::Value {
kind: Some(pbjson_types::value::Kind::StringValue(
v.to_string(),
)),
},
)
})
.collect(),
}),
metadata: rx_info.metadata.clone(),
});
}
}
}
}
impl UplinkRxInfo {
pub fn get_metadata_string(&self, k: &str) -> Option<String> {
if let Some(v) = &self.metadata {
if let Some(v) = v.fields.get(k) {
if let Some(pbjson_types::value::Kind::StringValue(v)) = &v.kind {
return Some(v.clone());
}
}
}
None
}
pub fn set_metadata_string(&mut self, k: &str, v: &str) {
if self.metadata.is_none() {
self.metadata = Some(pbjson_types::Struct {
..Default::default()
});
}
if let Some(md) = &mut self.metadata {
md.fields.insert(
k.to_string(),
pbjson_types::Value {
kind: Some(pbjson_types::value::Kind::StringValue(v.to_string())),
},
);
}
}
}
impl DownlinkFrame {
pub fn v4_migrate(&mut self) {
self.gateway_id_legacy = hex::decode(&self.gateway_id).unwrap();

View File

@ -43,12 +43,16 @@ impl Data {
}
let region_name = uplink_rx_info[0]
.get_metadata_string("region_name")
.ok_or_else(|| anyhow!("No region_name in metadata"))?;
.metadata
.get("region_name")
.cloned()
.unwrap_or_default();
let region_common_name = uplink_rx_info[0]
.get_metadata_string("region_common_name")
.ok_or_else(|| anyhow!("No region_common_name in metadata"))?;
.metadata
.get("region_common_name")
.cloned()
.unwrap_or_default();
let region_common_name = CommonName::from_str(&region_common_name)?;
let mut ctx = Data {

View File

@ -336,8 +336,13 @@ async fn message_callback(region_name: &str, region_common_name: CommonName, msg
if let Some(rx_info) = &mut event.rx_info {
set_gateway_json(&rx_info.gateway_id, json);
rx_info.set_metadata_string("region_name", region_name);
rx_info.set_metadata_string("region_common_name", &region_common_name.to_string());
rx_info
.metadata
.insert("region_name".to_string(), region_name.to_string());
rx_info.metadata.insert(
"region_common_name".to_string(),
region_common_name.to_string(),
);
}
tokio::spawn(uplink::deduplicate_uplink(event));
@ -353,9 +358,9 @@ async fn message_callback(region_name: &str, region_common_name: CommonName, msg
};
event.v4_migrate();
event
.meta_data
.metadata
.insert("region_name".to_string(), region_name.to_string());
event.meta_data.insert(
event.metadata.insert(
"region_common_name".to_string(),
region_common_name.to_string(),
);

View File

@ -154,7 +154,7 @@ impl RedisPipeline {
}
RedisPipeline::ClusterPipeline(p) => {
if let RedisPoolConnection::ClusterClient(c) = con {
p.query(&mut **c)
p.query(c)
} else {
panic!("Mismatch between RedisPipeline and RedisPoolConnection")
}

View File

@ -73,11 +73,11 @@ pub async fn save(ds: &internal::PassiveRoamingDeviceSession) -> Result<()> {
.ignore()
.cmd("PEXPIRE")
.arg(&dev_addr_key)
.arg(&ttl)
.arg(ttl)
.ignore()
.cmd("PEXPIRE")
.arg(&dev_eui_key)
.arg(&ttl)
.arg(ttl)
.ignore()
.cmd("PSETEX")
.arg(&sess_key)

View File

@ -68,8 +68,12 @@ async fn test_fns_uplink() {
}),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -293,8 +297,12 @@ async fn test_sns_uplink() {
time: Some(recv_time.into()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -457,8 +465,12 @@ async fn test_sns_dev_not_found() {
time: Some(recv_time.into()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,

View File

@ -101,16 +101,24 @@ async fn test_gateway_filtering() {
location: Some(Default::default()),
..Default::default()
};
rx_info_a.set_metadata_string("region_name", "eu868");
rx_info_a.set_metadata_string("region_common_name", "EU868");
rx_info_a
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info_a
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut rx_info_b = gw::UplinkRxInfo {
gateway_id: gw_b.gateway_id.to_string(),
location: Some(Default::default()),
..Default::default()
};
rx_info_b.set_metadata_string("region_name", "eu868");
rx_info_b.set_metadata_string("region_common_name", "EU868");
rx_info_b
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info_b
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -252,8 +260,12 @@ async fn test_lorawan_10_errors() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -443,8 +455,12 @@ async fn test_lorawan_11_errors() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info_freq = gw::UplinkTxInfo {
frequency: 868300000,
@ -593,8 +609,12 @@ async fn test_lorawan_10_skip_f_cnt() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -782,8 +802,12 @@ async fn test_lorawan_10_device_disabled() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -901,8 +925,12 @@ async fn test_lorawan_10_uplink() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -1516,8 +1544,12 @@ async fn test_lorawan_11_uplink() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -1750,8 +1782,12 @@ async fn test_lorawan_10_rx_delay() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -1959,8 +1995,12 @@ async fn test_lorawan_10_mac_commands() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -2324,8 +2364,12 @@ async fn test_lorawan_11_mac_commands() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -2514,8 +2558,12 @@ async fn test_lorawan_10_device_queue() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -2983,8 +3031,12 @@ async fn test_lorawan_11_device_queue() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -3456,8 +3508,12 @@ async fn test_lorawan_10_adr() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -4294,8 +4350,12 @@ async fn test_lorawan_10_device_status_request() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -4553,8 +4613,12 @@ async fn test_lorawan_11_receive_window_selection() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,

View File

@ -88,8 +88,12 @@ async fn test_uplink() {
gateway_id: gw.gateway_id.to_string(),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,

View File

@ -70,8 +70,12 @@ async fn test_fns() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -331,8 +335,12 @@ async fn test_sns() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,

View File

@ -109,16 +109,24 @@ async fn test_gateway_filtering() {
location: Some(Default::default()),
..Default::default()
};
rx_info_a.set_metadata_string("region_name", "eu868");
rx_info_a.set_metadata_string("region_common_name", "EU868");
rx_info_a
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info_a
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut rx_info_b = gw::UplinkRxInfo {
gateway_id: gw_b.gateway_id.to_string(),
location: Some(Default::default()),
..Default::default()
};
rx_info_b.set_metadata_string("region_name", "eu868");
rx_info_b.set_metadata_string("region_common_name", "EU868");
rx_info_b
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info_b
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -272,8 +280,12 @@ async fn test_lorawan_10() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,
@ -916,8 +928,12 @@ async fn test_lorawan_11() {
location: Some(Default::default()),
..Default::default()
};
rx_info.set_metadata_string("region_name", "eu868");
rx_info.set_metadata_string("region_common_name", "EU868");
rx_info
.metadata
.insert("region_name".to_string(), "eu868".to_string());
rx_info
.metadata
.insert("region_common_name".to_string(), "EU868".to_string());
let mut tx_info = gw::UplinkTxInfo {
frequency: 868100000,

View File

@ -249,12 +249,16 @@ pub async fn handle_uplink(deduplication_id: Uuid, uplink: gw::UplinkFrameSet) -
.context("Unable to get first item from rx_info")?;
let region_name = rx_info
.get_metadata_string("region_name")
.ok_or_else(|| anyhow!("No region_name in metadata"))?;
.metadata
.get("region_name")
.cloned()
.unwrap_or_default();
let common_name = rx_info
.get_metadata_string("region_common_name")
.ok_or_else(|| anyhow!("No region_common_name in metadata"))?;
.metadata
.get("region_common_name")
.cloned()
.unwrap_or_default();
let common_name = CommonName::from_str(&common_name)?;
@ -346,7 +350,9 @@ fn filter_rx_info_by_tenant_id(tenant_id: &Uuid, uplink: &mut UplinkFrameSet) ->
for rx_info in &uplink.rx_info_set {
let gateway_id = EUI64::from_str(&rx_info.gateway_id)?;
let region_name = rx_info
.get_metadata_string("region_name")
.metadata
.get("region_name")
.map(|v| v.to_string())
.ok_or_else(|| anyhow!("No region_name in rx_info metadata"))?;
let force_gws_private = config::get_force_gws_private(&region_name)?;

View File

@ -64,14 +64,14 @@ impl Stats {
loc.latitude,
loc.longitude,
loc.altitude as f32,
&self.stats.meta_data,
&self.stats.metadata,
)
.await
.context("Update gateway state")?,
);
} else {
self.gateway = Some(
gateway::update_state(&self.gateway_id, &self.stats.meta_data)
gateway::update_state(&self.gateway_id, &self.stats.metadata)
.await
.context("Update gateway state")?,
);
@ -94,7 +94,7 @@ impl Stats {
let region_name = self
.stats
.meta_data
.metadata
.get("region_name")
.ok_or_else(|| anyhow!("No region_name in meta-data"))?;
@ -142,7 +142,7 @@ impl Stats {
async fn update_gateway_configuration(&self) -> Result<()> {
trace!("Updating gateway configuration");
if !self.stats.meta_data.contains_key("concentratord_version") {
if !self.stats.metadata.contains_key("concentratord_version") {
trace!("Gateway configuration only works with Concentratord, skipping");
return Ok(());
}
@ -150,7 +150,7 @@ impl Stats {
let gw = self.gateway.as_ref().unwrap();
let region_name = self
.stats
.meta_data
.metadata
.get("region_name")
.cloned()
.unwrap_or_default();
@ -164,7 +164,7 @@ impl Stats {
// get gw config version
let gw_config_version = self
.stats
.meta_data
.metadata
.get("config_version")
.cloned()
.unwrap_or_default();