12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187 |
- "use strict";
- var $protobuf = require("protobufjs/minimal");
- var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
- var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
- $root.GeoCoordiantes = (function() {
-
-
- function GeoCoordiantes(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- GeoCoordiantes.prototype.latitude = 0;
-
- GeoCoordiantes.prototype.longitude = 0;
-
- GeoCoordiantes.create = function create(properties) {
- return new GeoCoordiantes(properties);
- };
-
- GeoCoordiantes.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
- writer.uint32(29).float(message.latitude);
- if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
- writer.uint32(37).float(message.longitude);
- return writer;
- };
-
- GeoCoordiantes.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- GeoCoordiantes.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.GeoCoordiantes();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 3:
- message.latitude = reader.float();
- break;
- case 4:
- message.longitude = reader.float();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- GeoCoordiantes.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- GeoCoordiantes.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.latitude != null && message.hasOwnProperty("latitude"))
- if (typeof message.latitude !== "number")
- return "latitude: number expected";
- if (message.longitude != null && message.hasOwnProperty("longitude"))
- if (typeof message.longitude !== "number")
- return "longitude: number expected";
- return null;
- };
-
- GeoCoordiantes.fromObject = function fromObject(object) {
- if (object instanceof $root.GeoCoordiantes)
- return object;
- var message = new $root.GeoCoordiantes();
- if (object.latitude != null)
- message.latitude = Number(object.latitude);
- if (object.longitude != null)
- message.longitude = Number(object.longitude);
- return message;
- };
-
- GeoCoordiantes.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.latitude = 0;
- object.longitude = 0;
- }
- if (message.latitude != null && message.hasOwnProperty("latitude"))
- object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
- if (message.longitude != null && message.hasOwnProperty("longitude"))
- object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
- return object;
- };
-
- GeoCoordiantes.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return GeoCoordiantes;
- })();
- $root.NodeLocationMetadata = (function() {
-
-
- function NodeLocationMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- NodeLocationMetadata.prototype.countryCode = "";
-
- NodeLocationMetadata.prototype.city = "";
-
- NodeLocationMetadata.prototype.coordinates = null;
-
- NodeLocationMetadata.create = function create(properties) {
- return new NodeLocationMetadata(properties);
- };
-
- NodeLocationMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode"))
- writer.uint32(10).string(message.countryCode);
- if (message.city != null && Object.hasOwnProperty.call(message, "city"))
- writer.uint32(18).string(message.city);
- if (message.coordinates != null && Object.hasOwnProperty.call(message, "coordinates"))
- $root.GeoCoordiantes.encode(message.coordinates, writer.uint32(26).fork()).ldelim();
- return writer;
- };
-
- NodeLocationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- NodeLocationMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.NodeLocationMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.countryCode = reader.string();
- break;
- case 2:
- message.city = reader.string();
- break;
- case 3:
- message.coordinates = $root.GeoCoordiantes.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- NodeLocationMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- NodeLocationMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.countryCode != null && message.hasOwnProperty("countryCode"))
- if (!$util.isString(message.countryCode))
- return "countryCode: string expected";
- if (message.city != null && message.hasOwnProperty("city"))
- if (!$util.isString(message.city))
- return "city: string expected";
- if (message.coordinates != null && message.hasOwnProperty("coordinates")) {
- var error = $root.GeoCoordiantes.verify(message.coordinates);
- if (error)
- return "coordinates." + error;
- }
- return null;
- };
-
- NodeLocationMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.NodeLocationMetadata)
- return object;
- var message = new $root.NodeLocationMetadata();
- if (object.countryCode != null)
- message.countryCode = String(object.countryCode);
- if (object.city != null)
- message.city = String(object.city);
- if (object.coordinates != null) {
- if (typeof object.coordinates !== "object")
- throw TypeError(".NodeLocationMetadata.coordinates: object expected");
- message.coordinates = $root.GeoCoordiantes.fromObject(object.coordinates);
- }
- return message;
- };
-
- NodeLocationMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.countryCode = "";
- object.city = "";
- object.coordinates = null;
- }
- if (message.countryCode != null && message.hasOwnProperty("countryCode"))
- object.countryCode = message.countryCode;
- if (message.city != null && message.hasOwnProperty("city"))
- object.city = message.city;
- if (message.coordinates != null && message.hasOwnProperty("coordinates"))
- object.coordinates = $root.GeoCoordiantes.toObject(message.coordinates, options);
- return object;
- };
-
- NodeLocationMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return NodeLocationMetadata;
- })();
- $root.StorageBucketOperatorMetadata = (function() {
-
-
- function StorageBucketOperatorMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- StorageBucketOperatorMetadata.prototype.endpoint = "";
-
- StorageBucketOperatorMetadata.prototype.location = null;
-
- StorageBucketOperatorMetadata.prototype.extra = "";
-
- StorageBucketOperatorMetadata.create = function create(properties) {
- return new StorageBucketOperatorMetadata(properties);
- };
-
- StorageBucketOperatorMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint"))
- writer.uint32(10).string(message.endpoint);
- if (message.location != null && Object.hasOwnProperty.call(message, "location"))
- $root.NodeLocationMetadata.encode(message.location, writer.uint32(18).fork()).ldelim();
- if (message.extra != null && Object.hasOwnProperty.call(message, "extra"))
- writer.uint32(26).string(message.extra);
- return writer;
- };
-
- StorageBucketOperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- StorageBucketOperatorMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StorageBucketOperatorMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.endpoint = reader.string();
- break;
- case 2:
- message.location = $root.NodeLocationMetadata.decode(reader, reader.uint32());
- break;
- case 3:
- message.extra = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- StorageBucketOperatorMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- StorageBucketOperatorMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.endpoint != null && message.hasOwnProperty("endpoint"))
- if (!$util.isString(message.endpoint))
- return "endpoint: string expected";
- if (message.location != null && message.hasOwnProperty("location")) {
- var error = $root.NodeLocationMetadata.verify(message.location);
- if (error)
- return "location." + error;
- }
- if (message.extra != null && message.hasOwnProperty("extra"))
- if (!$util.isString(message.extra))
- return "extra: string expected";
- return null;
- };
-
- StorageBucketOperatorMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.StorageBucketOperatorMetadata)
- return object;
- var message = new $root.StorageBucketOperatorMetadata();
- if (object.endpoint != null)
- message.endpoint = String(object.endpoint);
- if (object.location != null) {
- if (typeof object.location !== "object")
- throw TypeError(".StorageBucketOperatorMetadata.location: object expected");
- message.location = $root.NodeLocationMetadata.fromObject(object.location);
- }
- if (object.extra != null)
- message.extra = String(object.extra);
- return message;
- };
-
- StorageBucketOperatorMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.endpoint = "";
- object.location = null;
- object.extra = "";
- }
- if (message.endpoint != null && message.hasOwnProperty("endpoint"))
- object.endpoint = message.endpoint;
- if (message.location != null && message.hasOwnProperty("location"))
- object.location = $root.NodeLocationMetadata.toObject(message.location, options);
- if (message.extra != null && message.hasOwnProperty("extra"))
- object.extra = message.extra;
- return object;
- };
-
- StorageBucketOperatorMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return StorageBucketOperatorMetadata;
- })();
- $root.DistributionBucketOperatorMetadata = (function() {
-
-
- function DistributionBucketOperatorMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- DistributionBucketOperatorMetadata.prototype.endpoint = "";
-
- DistributionBucketOperatorMetadata.prototype.location = null;
-
- DistributionBucketOperatorMetadata.prototype.extra = "";
-
- DistributionBucketOperatorMetadata.create = function create(properties) {
- return new DistributionBucketOperatorMetadata(properties);
- };
-
- DistributionBucketOperatorMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint"))
- writer.uint32(10).string(message.endpoint);
- if (message.location != null && Object.hasOwnProperty.call(message, "location"))
- $root.NodeLocationMetadata.encode(message.location, writer.uint32(18).fork()).ldelim();
- if (message.extra != null && Object.hasOwnProperty.call(message, "extra"))
- writer.uint32(26).string(message.extra);
- return writer;
- };
-
- DistributionBucketOperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- DistributionBucketOperatorMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DistributionBucketOperatorMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.endpoint = reader.string();
- break;
- case 2:
- message.location = $root.NodeLocationMetadata.decode(reader, reader.uint32());
- break;
- case 3:
- message.extra = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- DistributionBucketOperatorMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- DistributionBucketOperatorMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.endpoint != null && message.hasOwnProperty("endpoint"))
- if (!$util.isString(message.endpoint))
- return "endpoint: string expected";
- if (message.location != null && message.hasOwnProperty("location")) {
- var error = $root.NodeLocationMetadata.verify(message.location);
- if (error)
- return "location." + error;
- }
- if (message.extra != null && message.hasOwnProperty("extra"))
- if (!$util.isString(message.extra))
- return "extra: string expected";
- return null;
- };
-
- DistributionBucketOperatorMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.DistributionBucketOperatorMetadata)
- return object;
- var message = new $root.DistributionBucketOperatorMetadata();
- if (object.endpoint != null)
- message.endpoint = String(object.endpoint);
- if (object.location != null) {
- if (typeof object.location !== "object")
- throw TypeError(".DistributionBucketOperatorMetadata.location: object expected");
- message.location = $root.NodeLocationMetadata.fromObject(object.location);
- }
- if (object.extra != null)
- message.extra = String(object.extra);
- return message;
- };
-
- DistributionBucketOperatorMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.endpoint = "";
- object.location = null;
- object.extra = "";
- }
- if (message.endpoint != null && message.hasOwnProperty("endpoint"))
- object.endpoint = message.endpoint;
- if (message.location != null && message.hasOwnProperty("location"))
- object.location = $root.NodeLocationMetadata.toObject(message.location, options);
- if (message.extra != null && message.hasOwnProperty("extra"))
- object.extra = message.extra;
- return object;
- };
-
- DistributionBucketOperatorMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return DistributionBucketOperatorMetadata;
- })();
- $root.DistributionBucketFamilyMetadata = (function() {
-
-
- function DistributionBucketFamilyMetadata(properties) {
- this.boundary = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- DistributionBucketFamilyMetadata.prototype.region = "";
-
- DistributionBucketFamilyMetadata.prototype.description = "";
-
- DistributionBucketFamilyMetadata.prototype.boundary = $util.emptyArray;
-
- DistributionBucketFamilyMetadata.create = function create(properties) {
- return new DistributionBucketFamilyMetadata(properties);
- };
-
- DistributionBucketFamilyMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.region != null && Object.hasOwnProperty.call(message, "region"))
- writer.uint32(10).string(message.region);
- if (message.description != null && Object.hasOwnProperty.call(message, "description"))
- writer.uint32(18).string(message.description);
- if (message.boundary != null && message.boundary.length)
- for (var i = 0; i < message.boundary.length; ++i)
- $root.GeoCoordiantes.encode(message.boundary[i], writer.uint32(26).fork()).ldelim();
- return writer;
- };
-
- DistributionBucketFamilyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- DistributionBucketFamilyMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DistributionBucketFamilyMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.region = reader.string();
- break;
- case 2:
- message.description = reader.string();
- break;
- case 3:
- if (!(message.boundary && message.boundary.length))
- message.boundary = [];
- message.boundary.push($root.GeoCoordiantes.decode(reader, reader.uint32()));
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- DistributionBucketFamilyMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- DistributionBucketFamilyMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.region != null && message.hasOwnProperty("region"))
- if (!$util.isString(message.region))
- return "region: string expected";
- if (message.description != null && message.hasOwnProperty("description"))
- if (!$util.isString(message.description))
- return "description: string expected";
- if (message.boundary != null && message.hasOwnProperty("boundary")) {
- if (!Array.isArray(message.boundary))
- return "boundary: array expected";
- for (var i = 0; i < message.boundary.length; ++i) {
- var error = $root.GeoCoordiantes.verify(message.boundary[i]);
- if (error)
- return "boundary." + error;
- }
- }
- return null;
- };
-
- DistributionBucketFamilyMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.DistributionBucketFamilyMetadata)
- return object;
- var message = new $root.DistributionBucketFamilyMetadata();
- if (object.region != null)
- message.region = String(object.region);
- if (object.description != null)
- message.description = String(object.description);
- if (object.boundary) {
- if (!Array.isArray(object.boundary))
- throw TypeError(".DistributionBucketFamilyMetadata.boundary: array expected");
- message.boundary = [];
- for (var i = 0; i < object.boundary.length; ++i) {
- if (typeof object.boundary[i] !== "object")
- throw TypeError(".DistributionBucketFamilyMetadata.boundary: object expected");
- message.boundary[i] = $root.GeoCoordiantes.fromObject(object.boundary[i]);
- }
- }
- return message;
- };
-
- DistributionBucketFamilyMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.boundary = [];
- if (options.defaults) {
- object.region = "";
- object.description = "";
- }
- if (message.region != null && message.hasOwnProperty("region"))
- object.region = message.region;
- if (message.description != null && message.hasOwnProperty("description"))
- object.description = message.description;
- if (message.boundary && message.boundary.length) {
- object.boundary = [];
- for (var j = 0; j < message.boundary.length; ++j)
- object.boundary[j] = $root.GeoCoordiantes.toObject(message.boundary[j], options);
- }
- return object;
- };
-
- DistributionBucketFamilyMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return DistributionBucketFamilyMetadata;
- })();
- module.exports = $root;
|