yandex-cloud
Version:
Yandex Cloud SDK
1,230 lines • 111 kB
JavaScript
module.exports = (function() {
const $protobuf = require('protobufjs');
const grpc = require('grpc');
const registar = require('../../../lib/registar.js');
const util = require('../../../lib/util.js');
const yc = require('../../../index.js');
const $Reader = $protobuf.Reader;
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
(function($root) {
$root.Duration = (function() {
function Duration(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
Duration.prototype.nanos = 0;
Duration.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.seconds != null && m.hasOwnProperty('seconds')) w.uint32(8).int64(m.seconds);
if (m.nanos != null && m.hasOwnProperty('nanos')) w.uint32(16).int32(m.nanos);
return w;
};
Duration.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Duration();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.seconds = r.int64();
break;
case 2:
m.nanos = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Duration;
})();
})(root);
(function($root) {
$root.Any = (function() {
function Any(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Any.prototype.type_url = '';
Any.prototype.value = $util.newBuffer([]);
Any.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.type_url != null && m.hasOwnProperty('type_url')) w.uint32(10).string(m.type_url);
if (m.value != null && m.hasOwnProperty('value')) w.uint32(18).bytes(m.value);
return w;
};
Any.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Any();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.type_url = r.string();
break;
case 2:
m.value = r.bytes();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Any;
})();
})(root);
(function($root) {
$root.Timestamp = (function() {
function Timestamp(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
Timestamp.prototype.nanos = 0;
Timestamp.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.seconds != null && m.hasOwnProperty('seconds')) w.uint32(8).int64(m.seconds);
if (m.nanos != null && m.hasOwnProperty('nanos')) w.uint32(16).int32(m.nanos);
return w;
};
Timestamp.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Timestamp();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.seconds = r.int64();
break;
case 2:
m.nanos = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Timestamp;
})();
})(root);
(function($root) {
$root.FieldMask = (function() {
function FieldMask(p) {
this.paths = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
FieldMask.prototype.paths = $util.emptyArray;
FieldMask.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.paths != null && m.paths.length) {
for (let i = 0; i < m.paths.length; ++i) w.uint32(10).string(m.paths[i]);
}
return w;
};
FieldMask.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.FieldMask();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
if (!(m.paths && m.paths.length)) m.paths = [];
m.paths.push(r.string());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return FieldMask;
})();
})(root);
(function($root) {
$root.DoubleValue = (function() {
function DoubleValue(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
DoubleValue.prototype.value = 0;
DoubleValue.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(9).double(m.value);
return w;
};
DoubleValue.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.DoubleValue();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.double();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return DoubleValue;
})();
})(root);
(function($root) {
$root.FloatValue = (function() {
function FloatValue(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
FloatValue.prototype.value = 0;
FloatValue.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(13).float(m.value);
return w;
};
FloatValue.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.FloatValue();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.float();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return FloatValue;
})();
})(root);
(function($root) {
$root.Int64Value = (function() {
function Int64Value(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
Int64Value.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(8).int64(m.value);
return w;
};
Int64Value.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Int64Value();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.int64();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Int64Value;
})();
})(root);
(function($root) {
$root.UInt64Value = (function() {
function UInt64Value(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
UInt64Value.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(8).uint64(m.value);
return w;
};
UInt64Value.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.UInt64Value();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.uint64();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return UInt64Value;
})();
})(root);
(function($root) {
$root.Int32Value = (function() {
function Int32Value(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Int32Value.prototype.value = 0;
Int32Value.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(8).int32(m.value);
return w;
};
Int32Value.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Int32Value();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Int32Value;
})();
})(root);
(function($root) {
$root.UInt32Value = (function() {
function UInt32Value(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
UInt32Value.prototype.value = 0;
UInt32Value.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(8).uint32(m.value);
return w;
};
UInt32Value.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.UInt32Value();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.uint32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return UInt32Value;
})();
})(root);
(function($root) {
$root.BoolValue = (function() {
function BoolValue(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
BoolValue.prototype.value = false;
BoolValue.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(8).bool(m.value);
return w;
};
BoolValue.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.BoolValue();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.bool();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return BoolValue;
})();
})(root);
(function($root) {
$root.StringValue = (function() {
function StringValue(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
StringValue.prototype.value = '';
StringValue.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(10).string(m.value);
return w;
};
StringValue.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.StringValue();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.string();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return StringValue;
})();
})(root);
(function($root) {
$root.BytesValue = (function() {
function BytesValue(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
BytesValue.prototype.value = $util.newBuffer([]);
BytesValue.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.value != null && m.hasOwnProperty('value')) w.uint32(10).bytes(m.value);
return w;
};
BytesValue.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.BytesValue();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.value = r.bytes();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return BytesValue;
})();
})(root);
(function($root) {
$root.Api = (function() {
function Api(p) {
this.methods = [];
this.options = [];
this.mixins = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Api.prototype.name = '';
Api.prototype.methods = $util.emptyArray;
Api.prototype.options = $util.emptyArray;
Api.prototype.version = '';
Api.prototype.sourceContext = null;
Api.prototype.mixins = $util.emptyArray;
Api.prototype.syntax = 0;
Api.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.methods != null && m.methods.length) {
for (let i = 0; i < m.methods.length; ++i) $root.contrib.google.protobuf.Method.encode(m.methods[i], w.uint32(18).fork()).ldelim();
}
if (m.options != null && m.options.length) {
for (let i = 0; i < m.options.length; ++i) $root.contrib.google.protobuf.Option.encode(m.options[i], w.uint32(26).fork()).ldelim();
}
if (m.version != null && m.hasOwnProperty('version')) w.uint32(34).string(m.version);
if (m.sourceContext != null && m.hasOwnProperty('sourceContext')) $root.contrib.google.protobuf.SourceContext.encode(m.sourceContext, w.uint32(42).fork()).ldelim();
if (m.mixins != null && m.mixins.length) {
for (let i = 0; i < m.mixins.length; ++i) $root.contrib.google.protobuf.Mixin.encode(m.mixins[i], w.uint32(50).fork()).ldelim();
}
if (m.syntax != null && m.hasOwnProperty('syntax')) w.uint32(56).int32(m.syntax);
return w;
};
Api.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Api();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
if (!(m.methods && m.methods.length)) m.methods = [];
m.methods.push($root.contrib.google.protobuf.Method.decode(r, r.uint32()));
break;
case 3:
if (!(m.options && m.options.length)) m.options = [];
m.options.push($root.contrib.google.protobuf.Option.decode(r, r.uint32()));
break;
case 4:
m.version = r.string();
break;
case 5:
m.sourceContext = $root.contrib.google.protobuf.SourceContext.decode(r, r.uint32());
break;
case 6:
if (!(m.mixins && m.mixins.length)) m.mixins = [];
m.mixins.push($root.contrib.google.protobuf.Mixin.decode(r, r.uint32()));
break;
case 7:
m.syntax = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Api;
})();
})(root);
(function($root) {
$root.Method = (function() {
function Method(p) {
this.options = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Method.prototype.name = '';
Method.prototype.requestTypeUrl = '';
Method.prototype.requestStreaming = false;
Method.prototype.responseTypeUrl = '';
Method.prototype.responseStreaming = false;
Method.prototype.options = $util.emptyArray;
Method.prototype.syntax = 0;
Method.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.requestTypeUrl != null && m.hasOwnProperty('requestTypeUrl')) w.uint32(18).string(m.requestTypeUrl);
if (m.requestStreaming != null && m.hasOwnProperty('requestStreaming')) w.uint32(24).bool(m.requestStreaming);
if (m.responseTypeUrl != null && m.hasOwnProperty('responseTypeUrl')) w.uint32(34).string(m.responseTypeUrl);
if (m.responseStreaming != null && m.hasOwnProperty('responseStreaming')) w.uint32(40).bool(m.responseStreaming);
if (m.options != null && m.options.length) {
for (let i = 0; i < m.options.length; ++i) $root.contrib.google.protobuf.Option.encode(m.options[i], w.uint32(50).fork()).ldelim();
}
if (m.syntax != null && m.hasOwnProperty('syntax')) w.uint32(56).int32(m.syntax);
return w;
};
Method.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Method();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
m.requestTypeUrl = r.string();
break;
case 3:
m.requestStreaming = r.bool();
break;
case 4:
m.responseTypeUrl = r.string();
break;
case 5:
m.responseStreaming = r.bool();
break;
case 6:
if (!(m.options && m.options.length)) m.options = [];
m.options.push($root.contrib.google.protobuf.Option.decode(r, r.uint32()));
break;
case 7:
m.syntax = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Method;
})();
})(root);
(function($root) {
$root.Mixin = (function() {
function Mixin(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
Mixin.prototype.name = '';
Mixin.prototype.root = '';
Mixin.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.root != null && m.hasOwnProperty('root')) w.uint32(18).string(m.root);
return w;
};
Mixin.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.Mixin();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
m.root = r.string();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return Mixin;
})();
})(root);
(function($root) {
$root.FileDescriptorSet = (function() {
function FileDescriptorSet(p) {
this.file = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
FileDescriptorSet.prototype.file = $util.emptyArray;
FileDescriptorSet.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.file != null && m.file.length) {
for (let i = 0; i < m.file.length; ++i) $root.contrib.google.protobuf.FileDescriptorProto.encode(m.file[i], w.uint32(10).fork()).ldelim();
}
return w;
};
FileDescriptorSet.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.FileDescriptorSet();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
if (!(m.file && m.file.length)) m.file = [];
m.file.push($root.contrib.google.protobuf.FileDescriptorProto.decode(r, r.uint32()));
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return FileDescriptorSet;
})();
})(root);
(function($root) {
$root.FileDescriptorProto = (function() {
function FileDescriptorProto(p) {
this.dependency = [];
this.publicDependency = [];
this.weakDependency = [];
this.messageType = [];
this.enumType = [];
this.service = [];
this.extension = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
FileDescriptorProto.prototype.name = '';
FileDescriptorProto.prototype['package'] = '';
FileDescriptorProto.prototype.dependency = $util.emptyArray;
FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
FileDescriptorProto.prototype.messageType = $util.emptyArray;
FileDescriptorProto.prototype.enumType = $util.emptyArray;
FileDescriptorProto.prototype.service = $util.emptyArray;
FileDescriptorProto.prototype.extension = $util.emptyArray;
FileDescriptorProto.prototype.options = null;
FileDescriptorProto.prototype.sourceCodeInfo = null;
FileDescriptorProto.prototype.syntax = '';
FileDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m['package'] != null && m.hasOwnProperty('package')) w.uint32(18).string(m['package']);
if (m.dependency != null && m.dependency.length) {
for (let i = 0; i < m.dependency.length; ++i) w.uint32(26).string(m.dependency[i]);
}
if (m.messageType != null && m.messageType.length) {
for (let i = 0; i < m.messageType.length; ++i) $root.contrib.google.protobuf.DescriptorProto.encode(m.messageType[i], w.uint32(34).fork()).ldelim();
}
if (m.enumType != null && m.enumType.length) {
for (let i = 0; i < m.enumType.length; ++i) $root.contrib.google.protobuf.EnumDescriptorProto.encode(m.enumType[i], w.uint32(42).fork()).ldelim();
}
if (m.service != null && m.service.length) {
for (let i = 0; i < m.service.length; ++i) $root.contrib.google.protobuf.ServiceDescriptorProto.encode(m.service[i], w.uint32(50).fork()).ldelim();
}
if (m.extension != null && m.extension.length) {
for (let i = 0; i < m.extension.length; ++i) $root.contrib.google.protobuf.FieldDescriptorProto.encode(m.extension[i], w.uint32(58).fork()).ldelim();
}
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.FileOptions.encode(m.options, w.uint32(66).fork()).ldelim();
if (m.sourceCodeInfo != null && m.hasOwnProperty('sourceCodeInfo')) $root.contrib.google.protobuf.SourceCodeInfo.encode(m.sourceCodeInfo, w.uint32(74).fork()).ldelim();
if (m.publicDependency != null && m.publicDependency.length) {
for (let i = 0; i < m.publicDependency.length; ++i) w.uint32(80).int32(m.publicDependency[i]);
}
if (m.weakDependency != null && m.weakDependency.length) {
for (let i = 0; i < m.weakDependency.length; ++i) w.uint32(88).int32(m.weakDependency[i]);
}
if (m.syntax != null && m.hasOwnProperty('syntax')) w.uint32(98).string(m.syntax);
return w;
};
FileDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.FileDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
m['package'] = r.string();
break;
case 3:
if (!(m.dependency && m.dependency.length)) m.dependency = [];
m.dependency.push(r.string());
break;
case 10:
if (!(m.publicDependency && m.publicDependency.length)) m.publicDependency = [];
if ((t & 7) === 2) {
let c2 = r.uint32() + r.pos;
while (r.pos < c2) m.publicDependency.push(r.int32());
} else m.publicDependency.push(r.int32());
break;
case 11:
if (!(m.weakDependency && m.weakDependency.length)) m.weakDependency = [];
if ((t & 7) === 2) {
let c2 = r.uint32() + r.pos;
while (r.pos < c2) m.weakDependency.push(r.int32());
} else m.weakDependency.push(r.int32());
break;
case 4:
if (!(m.messageType && m.messageType.length)) m.messageType = [];
m.messageType.push($root.contrib.google.protobuf.DescriptorProto.decode(r, r.uint32()));
break;
case 5:
if (!(m.enumType && m.enumType.length)) m.enumType = [];
m.enumType.push($root.contrib.google.protobuf.EnumDescriptorProto.decode(r, r.uint32()));
break;
case 6:
if (!(m.service && m.service.length)) m.service = [];
m.service.push($root.contrib.google.protobuf.ServiceDescriptorProto.decode(r, r.uint32()));
break;
case 7:
if (!(m.extension && m.extension.length)) m.extension = [];
m.extension.push($root.contrib.google.protobuf.FieldDescriptorProto.decode(r, r.uint32()));
break;
case 8:
m.options = $root.contrib.google.protobuf.FileOptions.decode(r, r.uint32());
break;
case 9:
m.sourceCodeInfo = $root.contrib.google.protobuf.SourceCodeInfo.decode(r, r.uint32());
break;
case 12:
m.syntax = r.string();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return FileDescriptorProto;
})();
})(root);
(function($root) {
$root.DescriptorProto = (function() {
function DescriptorProto(p) {
this.field = [];
this.extension = [];
this.nestedType = [];
this.enumType = [];
this.extensionRange = [];
this.oneofDecl = [];
this.reservedRange = [];
this.reservedName = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
DescriptorProto.prototype.name = '';
DescriptorProto.prototype.field = $util.emptyArray;
DescriptorProto.prototype.extension = $util.emptyArray;
DescriptorProto.prototype.nestedType = $util.emptyArray;
DescriptorProto.prototype.enumType = $util.emptyArray;
DescriptorProto.prototype.extensionRange = $util.emptyArray;
DescriptorProto.prototype.oneofDecl = $util.emptyArray;
DescriptorProto.prototype.options = null;
DescriptorProto.prototype.reservedRange = $util.emptyArray;
DescriptorProto.prototype.reservedName = $util.emptyArray;
DescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.field != null && m.field.length) {
for (let i = 0; i < m.field.length; ++i) $root.contrib.google.protobuf.FieldDescriptorProto.encode(m.field[i], w.uint32(18).fork()).ldelim();
}
if (m.nestedType != null && m.nestedType.length) {
for (let i = 0; i < m.nestedType.length; ++i) $root.contrib.google.protobuf.DescriptorProto.encode(m.nestedType[i], w.uint32(26).fork()).ldelim();
}
if (m.enumType != null && m.enumType.length) {
for (let i = 0; i < m.enumType.length; ++i) $root.contrib.google.protobuf.EnumDescriptorProto.encode(m.enumType[i], w.uint32(34).fork()).ldelim();
}
if (m.extensionRange != null && m.extensionRange.length) {
for (let i = 0; i < m.extensionRange.length; ++i) $root.contrib.google.protobuf.DescriptorProto.ExtensionRange.encode(m.extensionRange[i], w.uint32(42).fork()).ldelim();
}
if (m.extension != null && m.extension.length) {
for (let i = 0; i < m.extension.length; ++i) $root.contrib.google.protobuf.FieldDescriptorProto.encode(m.extension[i], w.uint32(50).fork()).ldelim();
}
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.MessageOptions.encode(m.options, w.uint32(58).fork()).ldelim();
if (m.oneofDecl != null && m.oneofDecl.length) {
for (let i = 0; i < m.oneofDecl.length; ++i) $root.contrib.google.protobuf.OneofDescriptorProto.encode(m.oneofDecl[i], w.uint32(66).fork()).ldelim();
}
if (m.reservedRange != null && m.reservedRange.length) {
for (let i = 0; i < m.reservedRange.length; ++i) $root.contrib.google.protobuf.DescriptorProto.ReservedRange.encode(m.reservedRange[i], w.uint32(74).fork()).ldelim();
}
if (m.reservedName != null && m.reservedName.length) {
for (let i = 0; i < m.reservedName.length; ++i) w.uint32(82).string(m.reservedName[i]);
}
return w;
};
DescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.DescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
if (!(m.field && m.field.length)) m.field = [];
m.field.push($root.contrib.google.protobuf.FieldDescriptorProto.decode(r, r.uint32()));
break;
case 6:
if (!(m.extension && m.extension.length)) m.extension = [];
m.extension.push($root.contrib.google.protobuf.FieldDescriptorProto.decode(r, r.uint32()));
break;
case 3:
if (!(m.nestedType && m.nestedType.length)) m.nestedType = [];
m.nestedType.push($root.contrib.google.protobuf.DescriptorProto.decode(r, r.uint32()));
break;
case 4:
if (!(m.enumType && m.enumType.length)) m.enumType = [];
m.enumType.push($root.contrib.google.protobuf.EnumDescriptorProto.decode(r, r.uint32()));
break;
case 5:
if (!(m.extensionRange && m.extensionRange.length)) m.extensionRange = [];
m.extensionRange.push($root.contrib.google.protobuf.DescriptorProto.ExtensionRange.decode(r, r.uint32()));
break;
case 8:
if (!(m.oneofDecl && m.oneofDecl.length)) m.oneofDecl = [];
m.oneofDecl.push($root.contrib.google.protobuf.OneofDescriptorProto.decode(r, r.uint32()));
break;
case 7:
m.options = $root.contrib.google.protobuf.MessageOptions.decode(r, r.uint32());
break;
case 9:
if (!(m.reservedRange && m.reservedRange.length)) m.reservedRange = [];
m.reservedRange.push($root.contrib.google.protobuf.DescriptorProto.ReservedRange.decode(r, r.uint32()));
break;
case 10:
if (!(m.reservedName && m.reservedName.length)) m.reservedName = [];
m.reservedName.push(r.string());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
DescriptorProto.ExtensionRange = (function() {
function ExtensionRange(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
ExtensionRange.prototype.start = 0;
ExtensionRange.prototype.end = 0;
ExtensionRange.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.start != null && m.hasOwnProperty('start')) w.uint32(8).int32(m.start);
if (m.end != null && m.hasOwnProperty('end')) w.uint32(16).int32(m.end);
return w;
};
ExtensionRange.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.DescriptorProto.ExtensionRange();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.start = r.int32();
break;
case 2:
m.end = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return ExtensionRange;
})();
DescriptorProto.ReservedRange = (function() {
function ReservedRange(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
ReservedRange.prototype.start = 0;
ReservedRange.prototype.end = 0;
ReservedRange.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.start != null && m.hasOwnProperty('start')) w.uint32(8).int32(m.start);
if (m.end != null && m.hasOwnProperty('end')) w.uint32(16).int32(m.end);
return w;
};
ReservedRange.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.DescriptorProto.ReservedRange();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.start = r.int32();
break;
case 2:
m.end = r.int32();
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return ReservedRange;
})();
return DescriptorProto;
})();
})(root);
(function($root) {
$root.FieldDescriptorProto = (function() {
function FieldDescriptorProto(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
FieldDescriptorProto.prototype.name = '';
FieldDescriptorProto.prototype.number = 0;
FieldDescriptorProto.prototype.label = 1;
FieldDescriptorProto.prototype.type = 1;
FieldDescriptorProto.prototype.typeName = '';
FieldDescriptorProto.prototype.extendee = '';
FieldDescriptorProto.prototype.defaultValue = '';
FieldDescriptorProto.prototype.oneofIndex = 0;
FieldDescriptorProto.prototype.jsonName = '';
FieldDescriptorProto.prototype.options = null;
FieldDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.extendee != null && m.hasOwnProperty('extendee')) w.uint32(18).string(m.extendee);
if (m.number != null && m.hasOwnProperty('number')) w.uint32(24).int32(m.number);
if (m.label != null && m.hasOwnProperty('label')) w.uint32(32).int32(m.label);
if (m.type != null && m.hasOwnProperty('type')) w.uint32(40).int32(m.type);
if (m.typeName != null && m.hasOwnProperty('typeName')) w.uint32(50).string(m.typeName);
if (m.defaultValue != null && m.hasOwnProperty('defaultValue')) w.uint32(58).string(m.defaultValue);
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.FieldOptions.encode(m.options, w.uint32(66).fork()).ldelim();
if (m.oneofIndex != null && m.hasOwnProperty('oneofIndex')) w.uint32(72).int32(m.oneofIndex);
if (m.jsonName != null && m.hasOwnProperty('jsonName')) w.uint32(82).string(m.jsonName);
return w;
};
FieldDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.FieldDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 3:
m.number = r.int32();
break;
case 4:
m.label = r.int32();
break;
case 5:
m.type = r.int32();
break;
case 6:
m.typeName = r.string();
break;
case 2:
m.extendee = r.string();
break;
case 7:
m.defaultValue = r.string();
break;
case 9:
m.oneofIndex = r.int32();
break;
case 10:
m.jsonName = r.string();
break;
case 8:
m.options = $root.contrib.google.protobuf.FieldOptions.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
let Type = (function() {
let valuesById = {},
values = Object.create(valuesById);
values[(valuesById[1] = 'TYPE_DOUBLE')] = 1;
values[(valuesById[2] = 'TYPE_FLOAT')] = 2;
values[(valuesById[3] = 'TYPE_INT64')] = 3;
values[(valuesById[4] = 'TYPE_UINT64')] = 4;
values[(valuesById[5] = 'TYPE_INT32')] = 5;
values[(valuesById[6] = 'TYPE_FIXED64')] = 6;
values[(valuesById[7] = 'TYPE_FIXED32')] = 7;
values[(valuesById[8] = 'TYPE_BOOL')] = 8;
values[(valuesById[9] = 'TYPE_STRING')] = 9;
values[(valuesById[10] = 'TYPE_GROUP')] = 10;
values[(valuesById[11] = 'TYPE_MESSAGE')] = 11;
values[(valuesById[12] = 'TYPE_BYTES')] = 12;
values[(valuesById[13] = 'TYPE_UINT32')] = 13;
values[(valuesById[14] = 'TYPE_ENUM')] = 14;
values[(valuesById[15] = 'TYPE_SFIXED32')] = 15;
values[(valuesById[16] = 'TYPE_SFIXED64')] = 16;
values[(valuesById[17] = 'TYPE_SINT32')] = 17;
values[(valuesById[18] = 'TYPE_SINT64')] = 18;
return values;
})();
FieldDescriptorProto.Type = Type;
let Label = (function() {
let valuesById = {},
values = Object.create(valuesById);
values[(valuesById[1] = 'LABEL_OPTIONAL')] = 1;
values[(valuesById[2] = 'LABEL_REQUIRED')] = 2;
values[(valuesById[3] = 'LABEL_REPEATED')] = 3;
return values;
})();
FieldDescriptorProto.Label = Label;
return FieldDescriptorProto;
})();
})(root);
(function($root) {
$root.OneofDescriptorProto = (function() {
function OneofDescriptorProto(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
OneofDescriptorProto.prototype.name = '';
OneofDescriptorProto.prototype.options = null;
OneofDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.OneofOptions.encode(m.options, w.uint32(18).fork()).ldelim();
return w;
};
OneofDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.OneofDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
m.options = $root.contrib.google.protobuf.OneofOptions.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return OneofDescriptorProto;
})();
})(root);
(function($root) {
$root.EnumDescriptorProto = (function() {
function EnumDescriptorProto(p) {
this.value = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
EnumDescriptorProto.prototype.name = '';
EnumDescriptorProto.prototype.value = $util.emptyArray;
EnumDescriptorProto.prototype.options = null;
EnumDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.value != null && m.value.length) {
for (let i = 0; i < m.value.length; ++i) $root.contrib.google.protobuf.EnumValueDescriptorProto.encode(m.value[i], w.uint32(18).fork()).ldelim();
}
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.EnumOptions.encode(m.options, w.uint32(26).fork()).ldelim();
return w;
};
EnumDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.EnumDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
if (!(m.value && m.value.length)) m.value = [];
m.value.push($root.contrib.google.protobuf.EnumValueDescriptorProto.decode(r, r.uint32()));
break;
case 3:
m.options = $root.contrib.google.protobuf.EnumOptions.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return EnumDescriptorProto;
})();
})(root);
(function($root) {
$root.EnumValueDescriptorProto = (function() {
function EnumValueDescriptorProto(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
EnumValueDescriptorProto.prototype.name = '';
EnumValueDescriptorProto.prototype.number = 0;
EnumValueDescriptorProto.prototype.options = null;
EnumValueDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.number != null && m.hasOwnProperty('number')) w.uint32(16).int32(m.number);
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.EnumValueOptions.encode(m.options, w.uint32(26).fork()).ldelim();
return w;
};
EnumValueDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.EnumValueDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
m.number = r.int32();
break;
case 3:
m.options = $root.contrib.google.protobuf.EnumValueOptions.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return EnumValueDescriptorProto;
})();
})(root);
(function($root) {
$root.ServiceDescriptorProto = (function() {
function ServiceDescriptorProto(p) {
this.method = [];
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
ServiceDescriptorProto.prototype.name = '';
ServiceDescriptorProto.prototype.method = $util.emptyArray;
ServiceDescriptorProto.prototype.options = null;
ServiceDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.method != null && m.method.length) {
for (let i = 0; i < m.method.length; ++i) $root.contrib.google.protobuf.MethodDescriptorProto.encode(m.method[i], w.uint32(18).fork()).ldelim();
}
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.ServiceOptions.encode(m.options, w.uint32(26).fork()).ldelim();
return w;
};
ServiceDescriptorProto.decode = function decode(r, l) {
if (!(r instanceof $Reader)) r = $Reader.create(r);
let c = l === undefined ? r.len : r.pos + l,
m = new $root.contrib.google.protobuf.ServiceDescriptorProto();
while (r.pos < c) {
let t = r.uint32();
switch (t >>> 3) {
case 1:
m.name = r.string();
break;
case 2:
if (!(m.method && m.method.length)) m.method = [];
m.method.push($root.contrib.google.protobuf.MethodDescriptorProto.decode(r, r.uint32()));
break;
case 3:
m.options = $root.contrib.google.protobuf.ServiceOptions.decode(r, r.uint32());
break;
default:
r.skipType(t & 7);
break;
}
}
return m;
};
return ServiceDescriptorProto;
})();
})(root);
(function($root) {
$root.MethodDescriptorProto = (function() {
function MethodDescriptorProto(p) {
if (p) for (let ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
}
MethodDescriptorProto.prototype.name = '';
MethodDescriptorProto.prototype.inputType = '';
MethodDescriptorProto.prototype.outputType = '';
MethodDescriptorProto.prototype.options = null;
MethodDescriptorProto.prototype.clientStreaming = false;
MethodDescriptorProto.prototype.serverStreaming = false;
MethodDescriptorProto.encode = function encode(m, w) {
if (!w) w = $Writer.create();
if (m.name != null && m.hasOwnProperty('name')) w.uint32(10).string(m.name);
if (m.inputType != null && m.hasOwnProperty('inputType')) w.uint32(18).string(m.inputType);
if (m.outputType != null && m.hasOwnProperty('outputType')) w.uint32(26).string(m.outputType);
if (m.options != null && m.hasOwnProperty('options')) $root.contrib.google.protobuf.MethodOptions.encode(m.o