diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts new file mode 100644 index 0000000000..18b2187499 --- /dev/null +++ b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts @@ -0,0 +1,46 @@ +import * as grpcWeb from 'grpc-web'; + +import { + GetBuildReply, + GetBuildRequest, + ListBuildsReply, + ListBuildsRequest} from './builds_pb'; + +export class BuildsClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + listBuilds( + request: ListBuildsRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: ListBuildsReply) => void + ): grpcWeb.ClientReadableStream; + + getBuild( + request: GetBuildRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: GetBuildReply) => void + ): grpcWeb.ClientReadableStream; + +} + +export class BuildsPromiseClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + listBuilds( + request: ListBuildsRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + getBuild( + request: GetBuildRequest, + metadata?: grpcWeb.Metadata + ): Promise; + +} + diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js new file mode 100644 index 0000000000..b7b5369f0b --- /dev/null +++ b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js @@ -0,0 +1,233 @@ +/** + * @fileoverview gRPC-Web generated client stub for spotify.backstage.builds.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.spotify = {}; +proto.spotify.backstage = {}; +proto.spotify.backstage.builds = {}; +proto.spotify.backstage.builds.v1 = require('./builds_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.builds.v1.BuildsClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.builds.v1.BuildsPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.builds.v1.ListBuildsRequest, + * !proto.spotify.backstage.builds.v1.ListBuildsReply>} + */ +const methodDescriptor_Builds_ListBuilds = new grpc.web.MethodDescriptor( + '/spotify.backstage.builds.v1.Builds/ListBuilds', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.builds.v1.ListBuildsRequest, + proto.spotify.backstage.builds.v1.ListBuildsReply, + /** + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.builds.v1.ListBuildsRequest, + * !proto.spotify.backstage.builds.v1.ListBuildsReply>} + */ +const methodInfo_Builds_ListBuilds = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.builds.v1.ListBuildsReply, + /** + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.builds.v1.ListBuildsReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.builds.v1.BuildsClient.prototype.listBuilds = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.builds.v1.Builds/ListBuilds', + request, + metadata || {}, + methodDescriptor_Builds_ListBuilds, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.builds.v1.BuildsPromiseClient.prototype.listBuilds = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.builds.v1.Builds/ListBuilds', + request, + metadata || {}, + methodDescriptor_Builds_ListBuilds); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.builds.v1.GetBuildRequest, + * !proto.spotify.backstage.builds.v1.GetBuildReply>} + */ +const methodDescriptor_Builds_GetBuild = new grpc.web.MethodDescriptor( + '/spotify.backstage.builds.v1.Builds/GetBuild', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.builds.v1.GetBuildRequest, + proto.spotify.backstage.builds.v1.GetBuildReply, + /** + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.builds.v1.GetBuildRequest, + * !proto.spotify.backstage.builds.v1.GetBuildReply>} + */ +const methodInfo_Builds_GetBuild = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.builds.v1.GetBuildReply, + /** + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.builds.v1.GetBuildReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.builds.v1.BuildsClient.prototype.getBuild = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.builds.v1.Builds/GetBuild', + request, + metadata || {}, + methodDescriptor_Builds_GetBuild, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.builds.v1.BuildsPromiseClient.prototype.getBuild = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.builds.v1.Builds/GetBuild', + request, + metadata || {}, + methodDescriptor_Builds_GetBuild); +}; + + +module.exports = proto.spotify.backstage.builds.v1; + diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts b/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts new file mode 100644 index 0000000000..ff0c1489cf --- /dev/null +++ b/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts @@ -0,0 +1,151 @@ +import * as jspb from "google-protobuf" + +export class ListBuildsRequest extends jspb.Message { + getEntityUri(): string; + setEntityUri(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListBuildsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListBuildsRequest): ListBuildsRequest.AsObject; + static serializeBinaryToWriter(message: ListBuildsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListBuildsRequest; + static deserializeBinaryFromReader(message: ListBuildsRequest, reader: jspb.BinaryReader): ListBuildsRequest; +} + +export namespace ListBuildsRequest { + export type AsObject = { + entityUri: string, + } +} + +export class ListBuildsReply extends jspb.Message { + getEntityUri(): string; + setEntityUri(value: string): void; + + getBuildsList(): Array; + setBuildsList(value: Array): void; + clearBuildsList(): void; + addBuilds(value?: Build, index?: number): Build; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListBuildsReply.AsObject; + static toObject(includeInstance: boolean, msg: ListBuildsReply): ListBuildsReply.AsObject; + static serializeBinaryToWriter(message: ListBuildsReply, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListBuildsReply; + static deserializeBinaryFromReader(message: ListBuildsReply, reader: jspb.BinaryReader): ListBuildsReply; +} + +export namespace ListBuildsReply { + export type AsObject = { + entityUri: string, + buildsList: Array, + } +} + +export class GetBuildRequest extends jspb.Message { + getBuildUri(): string; + setBuildUri(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBuildRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBuildRequest): GetBuildRequest.AsObject; + static serializeBinaryToWriter(message: GetBuildRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBuildRequest; + static deserializeBinaryFromReader(message: GetBuildRequest, reader: jspb.BinaryReader): GetBuildRequest; +} + +export namespace GetBuildRequest { + export type AsObject = { + buildUri: string, + } +} + +export class GetBuildReply extends jspb.Message { + getBuild(): Build | undefined; + setBuild(value?: Build): void; + hasBuild(): boolean; + clearBuild(): void; + + getDetails(): BuildDetails | undefined; + setDetails(value?: BuildDetails): void; + hasDetails(): boolean; + clearDetails(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBuildReply.AsObject; + static toObject(includeInstance: boolean, msg: GetBuildReply): GetBuildReply.AsObject; + static serializeBinaryToWriter(message: GetBuildReply, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBuildReply; + static deserializeBinaryFromReader(message: GetBuildReply, reader: jspb.BinaryReader): GetBuildReply; +} + +export namespace GetBuildReply { + export type AsObject = { + build?: Build.AsObject, + details?: BuildDetails.AsObject, + } +} + +export class Build extends jspb.Message { + getUri(): string; + setUri(value: string): void; + + getCommitId(): string; + setCommitId(value: string): void; + + getMessage(): string; + setMessage(value: string): void; + + getStatus(): BuildStatus; + setStatus(value: BuildStatus): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Build.AsObject; + static toObject(includeInstance: boolean, msg: Build): Build.AsObject; + static serializeBinaryToWriter(message: Build, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Build; + static deserializeBinaryFromReader(message: Build, reader: jspb.BinaryReader): Build; +} + +export namespace Build { + export type AsObject = { + uri: string, + commitId: string, + message: string, + status: BuildStatus, + } +} + +export class BuildDetails extends jspb.Message { + getAuthor(): string; + setAuthor(value: string): void; + + getOverviewUrl(): string; + setOverviewUrl(value: string): void; + + getLogUrl(): string; + setLogUrl(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BuildDetails.AsObject; + static toObject(includeInstance: boolean, msg: BuildDetails): BuildDetails.AsObject; + static serializeBinaryToWriter(message: BuildDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BuildDetails; + static deserializeBinaryFromReader(message: BuildDetails, reader: jspb.BinaryReader): BuildDetails; +} + +export namespace BuildDetails { + export type AsObject = { + author: string, + overviewUrl: string, + logUrl: string, + } +} + +export enum BuildStatus { + NULL = 0, + SUCCESS = 1, + FAILURE = 2, + PENDING = 3, + RUNNING = 4, +} diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_pb.js b/frontend/packages/proto/src/generated/builds/v1/builds_pb.js new file mode 100644 index 0000000000..1f00094a1d --- /dev/null +++ b/frontend/packages/proto/src/generated/builds/v1/builds_pb.js @@ -0,0 +1,1178 @@ +/** + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.spotify.backstage.builds.v1.Build', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.BuildDetails', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.BuildStatus', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.GetBuildReply', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.GetBuildRequest', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.ListBuildsReply', null, global); +goog.exportSymbol('proto.spotify.backstage.builds.v1.ListBuildsRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.ListBuildsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.ListBuildsRequest.displayName = 'proto.spotify.backstage.builds.v1.ListBuildsRequest'; +} +/** + * 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.spotify.backstage.builds.v1.ListBuildsReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.builds.v1.ListBuildsReply.repeatedFields_, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.ListBuildsReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.ListBuildsReply.displayName = 'proto.spotify.backstage.builds.v1.ListBuildsReply'; +} +/** + * 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.spotify.backstage.builds.v1.GetBuildRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.GetBuildRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.GetBuildRequest.displayName = 'proto.spotify.backstage.builds.v1.GetBuildRequest'; +} +/** + * 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.spotify.backstage.builds.v1.GetBuildReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.GetBuildReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.GetBuildReply.displayName = 'proto.spotify.backstage.builds.v1.GetBuildReply'; +} +/** + * 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.spotify.backstage.builds.v1.Build = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.Build, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.Build.displayName = 'proto.spotify.backstage.builds.v1.Build'; +} +/** + * 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.spotify.backstage.builds.v1.BuildDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.builds.v1.BuildDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.builds.v1.BuildDetails.displayName = 'proto.spotify.backstage.builds.v1.BuildDetails'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.ListBuildsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.ListBuildsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + entityUri: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.ListBuildsRequest} + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.ListBuildsRequest; + return proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.ListBuildsRequest} + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEntityUri(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.ListBuildsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntityUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string entity_uri = 1; + * @return {string} + */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.getEntityUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.setEntityUri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.ListBuildsReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.ListBuildsReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.toObject = function(includeInstance, msg) { + var f, obj = { + entityUri: jspb.Message.getFieldWithDefault(msg, 1, ""), + buildsList: jspb.Message.toObjectList(msg.getBuildsList(), + proto.spotify.backstage.builds.v1.Build.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.ListBuildsReply} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.ListBuildsReply; + return proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.ListBuildsReply} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEntityUri(value); + break; + case 2: + var value = new proto.spotify.backstage.builds.v1.Build; + reader.readMessage(value,proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader); + msg.addBuilds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.ListBuildsReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntityUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBuildsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string entity_uri = 1; + * @return {string} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.getEntityUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.setEntityUri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Build builds = 2; + * @return {!Array} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.getBuildsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.builds.v1.Build, 2)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.setBuildsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spotify.backstage.builds.v1.Build=} opt_value + * @param {number=} opt_index + * @return {!proto.spotify.backstage.builds.v1.Build} + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.addBuilds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.builds.v1.Build, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.clearBuildsList = function() { + this.setBuildsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.GetBuildRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.GetBuildRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.toObject = function(includeInstance, msg) { + var f, obj = { + buildUri: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.GetBuildRequest} + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.GetBuildRequest; + return proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.GetBuildRequest} + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildUri(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.GetBuildRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBuildUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string build_uri = 1; + * @return {string} + */ +proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.getBuildUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.setBuildUri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.GetBuildReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.GetBuildReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.GetBuildReply.toObject = function(includeInstance, msg) { + var f, obj = { + build: (f = msg.getBuild()) && proto.spotify.backstage.builds.v1.Build.toObject(includeInstance, f), + details: (f = msg.getDetails()) && proto.spotify.backstage.builds.v1.BuildDetails.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.GetBuildReply} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.GetBuildReply; + return proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.GetBuildReply} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.builds.v1.Build; + reader.readMessage(value,proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader); + msg.setBuild(value); + break; + case 2: + var value = new proto.spotify.backstage.builds.v1.BuildDetails; + reader.readMessage(value,proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.GetBuildReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.GetBuildReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBuild(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Build build = 1; + * @return {?proto.spotify.backstage.builds.v1.Build} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.getBuild = function() { + return /** @type{?proto.spotify.backstage.builds.v1.Build} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.builds.v1.Build, 1)); +}; + + +/** @param {?proto.spotify.backstage.builds.v1.Build|undefined} value */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.setBuild = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.clearBuild = function() { + this.setBuild(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.hasBuild = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional BuildDetails details = 2; + * @return {?proto.spotify.backstage.builds.v1.BuildDetails} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.getDetails = function() { + return /** @type{?proto.spotify.backstage.builds.v1.BuildDetails} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.builds.v1.BuildDetails, 2)); +}; + + +/** @param {?proto.spotify.backstage.builds.v1.BuildDetails|undefined} value */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.setDetails = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.clearDetails = function() { + this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.builds.v1.GetBuildReply.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.Build.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.Build.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.Build} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.Build.toObject = function(includeInstance, msg) { + var f, obj = { + uri: jspb.Message.getFieldWithDefault(msg, 1, ""), + commitId: jspb.Message.getFieldWithDefault(msg, 2, ""), + message: jspb.Message.getFieldWithDefault(msg, 3, ""), + status: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.Build} + */ +proto.spotify.backstage.builds.v1.Build.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.Build; + return proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.Build} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.Build} + */ +proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCommitId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 4: + var value = /** @type {!proto.spotify.backstage.builds.v1.BuildStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.Build.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.Build} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCommitId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional string uri = 1; + * @return {string} + */ +proto.spotify.backstage.builds.v1.Build.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.Build.prototype.setUri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string commit_id = 2; + * @return {string} + */ +proto.spotify.backstage.builds.v1.Build.prototype.getCommitId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.Build.prototype.setCommitId = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string message = 3; + * @return {string} + */ +proto.spotify.backstage.builds.v1.Build.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.Build.prototype.setMessage = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional BuildStatus status = 4; + * @return {!proto.spotify.backstage.builds.v1.BuildStatus} + */ +proto.spotify.backstage.builds.v1.Build.prototype.getStatus = function() { + return /** @type {!proto.spotify.backstage.builds.v1.BuildStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {!proto.spotify.backstage.builds.v1.BuildStatus} value */ +proto.spotify.backstage.builds.v1.Build.prototype.setStatus = function(value) { + jspb.Message.setProto3EnumField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.builds.v1.BuildDetails.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.builds.v1.BuildDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.builds.v1.BuildDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.BuildDetails.toObject = function(includeInstance, msg) { + var f, obj = { + author: jspb.Message.getFieldWithDefault(msg, 1, ""), + overviewUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + logUrl: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.builds.v1.BuildDetails} + */ +proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.builds.v1.BuildDetails; + return proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.builds.v1.BuildDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.builds.v1.BuildDetails} + */ +proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOverviewUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLogUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.builds.v1.BuildDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOverviewUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLogUrl(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string author = 1; + * @return {string} + */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.setAuthor = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string overview_url = 2; + * @return {string} + */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.getOverviewUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.setOverviewUrl = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string log_url = 3; + * @return {string} + */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.getLogUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.builds.v1.BuildDetails.prototype.setLogUrl = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.spotify.backstage.builds.v1.BuildStatus = { + NULL: 0, + SUCCESS: 1, + FAILURE: 2, + PENDING: 3, + RUNNING: 4 +}; + +goog.object.extend(exports, proto.spotify.backstage.builds.v1); diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts new file mode 100644 index 0000000000..ab4076b19c --- /dev/null +++ b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts @@ -0,0 +1,46 @@ +import * as grpcWeb from 'grpc-web'; + +import { + GetGroupReply, + GetGroupRequest, + GetUserReply, + GetUserRequest} from './identity_pb'; + +export class IdentityClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getUser( + request: GetUserRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: GetUserReply) => void + ): grpcWeb.ClientReadableStream; + + getGroup( + request: GetGroupRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: GetGroupReply) => void + ): grpcWeb.ClientReadableStream; + +} + +export class IdentityPromiseClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getUser( + request: GetUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + getGroup( + request: GetGroupRequest, + metadata?: grpcWeb.Metadata + ): Promise; + +} + diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js new file mode 100644 index 0000000000..6fc2bc948b --- /dev/null +++ b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js @@ -0,0 +1,233 @@ +/** + * @fileoverview gRPC-Web generated client stub for spotify.backstage.identity.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.spotify = {}; +proto.spotify.backstage = {}; +proto.spotify.backstage.identity = {}; +proto.spotify.backstage.identity.v1 = require('./identity_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.identity.v1.IdentityClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.identity.v1.IdentityPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.identity.v1.GetUserRequest, + * !proto.spotify.backstage.identity.v1.GetUserReply>} + */ +const methodDescriptor_Identity_GetUser = new grpc.web.MethodDescriptor( + '/spotify.backstage.identity.v1.Identity/GetUser', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.identity.v1.GetUserRequest, + proto.spotify.backstage.identity.v1.GetUserReply, + /** + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.identity.v1.GetUserRequest, + * !proto.spotify.backstage.identity.v1.GetUserReply>} + */ +const methodInfo_Identity_GetUser = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.identity.v1.GetUserReply, + /** + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.identity.v1.GetUserReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.identity.v1.IdentityClient.prototype.getUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.identity.v1.Identity/GetUser', + request, + metadata || {}, + methodDescriptor_Identity_GetUser, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.identity.v1.IdentityPromiseClient.prototype.getUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.identity.v1.Identity/GetUser', + request, + metadata || {}, + methodDescriptor_Identity_GetUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.identity.v1.GetGroupRequest, + * !proto.spotify.backstage.identity.v1.GetGroupReply>} + */ +const methodDescriptor_Identity_GetGroup = new grpc.web.MethodDescriptor( + '/spotify.backstage.identity.v1.Identity/GetGroup', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.identity.v1.GetGroupRequest, + proto.spotify.backstage.identity.v1.GetGroupReply, + /** + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.identity.v1.GetGroupRequest, + * !proto.spotify.backstage.identity.v1.GetGroupReply>} + */ +const methodInfo_Identity_GetGroup = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.identity.v1.GetGroupReply, + /** + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.identity.v1.GetGroupReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.identity.v1.IdentityClient.prototype.getGroup = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.identity.v1.Identity/GetGroup', + request, + metadata || {}, + methodDescriptor_Identity_GetGroup, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.identity.v1.IdentityPromiseClient.prototype.getGroup = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.identity.v1.Identity/GetGroup', + request, + metadata || {}, + methodDescriptor_Identity_GetGroup); +}; + + +module.exports = proto.spotify.backstage.identity.v1; + diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts b/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts index 163e30b52c..ac0f4de095 100644 --- a/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts +++ b/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts @@ -1,7 +1,4 @@ -// package: spotify.backstage.identity.v1 -// file: identity/v1/identity.proto - -import * as jspb from "google-protobuf"; +import * as jspb from "google-protobuf" export class GetUserRequest extends jspb.Message { getId(): string; @@ -10,8 +7,6 @@ export class GetUserRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetUserRequest.AsObject; static toObject(includeInstance: boolean, msg: GetUserRequest): GetUserRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetUserRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetUserRequest; static deserializeBinaryFromReader(message: GetUserRequest, reader: jspb.BinaryReader): GetUserRequest; @@ -24,21 +19,19 @@ export namespace GetUserRequest { } export class GetUserReply extends jspb.Message { - hasUser(): boolean; - clearUser(): void; getUser(): User | undefined; setUser(value?: User): void; + hasUser(): boolean; + clearUser(): void; - clearGroupsList(): void; getGroupsList(): Array; setGroupsList(value: Array): void; + clearGroupsList(): void; addGroups(value?: Group, index?: number): Group; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetUserReply.AsObject; static toObject(includeInstance: boolean, msg: GetUserReply): GetUserReply.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetUserReply, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetUserReply; static deserializeBinaryFromReader(message: GetUserReply, reader: jspb.BinaryReader): GetUserReply; @@ -58,8 +51,6 @@ export class GetGroupRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetGroupRequest.AsObject; static toObject(includeInstance: boolean, msg: GetGroupRequest): GetGroupRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetGroupRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetGroupRequest; static deserializeBinaryFromReader(message: GetGroupRequest, reader: jspb.BinaryReader): GetGroupRequest; @@ -72,16 +63,14 @@ export namespace GetGroupRequest { } export class GetGroupReply extends jspb.Message { - hasGroup(): boolean; - clearGroup(): void; getGroup(): Group | undefined; setGroup(value?: Group): void; + hasGroup(): boolean; + clearGroup(): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetGroupReply.AsObject; static toObject(includeInstance: boolean, msg: GetGroupReply): GetGroupReply.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetGroupReply, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetGroupReply; static deserializeBinaryFromReader(message: GetGroupReply, reader: jspb.BinaryReader): GetGroupReply; @@ -103,8 +92,6 @@ export class User extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): User.AsObject; static toObject(includeInstance: boolean, msg: User): User.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): User; static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; @@ -121,21 +108,19 @@ export class Group extends jspb.Message { getId(): string; setId(value: string): void; - clearUsersList(): void; getUsersList(): Array; setUsersList(value: Array): void; + clearUsersList(): void; addUsers(value?: User, index?: number): User; - clearGroupsList(): void; getGroupsList(): Array; setGroupsList(value: Array): void; + clearGroupsList(): void; addGroups(value?: Group, index?: number): Group; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Group.AsObject; static toObject(includeInstance: boolean, msg: Group): Group.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Group, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Group; static deserializeBinaryFromReader(message: Group, reader: jspb.BinaryReader): Group; diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb.js b/frontend/packages/proto/src/generated/identity/v1/identity_pb.js new file mode 100644 index 0000000000..f298cad9bd --- /dev/null +++ b/frontend/packages/proto/src/generated/identity/v1/identity_pb.js @@ -0,0 +1,1136 @@ +/** + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.spotify.backstage.identity.v1.GetGroupReply', null, global); +goog.exportSymbol('proto.spotify.backstage.identity.v1.GetGroupRequest', null, global); +goog.exportSymbol('proto.spotify.backstage.identity.v1.GetUserReply', null, global); +goog.exportSymbol('proto.spotify.backstage.identity.v1.GetUserRequest', null, global); +goog.exportSymbol('proto.spotify.backstage.identity.v1.Group', null, global); +goog.exportSymbol('proto.spotify.backstage.identity.v1.User', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.spotify.backstage.identity.v1.GetUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.GetUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.GetUserRequest.displayName = 'proto.spotify.backstage.identity.v1.GetUserRequest'; +} +/** + * 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.spotify.backstage.identity.v1.GetUserReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.identity.v1.GetUserReply.repeatedFields_, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.GetUserReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.GetUserReply.displayName = 'proto.spotify.backstage.identity.v1.GetUserReply'; +} +/** + * 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.spotify.backstage.identity.v1.GetGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.GetGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.GetGroupRequest.displayName = 'proto.spotify.backstage.identity.v1.GetGroupRequest'; +} +/** + * 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.spotify.backstage.identity.v1.GetGroupReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.GetGroupReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.GetGroupReply.displayName = 'proto.spotify.backstage.identity.v1.GetGroupReply'; +} +/** + * 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.spotify.backstage.identity.v1.User = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.User, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.User.displayName = 'proto.spotify.backstage.identity.v1.User'; +} +/** + * 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.spotify.backstage.identity.v1.Group = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.identity.v1.Group.repeatedFields_, null); +}; +goog.inherits(proto.spotify.backstage.identity.v1.Group, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.identity.v1.Group.displayName = 'proto.spotify.backstage.identity.v1.Group'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.GetUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.GetUserRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetUserRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.GetUserRequest} + */ +proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.GetUserRequest; + return proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.GetUserRequest} + */ +proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.GetUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.GetUserRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spotify.backstage.identity.v1.GetUserRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.identity.v1.GetUserRequest.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spotify.backstage.identity.v1.GetUserReply.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.GetUserReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.GetUserReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.GetUserReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetUserReply.toObject = function(includeInstance, msg) { + var f, obj = { + user: (f = msg.getUser()) && proto.spotify.backstage.identity.v1.User.toObject(includeInstance, f), + groupsList: jspb.Message.toObjectList(msg.getGroupsList(), + proto.spotify.backstage.identity.v1.Group.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.GetUserReply} + */ +proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.GetUserReply; + return proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.GetUserReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.GetUserReply} + */ +proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.identity.v1.User; + reader.readMessage(value,proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 2: + var value = new proto.spotify.backstage.identity.v1.Group; + reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); + msg.addGroups(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.GetUserReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.GetUserReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetUserReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter + ); + } + f = message.getGroupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter + ); + } +}; + + +/** + * optional User user = 1; + * @return {?proto.spotify.backstage.identity.v1.User} + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.getUser = function() { + return /** @type{?proto.spotify.backstage.identity.v1.User} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.identity.v1.User, 1)); +}; + + +/** @param {?proto.spotify.backstage.identity.v1.User|undefined} value */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.setUser = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.clearUser = function() { + this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.hasUser = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Group groups = 2; + * @return {!Array} + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.getGroupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.Group, 2)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.setGroupsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spotify.backstage.identity.v1.Group=} opt_value + * @param {number=} opt_index + * @return {!proto.spotify.backstage.identity.v1.Group} + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.addGroups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.identity.v1.Group, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.identity.v1.GetUserReply.prototype.clearGroupsList = function() { + this.setGroupsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.GetGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.GetGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.GetGroupRequest} + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.GetGroupRequest; + return proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.GetGroupRequest} + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.GetGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.GetGroupReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.GetGroupReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetGroupReply.toObject = function(includeInstance, msg) { + var f, obj = { + group: (f = msg.getGroup()) && proto.spotify.backstage.identity.v1.Group.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.GetGroupReply} + */ +proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.GetGroupReply; + return proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.GetGroupReply} + */ +proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.identity.v1.Group; + reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); + msg.setGroup(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.GetGroupReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.GetGroupReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.GetGroupReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroup(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Group group = 1; + * @return {?proto.spotify.backstage.identity.v1.Group} + */ +proto.spotify.backstage.identity.v1.GetGroupReply.prototype.getGroup = function() { + return /** @type{?proto.spotify.backstage.identity.v1.Group} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.identity.v1.Group, 1)); +}; + + +/** @param {?proto.spotify.backstage.identity.v1.Group|undefined} value */ +proto.spotify.backstage.identity.v1.GetGroupReply.prototype.setGroup = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.identity.v1.GetGroupReply.prototype.clearGroup = function() { + this.setGroup(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.identity.v1.GetGroupReply.prototype.hasGroup = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.User.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.User.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.User} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.User.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.User} + */ +proto.spotify.backstage.identity.v1.User.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.User; + return proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.User} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.User} + */ +proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.User.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.User} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spotify.backstage.identity.v1.User.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.identity.v1.User.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spotify.backstage.identity.v1.User.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.identity.v1.User.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spotify.backstage.identity.v1.Group.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.identity.v1.Group.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.identity.v1.Group.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.identity.v1.Group} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.Group.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + usersList: jspb.Message.toObjectList(msg.getUsersList(), + proto.spotify.backstage.identity.v1.User.toObject, includeInstance), + groupsList: jspb.Message.toObjectList(msg.getGroupsList(), + proto.spotify.backstage.identity.v1.Group.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.identity.v1.Group} + */ +proto.spotify.backstage.identity.v1.Group.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.identity.v1.Group; + return proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.identity.v1.Group} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.identity.v1.Group} + */ +proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.spotify.backstage.identity.v1.User; + reader.readMessage(value,proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader); + msg.addUsers(value); + break; + case 3: + var value = new proto.spotify.backstage.identity.v1.Group; + reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); + msg.addGroups(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.identity.v1.Group.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.identity.v1.Group} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUsersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter + ); + } + f = message.getGroupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spotify.backstage.identity.v1.Group.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.identity.v1.Group.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated User users = 2; + * @return {!Array} + */ +proto.spotify.backstage.identity.v1.Group.prototype.getUsersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.User, 2)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.identity.v1.Group.prototype.setUsersList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spotify.backstage.identity.v1.User=} opt_value + * @param {number=} opt_index + * @return {!proto.spotify.backstage.identity.v1.User} + */ +proto.spotify.backstage.identity.v1.Group.prototype.addUsers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.identity.v1.User, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.identity.v1.Group.prototype.clearUsersList = function() { + this.setUsersList([]); +}; + + +/** + * repeated Group groups = 3; + * @return {!Array} + */ +proto.spotify.backstage.identity.v1.Group.prototype.getGroupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.Group, 3)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.identity.v1.Group.prototype.setGroupsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.spotify.backstage.identity.v1.Group=} opt_value + * @param {number=} opt_index + * @return {!proto.spotify.backstage.identity.v1.Group} + */ +proto.spotify.backstage.identity.v1.Group.prototype.addGroups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.spotify.backstage.identity.v1.Group, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.identity.v1.Group.prototype.clearGroupsList = function() { + this.setGroupsList([]); +}; + + +goog.object.extend(exports, proto.spotify.backstage.identity.v1); diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.d.ts b/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.d.ts deleted file mode 100644 index 9c9e80f37f..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -// package: spotify.backstage.identity.v1 -// file: identity/v1/identity.proto - -import * as identity_v1_identity_pb from "../../identity/v1/identity_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type IdentityGetUser = { - readonly methodName: string; - readonly service: typeof Identity; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof identity_v1_identity_pb.GetUserRequest; - readonly responseType: typeof identity_v1_identity_pb.GetUserReply; -}; - -type IdentityGetGroup = { - readonly methodName: string; - readonly service: typeof Identity; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof identity_v1_identity_pb.GetGroupRequest; - readonly responseType: typeof identity_v1_identity_pb.GetGroupReply; -}; - -export class Identity { - static readonly serviceName: string; - static readonly GetUser: IdentityGetUser; - static readonly GetGroup: IdentityGetGroup; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class IdentityClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - getUser( - requestMessage: identity_v1_identity_pb.GetUserRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: identity_v1_identity_pb.GetUserReply|null) => void - ): UnaryResponse; - getUser( - requestMessage: identity_v1_identity_pb.GetUserRequest, - callback: (error: ServiceError|null, responseMessage: identity_v1_identity_pb.GetUserReply|null) => void - ): UnaryResponse; - getGroup( - requestMessage: identity_v1_identity_pb.GetGroupRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: identity_v1_identity_pb.GetGroupReply|null) => void - ): UnaryResponse; - getGroup( - requestMessage: identity_v1_identity_pb.GetGroupRequest, - callback: (error: ServiceError|null, responseMessage: identity_v1_identity_pb.GetGroupReply|null) => void - ): UnaryResponse; -} - diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.js b/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.js deleted file mode 100644 index 3fa97ae125..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_pb_service.js +++ /dev/null @@ -1,101 +0,0 @@ -// package: spotify.backstage.identity.v1 -// file: identity/v1/identity.proto - -var identity_v1_identity_pb = require("../../identity/v1/identity_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Identity = (function () { - function Identity() {} - Identity.serviceName = "spotify.backstage.identity.v1.Identity"; - return Identity; -}()); - -Identity.GetUser = { - methodName: "GetUser", - service: Identity, - requestStream: false, - responseStream: false, - requestType: identity_v1_identity_pb.GetUserRequest, - responseType: identity_v1_identity_pb.GetUserReply -}; - -Identity.GetGroup = { - methodName: "GetGroup", - service: Identity, - requestStream: false, - responseStream: false, - requestType: identity_v1_identity_pb.GetGroupRequest, - responseType: identity_v1_identity_pb.GetGroupReply -}; - -exports.Identity = Identity; - -function IdentityClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -IdentityClient.prototype.getUser = function getUser(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Identity.GetUser, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -IdentityClient.prototype.getGroup = function getGroup(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Identity.GetGroup, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.IdentityClient = IdentityClient; - diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts new file mode 100644 index 0000000000..a01cbd4a18 --- /dev/null +++ b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts @@ -0,0 +1,46 @@ +import * as grpcWeb from 'grpc-web'; + +import { + CreateEntityReply, + CreateEntityRequest, + GetEntityReply, + GetEntityRequest} from './inventory_pb'; + +export class InventoryClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getEntity( + request: GetEntityRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: GetEntityReply) => void + ): grpcWeb.ClientReadableStream; + + createEntity( + request: CreateEntityRequest, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: CreateEntityReply) => void + ): grpcWeb.ClientReadableStream; + +} + +export class InventoryPromiseClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getEntity( + request: GetEntityRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + createEntity( + request: CreateEntityRequest, + metadata?: grpcWeb.Metadata + ): Promise; + +} + diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js new file mode 100644 index 0000000000..e17a3ee3e6 --- /dev/null +++ b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js @@ -0,0 +1,233 @@ +/** + * @fileoverview gRPC-Web generated client stub for spotify.backstage.inventory.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.spotify = {}; +proto.spotify.backstage = {}; +proto.spotify.backstage.inventory = {}; +proto.spotify.backstage.inventory.v1 = require('./inventory_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.inventory.v1.InventoryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.inventory.v1.InventoryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.inventory.v1.GetEntityRequest, + * !proto.spotify.backstage.inventory.v1.GetEntityReply>} + */ +const methodDescriptor_Inventory_GetEntity = new grpc.web.MethodDescriptor( + '/spotify.backstage.inventory.v1.Inventory/GetEntity', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.inventory.v1.GetEntityRequest, + proto.spotify.backstage.inventory.v1.GetEntityReply, + /** + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.inventory.v1.GetEntityRequest, + * !proto.spotify.backstage.inventory.v1.GetEntityReply>} + */ +const methodInfo_Inventory_GetEntity = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.inventory.v1.GetEntityReply, + /** + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.GetEntityReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.inventory.v1.InventoryClient.prototype.getEntity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.inventory.v1.Inventory/GetEntity', + request, + metadata || {}, + methodDescriptor_Inventory_GetEntity, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.getEntity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.inventory.v1.Inventory/GetEntity', + request, + metadata || {}, + methodDescriptor_Inventory_GetEntity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.inventory.v1.CreateEntityRequest, + * !proto.spotify.backstage.inventory.v1.CreateEntityReply>} + */ +const methodDescriptor_Inventory_CreateEntity = new grpc.web.MethodDescriptor( + '/spotify.backstage.inventory.v1.Inventory/CreateEntity', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.inventory.v1.CreateEntityRequest, + proto.spotify.backstage.inventory.v1.CreateEntityReply, + /** + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.inventory.v1.CreateEntityRequest, + * !proto.spotify.backstage.inventory.v1.CreateEntityReply>} + */ +const methodInfo_Inventory_CreateEntity = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.inventory.v1.CreateEntityReply, + /** + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.CreateEntityReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.inventory.v1.InventoryClient.prototype.createEntity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.inventory.v1.Inventory/CreateEntity', + request, + metadata || {}, + methodDescriptor_Inventory_CreateEntity, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.createEntity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.inventory.v1.Inventory/CreateEntity', + request, + metadata || {}, + methodDescriptor_Inventory_CreateEntity); +}; + + +module.exports = proto.spotify.backstage.inventory.v1; + diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts index 754c935c2e..9f50e094ce 100644 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts +++ b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts @@ -1,24 +1,19 @@ -// package: spotify.backstage.inventory.v1 -// file: inventory/v1/inventory.proto - -import * as jspb from "google-protobuf"; +import * as jspb from "google-protobuf" export class GetEntityRequest extends jspb.Message { - hasEntity(): boolean; - clearEntity(): void; getEntity(): Entity | undefined; setEntity(value?: Entity): void; + hasEntity(): boolean; + clearEntity(): void; - clearIncludeFactsList(): void; getIncludeFactsList(): Array; setIncludeFactsList(value: Array): void; - addIncludeFacts(value: string, index?: number): string; + clearIncludeFactsList(): void; + addIncludeFacts(value: string, index?: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetEntityRequest.AsObject; static toObject(includeInstance: boolean, msg: GetEntityRequest): GetEntityRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetEntityRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetEntityRequest; static deserializeBinaryFromReader(message: GetEntityRequest, reader: jspb.BinaryReader): GetEntityRequest; @@ -32,21 +27,19 @@ export namespace GetEntityRequest { } export class GetEntityReply extends jspb.Message { - hasEntity(): boolean; - clearEntity(): void; getEntity(): Entity | undefined; setEntity(value?: Entity): void; + hasEntity(): boolean; + clearEntity(): void; - clearFactsList(): void; getFactsList(): Array; setFactsList(value: Array): void; + clearFactsList(): void; addFacts(value?: Fact, index?: number): Fact; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetEntityReply.AsObject; static toObject(includeInstance: boolean, msg: GetEntityReply): GetEntityReply.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GetEntityReply, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetEntityReply; static deserializeBinaryFromReader(message: GetEntityReply, reader: jspb.BinaryReader): GetEntityReply; @@ -60,16 +53,14 @@ export namespace GetEntityReply { } export class CreateEntityRequest extends jspb.Message { - hasEntity(): boolean; - clearEntity(): void; getEntity(): Entity | undefined; setEntity(value?: Entity): void; + hasEntity(): boolean; + clearEntity(): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateEntityRequest.AsObject; static toObject(includeInstance: boolean, msg: CreateEntityRequest): CreateEntityRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: CreateEntityRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CreateEntityRequest; static deserializeBinaryFromReader(message: CreateEntityRequest, reader: jspb.BinaryReader): CreateEntityRequest; @@ -82,16 +73,14 @@ export namespace CreateEntityRequest { } export class CreateEntityReply extends jspb.Message { - hasEntity(): boolean; - clearEntity(): void; getEntity(): Entity | undefined; setEntity(value?: Entity): void; + hasEntity(): boolean; + clearEntity(): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateEntityReply.AsObject; static toObject(includeInstance: boolean, msg: CreateEntityReply): CreateEntityReply.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: CreateEntityReply, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CreateEntityReply; static deserializeBinaryFromReader(message: CreateEntityReply, reader: jspb.BinaryReader): CreateEntityReply; @@ -103,6 +92,50 @@ export namespace CreateEntityReply { } } +export class SetFactRequest extends jspb.Message { + getEntityuri(): string; + setEntityuri(value: string): void; + + getName(): string; + setName(value: string): void; + + getValue(): string; + setValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetFactRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetFactRequest): SetFactRequest.AsObject; + static serializeBinaryToWriter(message: SetFactRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetFactRequest; + static deserializeBinaryFromReader(message: SetFactRequest, reader: jspb.BinaryReader): SetFactRequest; +} + +export namespace SetFactRequest { + export type AsObject = { + entityuri: string, + name: string, + value: string, + } +} + +export class SetFactReply extends jspb.Message { + getFacturi(): string; + setFacturi(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetFactReply.AsObject; + static toObject(includeInstance: boolean, msg: SetFactReply): SetFactReply.AsObject; + static serializeBinaryToWriter(message: SetFactReply, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetFactReply; + static deserializeBinaryFromReader(message: SetFactReply, reader: jspb.BinaryReader): SetFactReply; +} + +export namespace SetFactReply { + export type AsObject = { + facturi: string, + } +} + export class Entity extends jspb.Message { getUri(): string; setUri(value: string): void; @@ -110,8 +143,6 @@ export class Entity extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Entity.AsObject; static toObject(includeInstance: boolean, msg: Entity): Entity.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Entity, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Entity; static deserializeBinaryFromReader(message: Entity, reader: jspb.BinaryReader): Entity; @@ -124,6 +155,9 @@ export namespace Entity { } export class Fact extends jspb.Message { + getEntityuri(): string; + setEntityuri(value: string): void; + getName(): string; setName(value: string): void; @@ -133,8 +167,6 @@ export class Fact extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Fact.AsObject; static toObject(includeInstance: boolean, msg: Fact): Fact.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Fact, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Fact; static deserializeBinaryFromReader(message: Fact, reader: jspb.BinaryReader): Fact; @@ -142,6 +174,7 @@ export class Fact extends jspb.Message { export namespace Fact { export type AsObject = { + entityuri: string, name: string, value: string, } diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js new file mode 100644 index 0000000000..85a0dc2482 --- /dev/null +++ b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js @@ -0,0 +1,1501 @@ +/** + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.spotify.backstage.inventory.v1.CreateEntityReply', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.CreateEntityRequest', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.Entity', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.Fact', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetEntityReply', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetEntityRequest', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.SetFactReply', null, global); +goog.exportSymbol('proto.spotify.backstage.inventory.v1.SetFactRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.inventory.v1.GetEntityRequest.repeatedFields_, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.GetEntityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.GetEntityRequest.displayName = 'proto.spotify.backstage.inventory.v1.GetEntityRequest'; +} +/** + * 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.spotify.backstage.inventory.v1.GetEntityReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.inventory.v1.GetEntityReply.repeatedFields_, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.GetEntityReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.GetEntityReply.displayName = 'proto.spotify.backstage.inventory.v1.GetEntityReply'; +} +/** + * 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.spotify.backstage.inventory.v1.CreateEntityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.CreateEntityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.CreateEntityRequest.displayName = 'proto.spotify.backstage.inventory.v1.CreateEntityRequest'; +} +/** + * 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.spotify.backstage.inventory.v1.CreateEntityReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.CreateEntityReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.CreateEntityReply.displayName = 'proto.spotify.backstage.inventory.v1.CreateEntityReply'; +} +/** + * 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.spotify.backstage.inventory.v1.SetFactRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.SetFactRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.SetFactRequest.displayName = 'proto.spotify.backstage.inventory.v1.SetFactRequest'; +} +/** + * 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.spotify.backstage.inventory.v1.SetFactReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.SetFactReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.SetFactReply.displayName = 'proto.spotify.backstage.inventory.v1.SetFactReply'; +} +/** + * 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.spotify.backstage.inventory.v1.Entity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.Entity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.Entity.displayName = 'proto.spotify.backstage.inventory.v1.Entity'; +} +/** + * 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.spotify.backstage.inventory.v1.Fact = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spotify.backstage.inventory.v1.Fact, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spotify.backstage.inventory.v1.Fact.displayName = 'proto.spotify.backstage.inventory.v1.Fact'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.GetEntityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.GetEntityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f), + includeFactsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.GetEntityRequest} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.GetEntityRequest; + return proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.GetEntityRequest} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.inventory.v1.Entity; + reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); + msg.setEntity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addIncludeFacts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.GetEntityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntity(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter + ); + } + f = message.getIncludeFactsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional Entity entity = 1; + * @return {?proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.getEntity = function() { + return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); +}; + + +/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.setEntity = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.clearEntity = function() { + this.setEntity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.hasEntity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string include_facts = 2; + * @return {!Array} + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.getIncludeFactsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.setIncludeFactsList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.addIncludeFacts = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.clearIncludeFactsList = function() { + this.setIncludeFactsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.GetEntityReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.GetEntityReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.toObject = function(includeInstance, msg) { + var f, obj = { + entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f), + factsList: jspb.Message.toObjectList(msg.getFactsList(), + proto.spotify.backstage.inventory.v1.Fact.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.GetEntityReply} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.GetEntityReply; + return proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.GetEntityReply} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.inventory.v1.Entity; + reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); + msg.setEntity(value); + break; + case 2: + var value = new proto.spotify.backstage.inventory.v1.Fact; + reader.readMessage(value,proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader); + msg.addFacts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.GetEntityReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntity(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter + ); + } + f = message.getFactsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Entity entity = 1; + * @return {?proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.getEntity = function() { + return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); +}; + + +/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.setEntity = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.clearEntity = function() { + this.setEntity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.hasEntity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Fact facts = 2; + * @return {!Array} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.getFactsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.inventory.v1.Fact, 2)); +}; + + +/** @param {!Array} value */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.setFactsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spotify.backstage.inventory.v1.Fact=} opt_value + * @param {number=} opt_index + * @return {!proto.spotify.backstage.inventory.v1.Fact} + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.addFacts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.inventory.v1.Fact, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.clearFactsList = function() { + this.setFactsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.CreateEntityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.CreateEntityRequest; + return proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.inventory.v1.Entity; + reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); + msg.setEntity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.CreateEntityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntity(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Entity entity = 1; + * @return {?proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.getEntity = function() { + return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); +}; + + +/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.setEntity = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.clearEntity = function() { + this.setEntity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.hasEntity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.CreateEntityReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.CreateEntityReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.toObject = function(includeInstance, msg) { + var f, obj = { + entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.CreateEntityReply} + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.CreateEntityReply; + return proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.CreateEntityReply} + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spotify.backstage.inventory.v1.Entity; + reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); + msg.setEntity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.CreateEntityReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntity(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Entity entity = 1; + * @return {?proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.getEntity = function() { + return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( + jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); +}; + + +/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.setEntity = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.clearEntity = function() { + this.setEntity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.hasEntity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.SetFactRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.SetFactRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.toObject = function(includeInstance, msg) { + var f, obj = { + entityuri: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + value: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.SetFactRequest} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.SetFactRequest; + return proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.SetFactRequest} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEntityuri(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.SetFactRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntityuri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string entityUri = 1; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getEntityuri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setEntityuri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setValue = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.SetFactReply.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.SetFactReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.SetFactReply.toObject = function(includeInstance, msg) { + var f, obj = { + facturi: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.SetFactReply} + */ +proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.SetFactReply; + return proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.SetFactReply} + */ +proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFacturi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.SetFactReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.SetFactReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.SetFactReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFacturi(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string factUri = 1; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.SetFactReply.prototype.getFacturi = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.SetFactReply.prototype.setFacturi = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.Entity.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.Entity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.Entity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.Entity.toObject = function(includeInstance, msg) { + var f, obj = { + uri: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.Entity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.Entity; + return proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.Entity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.Entity} + */ +proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.Entity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.Entity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string uri = 1; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.Entity.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.Entity.prototype.setUri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * 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.spotify.backstage.inventory.v1.Fact.prototype.toObject = function(opt_includeInstance) { + return proto.spotify.backstage.inventory.v1.Fact.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spotify.backstage.inventory.v1.Fact} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.Fact.toObject = function(includeInstance, msg) { + var f, obj = { + entityuri: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + value: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spotify.backstage.inventory.v1.Fact} + */ +proto.spotify.backstage.inventory.v1.Fact.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spotify.backstage.inventory.v1.Fact; + return proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spotify.backstage.inventory.v1.Fact} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spotify.backstage.inventory.v1.Fact} + */ +proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEntityuri(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spotify.backstage.inventory.v1.Fact.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spotify.backstage.inventory.v1.Fact} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntityuri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string entityUri = 1; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.Fact.prototype.getEntityuri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.Fact.prototype.setEntityuri = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.Fact.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.Fact.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.spotify.backstage.inventory.v1.Fact.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.spotify.backstage.inventory.v1.Fact.prototype.setValue = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.spotify.backstage.inventory.v1); diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.d.ts b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.d.ts deleted file mode 100644 index 1b7ef69516..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -// package: spotify.backstage.inventory.v1 -// file: inventory/v1/inventory.proto - -import * as inventory_v1_inventory_pb from "../../inventory/v1/inventory_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type InventoryGetEntity = { - readonly methodName: string; - readonly service: typeof Inventory; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof inventory_v1_inventory_pb.GetEntityRequest; - readonly responseType: typeof inventory_v1_inventory_pb.GetEntityReply; -}; - -type InventoryCreateEntity = { - readonly methodName: string; - readonly service: typeof Inventory; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof inventory_v1_inventory_pb.CreateEntityRequest; - readonly responseType: typeof inventory_v1_inventory_pb.CreateEntityReply; -}; - -export class Inventory { - static readonly serviceName: string; - static readonly GetEntity: InventoryGetEntity; - static readonly CreateEntity: InventoryCreateEntity; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class InventoryClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - getEntity( - requestMessage: inventory_v1_inventory_pb.GetEntityRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: inventory_v1_inventory_pb.GetEntityReply|null) => void - ): UnaryResponse; - getEntity( - requestMessage: inventory_v1_inventory_pb.GetEntityRequest, - callback: (error: ServiceError|null, responseMessage: inventory_v1_inventory_pb.GetEntityReply|null) => void - ): UnaryResponse; - createEntity( - requestMessage: inventory_v1_inventory_pb.CreateEntityRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: inventory_v1_inventory_pb.CreateEntityReply|null) => void - ): UnaryResponse; - createEntity( - requestMessage: inventory_v1_inventory_pb.CreateEntityRequest, - callback: (error: ServiceError|null, responseMessage: inventory_v1_inventory_pb.CreateEntityReply|null) => void - ): UnaryResponse; -} - diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.js b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.js deleted file mode 100644 index 02f48d037d..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb_service.js +++ /dev/null @@ -1,101 +0,0 @@ -// package: spotify.backstage.inventory.v1 -// file: inventory/v1/inventory.proto - -var inventory_v1_inventory_pb = require("../../inventory/v1/inventory_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Inventory = (function () { - function Inventory() {} - Inventory.serviceName = "spotify.backstage.inventory.v1.Inventory"; - return Inventory; -}()); - -Inventory.GetEntity = { - methodName: "GetEntity", - service: Inventory, - requestStream: false, - responseStream: false, - requestType: inventory_v1_inventory_pb.GetEntityRequest, - responseType: inventory_v1_inventory_pb.GetEntityReply -}; - -Inventory.CreateEntity = { - methodName: "CreateEntity", - service: Inventory, - requestStream: false, - responseStream: false, - requestType: inventory_v1_inventory_pb.CreateEntityRequest, - responseType: inventory_v1_inventory_pb.CreateEntityReply -}; - -exports.Inventory = Inventory; - -function InventoryClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -InventoryClient.prototype.getEntity = function getEntity(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Inventory.GetEntity, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -InventoryClient.prototype.createEntity = function createEntity(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Inventory.CreateEntity, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.InventoryClient = InventoryClient; - diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts new file mode 100644 index 0000000000..4777abdb9b --- /dev/null +++ b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts @@ -0,0 +1,34 @@ +import * as grpcWeb from 'grpc-web'; + +import * as identity_v1_identity_pb from '../../identity/v1/identity_pb'; + +import { + Empty, + GetAllTemplatesReply} from './scaffolder_pb'; + +export class ScaffolderClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getAllTemplates( + request: Empty, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: GetAllTemplatesReply) => void + ): grpcWeb.ClientReadableStream; + +} + +export class ScaffolderPromiseClient { + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: string; }); + + getAllTemplates( + request: Empty, + metadata?: grpcWeb.Metadata + ): Promise; + +} + diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js new file mode 100644 index 0000000000..af6eef700a --- /dev/null +++ b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js @@ -0,0 +1,155 @@ +/** + * @fileoverview gRPC-Web generated client stub for spotify.backstage.scaffolder.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var identity_v1_identity_pb = require('../../identity/v1/identity_pb.js') +const proto = {}; +proto.spotify = {}; +proto.spotify.backstage = {}; +proto.spotify.backstage.scaffolder = {}; +proto.spotify.backstage.scaffolder.v1 = require('./scaffolder_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.scaffolder.v1.ScaffolderClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.spotify.backstage.scaffolder.v1.ScaffolderPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.spotify.backstage.scaffolder.v1.Empty, + * !proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply>} + */ +const methodDescriptor_Scaffolder_GetAllTemplates = new grpc.web.MethodDescriptor( + '/spotify.backstage.scaffolder.v1.Scaffolder/GetAllTemplates', + grpc.web.MethodType.UNARY, + proto.spotify.backstage.scaffolder.v1.Empty, + proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply, + /** + * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.spotify.backstage.scaffolder.v1.Empty, + * !proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply>} + */ +const methodInfo_Scaffolder_GetAllTemplates = new grpc.web.AbstractClientBase.MethodInfo( + proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply, + /** + * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply.deserializeBinary +); + + +/** + * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.spotify.backstage.scaffolder.v1.GetAllTemplatesReply)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.spotify.backstage.scaffolder.v1.ScaffolderClient.prototype.getAllTemplates = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/spotify.backstage.scaffolder.v1.Scaffolder/GetAllTemplates', + request, + metadata || {}, + methodDescriptor_Scaffolder_GetAllTemplates, + callback); +}; + + +/** + * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.spotify.backstage.scaffolder.v1.ScaffolderPromiseClient.prototype.getAllTemplates = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/spotify.backstage.scaffolder.v1.Scaffolder/GetAllTemplates', + request, + metadata || {}, + methodDescriptor_Scaffolder_GetAllTemplates); +}; + + +module.exports = proto.spotify.backstage.scaffolder.v1; + diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts index a04b41d40a..0a795dc5f8 100644 --- a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts +++ b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts @@ -1,15 +1,11 @@ -// package: spotify.backstage.scaffolder.v1 -// file: scaffolder/v1/scaffolder.proto +import * as jspb from "google-protobuf" -import * as jspb from "google-protobuf"; -import * as identity_v1_identity_pb from "../../identity/v1/identity_pb"; +import * as identity_v1_identity_pb from '../../identity/v1/identity_pb'; export class Empty extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Empty.AsObject; static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Empty; static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; @@ -20,23 +16,21 @@ export namespace Empty { } } -export class GetAllTemplatesResponse extends jspb.Message { - clearTemplatesList(): void; +export class GetAllTemplatesReply extends jspb.Message { getTemplatesList(): Array