From b36dce187db059a8fc5f2b7e6ca002b0de2dd37f Mon Sep 17 00:00:00 2001 From: cs3org-bot Date: Wed, 3 Apr 2024 14:39:13 +0000 Subject: [PATCH] Synced to https://github.com/cs3org/cs3apis/tree/0f3d9ed4c9129335813f9038d6891536f3f26fd8 --- .../v1beta1/gateway_api_grpc_web_pb.js | 62 ++ listexistingreceivedsharesresponse.js | 335 +++++++++ ...ing.collaboration.v1beta1_receivedshare.js | 305 +++++++++ ...cs3.sharing.collaboration.v1beta1_share.js | 605 +++++++++++++++++ ...haring.collaboration.v1beta1_sharegrant.js | 296 ++++++++ ...3.sharing.collaboration.v1beta1_shareid.js | 170 +++++ ....sharing.collaboration.v1beta1_sharekey.js | 296 ++++++++ ....collaboration.v1beta1_sharepermissions.js | 192 ++++++ ...ng.collaboration.v1beta1_sharereference.js | 271 ++++++++ ...haring.collaboration.v1beta1_sharestate.js | 25 + receivedshare.js | 642 +++++++++++++++--- share.js | 436 ++++++++---- sharedresourceinfo.js | 296 ++++++++ sharegrant.js | 134 ++-- shareid.js | 58 +- sharekey.js | 112 +-- sharepermissions.js | 84 ++- sharereference.js | 169 +++-- sharestate.js | 6 +- 19 files changed, 3994 insertions(+), 500 deletions(-) create mode 100644 listexistingreceivedsharesresponse.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_receivedshare.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_share.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_sharegrant.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_shareid.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_sharekey.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_sharepermissions.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_sharereference.js create mode 100644 proto.cs3.sharing.collaboration.v1beta1_sharestate.js create mode 100644 sharedresourceinfo.js diff --git a/cs3/gateway/v1beta1/gateway_api_grpc_web_pb.js b/cs3/gateway/v1beta1/gateway_api_grpc_web_pb.js index a297bee..b084e31 100644 --- a/cs3/gateway/v1beta1/gateway_api_grpc_web_pb.js +++ b/cs3/gateway/v1beta1/gateway_api_grpc_web_pb.js @@ -52,6 +52,7 @@ goog.require('proto.cs3.gateway.v1beta1.GetQuotaRequest'); goog.require('proto.cs3.gateway.v1beta1.InitiateFileDownloadResponse'); goog.require('proto.cs3.gateway.v1beta1.InitiateFileUploadResponse'); goog.require('proto.cs3.gateway.v1beta1.ListAuthProvidersResponse'); +goog.require('proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse'); goog.require('proto.cs3.gateway.v1beta1.OpenInAppRequest'); goog.require('proto.cs3.gateway.v1beta1.WhoAmIRequest'); goog.require('proto.cs3.gateway.v1beta1.WhoAmIResponse'); @@ -2829,6 +2830,67 @@ proto.cs3.gateway.v1beta1.GatewayAPIPromiseClient.prototype.listReceivedShares = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest, + * !proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse>} + */ +const methodDescriptor_GatewayAPI_ListExistingReceivedShares = new grpc.web.MethodDescriptor( + '/cs3.gateway.v1beta1.GatewayAPI/ListExistingReceivedShares', + grpc.web.MethodType.UNARY, + proto.cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest, + proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse, + /** + * @param {!proto.cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.deserializeBinary +); + + +/** + * @param {!proto.cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cs3.gateway.v1beta1.GatewayAPIClient.prototype.listExistingReceivedShares = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cs3.gateway.v1beta1.GatewayAPI/ListExistingReceivedShares', + request, + metadata || {}, + methodDescriptor_GatewayAPI_ListExistingReceivedShares, + callback); +}; + + +/** + * @param {!proto.cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cs3.gateway.v1beta1.GatewayAPIPromiseClient.prototype.listExistingReceivedShares = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cs3.gateway.v1beta1.GatewayAPI/ListExistingReceivedShares', + request, + metadata || {}, + methodDescriptor_GatewayAPI_ListExistingReceivedShares); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/listexistingreceivedsharesresponse.js b/listexistingreceivedsharesresponse.js new file mode 100644 index 0000000..8a35387 --- /dev/null +++ b/listexistingreceivedsharesresponse.js @@ -0,0 +1,335 @@ +// source: cs3/gateway/v1beta1/gateway_api.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.gateway.v1beta1.SharedResourceInfo'); +goog.require('proto.cs3.rpc.v1beta1.Status'); +goog.require('proto.cs3.types.v1beta1.Opaque'); + +/** + * 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.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.displayName = 'proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.repeatedFields_ = [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.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.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.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: (f = msg.getStatus()) && proto.cs3.rpc.v1beta1.Status.toObject(includeInstance, f), + opaque: (f = msg.getOpaque()) && proto.cs3.types.v1beta1.Opaque.toObject(includeInstance, f), + sharesList: jspb.Message.toObjectList(msg.getSharesList(), + proto.cs3.gateway.v1beta1.SharedResourceInfo.toObject, includeInstance), + nextPageToken: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse; + return proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.rpc.v1beta1.Status; + reader.readMessage(value,proto.cs3.rpc.v1beta1.Status.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 2: + var value = new proto.cs3.types.v1beta1.Opaque; + reader.readMessage(value,proto.cs3.types.v1beta1.Opaque.deserializeBinaryFromReader); + msg.setOpaque(value); + break; + case 3: + var value = new proto.cs3.gateway.v1beta1.SharedResourceInfo; + reader.readMessage(value,proto.cs3.gateway.v1beta1.SharedResourceInfo.deserializeBinaryFromReader); + msg.addShares(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNextPageToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.rpc.v1beta1.Status.serializeBinaryToWriter + ); + } + f = message.getOpaque(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.types.v1beta1.Opaque.serializeBinaryToWriter + ); + } + f = message.getSharesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cs3.gateway.v1beta1.SharedResourceInfo.serializeBinaryToWriter + ); + } + f = message.getNextPageToken(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional cs3.rpc.v1beta1.Status status = 1; + * @return {?proto.cs3.rpc.v1beta1.Status} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.getStatus = function() { + return /** @type{?proto.cs3.rpc.v1beta1.Status} */ ( + jspb.Message.getWrapperField(this, proto.cs3.rpc.v1beta1.Status, 1)); +}; + + +/** + * @param {?proto.cs3.rpc.v1beta1.Status|undefined} value + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this +*/ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cs3.types.v1beta1.Opaque opaque = 2; + * @return {?proto.cs3.types.v1beta1.Opaque} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.getOpaque = function() { + return /** @type{?proto.cs3.types.v1beta1.Opaque} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Opaque, 2)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Opaque|undefined} value + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this +*/ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.setOpaque = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.clearOpaque = function() { + return this.setOpaque(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.hasOpaque = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated SharedResourceInfo shares = 3; + * @return {!Array} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.getSharesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cs3.gateway.v1beta1.SharedResourceInfo, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this +*/ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.setSharesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cs3.gateway.v1beta1.SharedResourceInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.addShares = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cs3.gateway.v1beta1.SharedResourceInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.clearSharesList = function() { + return this.setSharesList([]); +}; + + +/** + * optional string next_page_token = 4; + * @return {string} + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.getNextPageToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse} returns this + */ +proto.cs3.gateway.v1beta1.ListExistingReceivedSharesResponse.prototype.setNextPageToken = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_receivedshare.js b/proto.cs3.sharing.collaboration.v1beta1_receivedshare.js new file mode 100644 index 0000000..53adb8a --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_receivedshare.js @@ -0,0 +1,305 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ReceivedShare'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.Share'); +goog.require('proto.cs3.storage.provider.v1beta1.Reference'); + +goog.forwardDeclare('proto.cs3.sharing.collaboration.v1beta1.ShareState'); +/** + * 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.cs3.sharing.collaboration.v1beta1.ReceivedShare = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ReceivedShare, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ReceivedShare'; +} + + + +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.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.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.cs3.sharing.collaboration.v1beta1.ReceivedShare} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.toObject = function(includeInstance, msg) { + var f, obj = { + share: (f = msg.getShare()) && proto.cs3.sharing.collaboration.v1beta1.Share.toObject(includeInstance, f), + state: jspb.Message.getFieldWithDefault(msg, 2, 0), + mountPoint: (f = msg.getMountPoint()) && proto.cs3.storage.provider.v1beta1.Reference.toObject(includeInstance, f), + hidden: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.ReceivedShare; + return proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.sharing.collaboration.v1beta1.Share; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader); + msg.setShare(value); + break; + case 2: + var value = /** @type {!proto.cs3.sharing.collaboration.v1beta1.ShareState} */ (reader.readEnum()); + msg.setState(value); + break; + case 3: + var value = new proto.cs3.storage.provider.v1beta1.Reference; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Reference.deserializeBinaryFromReader); + msg.setMountPoint(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHidden(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getShare(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getMountPoint(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cs3.storage.provider.v1beta1.Reference.serializeBinaryToWriter + ); + } + f = message.getHidden(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional Share share = 1; + * @return {?proto.cs3.sharing.collaboration.v1beta1.Share} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getShare = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.Share} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.Share, 1)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.Share|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setShare = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearShare = function() { + return this.setShare(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.hasShare = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ShareState state = 2; + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareState} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getState = function() { + return /** @type {!proto.cs3.sharing.collaboration.v1beta1.ShareState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareState} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional cs3.storage.provider.v1beta1.Reference mount_point = 3; + * @return {?proto.cs3.storage.provider.v1beta1.Reference} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getMountPoint = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.Reference} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Reference, 3)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.Reference|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setMountPoint = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearMountPoint = function() { + return this.setMountPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.hasMountPoint = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool hidden = 4; + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getHidden = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setHidden = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_share.js b/proto.cs3.sharing.collaboration.v1beta1_share.js new file mode 100644 index 0000000..71431d2 --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_share.js @@ -0,0 +1,605 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.Share'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.identity.user.v1beta1.UserId'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareId'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); +goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); +goog.require('proto.cs3.storage.provider.v1beta1.ResourceId'); +goog.require('proto.cs3.types.v1beta1.Timestamp'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.Share = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.Share, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.Share.displayName = 'proto.cs3.sharing.collaboration.v1beta1.Share'; +} + + + +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.cs3.sharing.collaboration.v1beta1.Share.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.Share.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.cs3.sharing.collaboration.v1beta1.Share} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.Share.toObject = function(includeInstance, msg) { + var f, obj = { + id: (f = msg.getId()) && proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject(includeInstance, f), + resourceId: (f = msg.getResourceId()) && proto.cs3.storage.provider.v1beta1.ResourceId.toObject(includeInstance, f), + permissions: (f = msg.getPermissions()) && proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject(includeInstance, f), + grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.toObject(includeInstance, f), + owner: (f = msg.getOwner()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), + creator: (f = msg.getCreator()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), + ctime: (f = msg.getCtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + mtime: (f = msg.getMtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.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.cs3.sharing.collaboration.v1beta1.Share} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.Share; + return proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.Share} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.sharing.collaboration.v1beta1.ShareId; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader); + msg.setId(value); + break; + case 2: + var value = new proto.cs3.storage.provider.v1beta1.ResourceId; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourceId.deserializeBinaryFromReader); + msg.setResourceId(value); + break; + case 3: + var value = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + case 4: + var value = new proto.cs3.storage.provider.v1beta1.Grantee; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); + msg.setGrantee(value); + break; + case 5: + var value = new proto.cs3.identity.user.v1beta1.UserId; + reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); + msg.setOwner(value); + break; + case 6: + var value = new proto.cs3.identity.user.v1beta1.UserId; + reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); + msg.setCreator(value); + break; + case 7: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setCtime(value); + break; + case 8: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setMtime(value); + break; + case 9: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.Share} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter + ); + } + f = message.getResourceId(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.storage.provider.v1beta1.ResourceId.serializeBinaryToWriter + ); + } + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter + ); + } + f = message.getGrantee(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter + ); + } + f = message.getCtime(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } + f = message.getMtime(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ShareId id = 1; + * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareId} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getId = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareId, 1)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearId = function() { + return this.setId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.ResourceId resource_id = 2; + * @return {?proto.cs3.storage.provider.v1beta1.ResourceId} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getResourceId = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.ResourceId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceId, 2)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.ResourceId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setResourceId = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearResourceId = function() { + return this.setResourceId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasResourceId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SharePermissions permissions = 3; + * @return {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getPermissions = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.SharePermissions, 3)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setPermissions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearPermissions = function() { + return this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.Grantee grantee = 4; + * @return {?proto.cs3.storage.provider.v1beta1.Grantee} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getGrantee = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 4)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearGrantee = function() { + return this.setGrantee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional cs3.identity.user.v1beta1.UserId owner = 5; + * @return {?proto.cs3.identity.user.v1beta1.UserId} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getOwner = function() { + return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 5)); +}; + + +/** + * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearOwner = function() { + return this.setOwner(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasOwner = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional cs3.identity.user.v1beta1.UserId creator = 6; + * @return {?proto.cs3.identity.user.v1beta1.UserId} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getCreator = function() { + return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 6)); +}; + + +/** + * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setCreator = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCreator = function() { + return this.setCreator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasCreator = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp ctime = 7; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getCtime = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 7)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setCtime = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCtime = function() { + return this.setCtime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasCtime = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp mtime = 8; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getMtime = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 8)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setMtime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearMtime = function() { + return this.setMtime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasMtime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp expiration = 9; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getExpiration = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 9)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 9) != null; +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_sharegrant.js b/proto.cs3.sharing.collaboration.v1beta1_sharegrant.js new file mode 100644 index 0000000..2b216a4 --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_sharegrant.js @@ -0,0 +1,296 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareGrant'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); +goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); +goog.require('proto.cs3.types.v1beta1.Timestamp'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.ShareGrant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareGrant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.ShareGrant.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareGrant'; +} + + + +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.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.ShareGrant.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.cs3.sharing.collaboration.v1beta1.ShareGrant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.toObject = function(includeInstance, msg) { + var f, obj = { + grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.toObject(includeInstance, f), + permissions: (f = msg.getPermissions()) && proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.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.cs3.sharing.collaboration.v1beta1.ShareGrant} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareGrant; + return proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.storage.provider.v1beta1.Grantee; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); + msg.setGrantee(value); + break; + case 2: + var value = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + case 3: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGrantee(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter + ); + } + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cs3.storage.provider.v1beta1.Grantee grantee = 1; + * @return {?proto.cs3.storage.provider.v1beta1.Grantee} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getGrantee = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 1)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearGrantee = function() { + return this.setGrantee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SharePermissions permissions = 2; + * @return {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getPermissions = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.SharePermissions, 2)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setPermissions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearPermissions = function() { + return this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp expiration = 3; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getExpiration = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 3)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 3) != null; +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_shareid.js b/proto.cs3.sharing.collaboration.v1beta1_shareid.js new file mode 100644 index 0000000..c7eebdb --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_shareid.js @@ -0,0 +1,170 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareId'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.ShareId = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareId, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.ShareId.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareId'; +} + + + +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.cs3.sharing.collaboration.v1beta1.ShareId.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.ShareId.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.cs3.sharing.collaboration.v1beta1.ShareId} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject = function(includeInstance, msg) { + var f, obj = { + opaqueId: 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.cs3.sharing.collaboration.v1beta1.ShareId} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareId; + return proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareId} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareId} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOpaqueId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareId} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpaqueId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string opaque_id = 2; + * @return {string} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.getOpaqueId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareId} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.setOpaqueId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_sharekey.js b/proto.cs3.sharing.collaboration.v1beta1_sharekey.js new file mode 100644 index 0000000..5a43e4f --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_sharekey.js @@ -0,0 +1,296 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareKey'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.identity.user.v1beta1.UserId'); +goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); +goog.require('proto.cs3.storage.provider.v1beta1.ResourceId'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.ShareKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.ShareKey.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareKey'; +} + + + +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.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.ShareKey.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.cs3.sharing.collaboration.v1beta1.ShareKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.toObject = function(includeInstance, msg) { + var f, obj = { + owner: (f = msg.getOwner()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), + resourceId: (f = msg.getResourceId()) && proto.cs3.storage.provider.v1beta1.ResourceId.toObject(includeInstance, f), + grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.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.cs3.sharing.collaboration.v1beta1.ShareKey} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareKey; + return proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.cs3.identity.user.v1beta1.UserId; + reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); + msg.setOwner(value); + break; + case 3: + var value = new proto.cs3.storage.provider.v1beta1.ResourceId; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourceId.deserializeBinaryFromReader); + msg.setResourceId(value); + break; + case 4: + var value = new proto.cs3.storage.provider.v1beta1.Grantee; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); + msg.setGrantee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter + ); + } + f = message.getResourceId(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cs3.storage.provider.v1beta1.ResourceId.serializeBinaryToWriter + ); + } + f = message.getGrantee(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cs3.identity.user.v1beta1.UserId owner = 2; + * @return {?proto.cs3.identity.user.v1beta1.UserId} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getOwner = function() { + return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 2)); +}; + + +/** + * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearOwner = function() { + return this.setOwner(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasOwner = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.ResourceId resource_id = 3; + * @return {?proto.cs3.storage.provider.v1beta1.ResourceId} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getResourceId = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.ResourceId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceId, 3)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.ResourceId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setResourceId = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearResourceId = function() { + return this.setResourceId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasResourceId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.Grantee grantee = 4; + * @return {?proto.cs3.storage.provider.v1beta1.Grantee} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getGrantee = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 4)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearGrantee = function() { + return this.setGrantee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 4) != null; +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_sharepermissions.js b/proto.cs3.sharing.collaboration.v1beta1_sharepermissions.js new file mode 100644 index 0000000..c983621 --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_sharepermissions.js @@ -0,0 +1,192 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.storage.provider.v1beta1.ResourcePermissions'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.SharePermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.SharePermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.SharePermissions.displayName = 'proto.cs3.sharing.collaboration.v1beta1.SharePermissions'; +} + + + +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.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.SharePermissions.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.cs3.sharing.collaboration.v1beta1.SharePermissions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject = function(includeInstance, msg) { + var f, obj = { + permissions: (f = msg.getPermissions()) && proto.cs3.storage.provider.v1beta1.ResourcePermissions.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.cs3.sharing.collaboration.v1beta1.SharePermissions} + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; + return proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.storage.provider.v1beta1.ResourcePermissions; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourcePermissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.storage.provider.v1beta1.ResourcePermissions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cs3.storage.provider.v1beta1.ResourcePermissions permissions = 1; + * @return {?proto.cs3.storage.provider.v1beta1.ResourcePermissions} + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.getPermissions = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.ResourcePermissions} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourcePermissions, 1)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.ResourcePermissions|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.setPermissions = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.clearPermissions = function() { + return this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 1) != null; +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_sharereference.js b/proto.cs3.sharing.collaboration.v1beta1_sharereference.js new file mode 100644 index 0000000..37c3965 --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_sharereference.js @@ -0,0 +1,271 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareReference'); +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareId'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareKey'); + +/** + * 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.cs3.sharing.collaboration.v1beta1.ShareReference = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_); +}; +goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareReference, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.sharing.collaboration.v1beta1.ShareReference.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareReference'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase = { + SPEC_NOT_SET: 0, + ID: 1, + KEY: 2 +}; + +/** + * @return {proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getSpecCase = function() { + return /** @type {proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase} */(jspb.Message.computeOneofCase(this, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0])); +}; + + + +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.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.collaboration.v1beta1.ShareReference.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.cs3.sharing.collaboration.v1beta1.ShareReference} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.toObject = function(includeInstance, msg) { + var f, obj = { + id: (f = msg.getId()) && proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject(includeInstance, f), + key: (f = msg.getKey()) && proto.cs3.sharing.collaboration.v1beta1.ShareKey.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.cs3.sharing.collaboration.v1beta1.ShareReference} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareReference; + return proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.sharing.collaboration.v1beta1.ShareId; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader); + msg.setId(value); + break; + case 2: + var value = new proto.cs3.sharing.collaboration.v1beta1.ShareKey; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter + ); + } + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ShareId id = 1; + * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareId} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getId = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareId, 1)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareId|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.setId = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearId = function() { + return this.setId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ShareKey key = 2; + * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareKey} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getKey = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareKey} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareKey, 2)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareKey|undefined} value + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this +*/ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.setKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearKey = function() { + return this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.hasKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/proto.cs3.sharing.collaboration.v1beta1_sharestate.js b/proto.cs3.sharing.collaboration.v1beta1_sharestate.js new file mode 100644 index 0000000..7af478e --- /dev/null +++ b/proto.cs3.sharing.collaboration.v1beta1_sharestate.js @@ -0,0 +1,25 @@ +// source: cs3/sharing/collaboration/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareState'); + +/** + * @enum {number} + */ +proto.cs3.sharing.collaboration.v1beta1.ShareState = { + SHARE_STATE_INVALID: 0, + SHARE_STATE_PENDING: 1, + SHARE_STATE_ACCEPTED: 2, + SHARE_STATE_REJECTED: 3 +}; + diff --git a/receivedshare.js b/receivedshare.js index 53adb8a..4897d8a 100644 --- a/receivedshare.js +++ b/receivedshare.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,15 +11,21 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ReceivedShare'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ReceivedShare'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); goog.require('jspb.Message'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.Share'); -goog.require('proto.cs3.storage.provider.v1beta1.Reference'); - -goog.forwardDeclare('proto.cs3.sharing.collaboration.v1beta1.ShareState'); +goog.require('proto.cs3.identity.user.v1beta1.UserId'); +goog.require('proto.cs3.sharing.ocm.v1beta1.Protocol'); +goog.require('proto.cs3.sharing.ocm.v1beta1.ShareId'); +goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); +goog.require('proto.cs3.types.v1beta1.Opaque'); +goog.require('proto.cs3.types.v1beta1.Timestamp'); + +goog.forwardDeclare('proto.cs3.sharing.ocm.v1beta1.ShareState'); +goog.forwardDeclare('proto.cs3.sharing.ocm.v1beta1.ShareType'); +goog.forwardDeclare('proto.cs3.storage.provider.v1beta1.ResourceType'); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,18 +36,25 @@ goog.forwardDeclare('proto.cs3.sharing.collaboration.v1beta1.ShareState'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cs3.sharing.ocm.v1beta1.ReceivedShare.repeatedFields_, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ReceivedShare, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.ReceivedShare, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ReceivedShare'; + proto.cs3.sharing.ocm.v1beta1.ReceivedShare.displayName = 'proto.cs3.sharing.ocm.v1beta1.ReceivedShare'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.repeatedFields_ = [11]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -57,8 +70,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.ReceivedShare.toObject(opt_includeInstance, this); }; @@ -67,16 +80,27 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.toObject = funct * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.toObject = function(includeInstance, msg) { var f, obj = { - share: (f = msg.getShare()) && proto.cs3.sharing.collaboration.v1beta1.Share.toObject(includeInstance, f), - state: jspb.Message.getFieldWithDefault(msg, 2, 0), - mountPoint: (f = msg.getMountPoint()) && proto.cs3.storage.provider.v1beta1.Reference.toObject(includeInstance, f), - hidden: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + id: (f = msg.getId()) && proto.cs3.sharing.ocm.v1beta1.ShareId.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + remoteShareId: jspb.Message.getFieldWithDefault(msg, 3, ""), + grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.toObject(includeInstance, f), + owner: (f = msg.getOwner()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), + creator: (f = msg.getCreator()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), + ctime: (f = msg.getCtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + mtime: (f = msg.getMtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + shareType: jspb.Message.getFieldWithDefault(msg, 10, 0), + protocolsList: jspb.Message.toObjectList(msg.getProtocolsList(), + proto.cs3.sharing.ocm.v1beta1.Protocol.toObject, includeInstance), + state: jspb.Message.getFieldWithDefault(msg, 12, 0), + opaque: (f = msg.getOpaque()) && proto.cs3.types.v1beta1.Opaque.toObject(includeInstance, f), + resourceType: jspb.Message.getFieldWithDefault(msg, 14, 0) }; if (includeInstance) { @@ -90,23 +114,23 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.toObject = function(includ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.ReceivedShare; - return proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.ReceivedShare; + return proto.cs3.sharing.ocm.v1beta1.ReceivedShare.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -114,22 +138,69 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.cs3.sharing.collaboration.v1beta1.Share; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader); - msg.setShare(value); + var value = new proto.cs3.sharing.ocm.v1beta1.ShareId; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinaryFromReader); + msg.setId(value); break; case 2: - var value = /** @type {!proto.cs3.sharing.collaboration.v1beta1.ShareState} */ (reader.readEnum()); - msg.setState(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; case 3: - var value = new proto.cs3.storage.provider.v1beta1.Reference; - reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Reference.deserializeBinaryFromReader); - msg.setMountPoint(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteShareId(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setHidden(value); + var value = new proto.cs3.storage.provider.v1beta1.Grantee; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); + msg.setGrantee(value); + break; + case 5: + var value = new proto.cs3.identity.user.v1beta1.UserId; + reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); + msg.setOwner(value); + break; + case 6: + var value = new proto.cs3.identity.user.v1beta1.UserId; + reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); + msg.setCreator(value); + break; + case 7: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setCtime(value); + break; + case 8: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setMtime(value); + break; + case 9: + var value = new proto.cs3.types.v1beta1.Timestamp; + reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + case 10: + var value = /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareType} */ (reader.readEnum()); + msg.setShareType(value); + break; + case 11: + var value = new proto.cs3.sharing.ocm.v1beta1.Protocol; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.Protocol.deserializeBinaryFromReader); + msg.addProtocols(value); + break; + case 12: + var value = /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareState} */ (reader.readEnum()); + msg.setState(value); + break; + case 13: + var value = new proto.cs3.types.v1beta1.Opaque; + reader.readMessage(value,proto.cs3.types.v1beta1.Opaque.deserializeBinaryFromReader); + msg.setOpaque(value); + break; + case 14: + var value = /** @type {!proto.cs3.storage.provider.v1beta1.ResourceType} */ (reader.readEnum()); + msg.setResourceType(value); break; default: reader.skipField(); @@ -144,9 +215,9 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.ReceivedShare.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -154,39 +225,116 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} message + * @param {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getShare(); + f = message.getId(); if (f != null) { writer.writeMessage( 1, f, - proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter + proto.cs3.sharing.ocm.v1beta1.ShareId.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRemoteShareId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGrantee(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter + ); + } + f = message.getCtime(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } + f = message.getMtime(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + ); + } + f = message.getShareType(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } + f = message.getProtocolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.cs3.sharing.ocm.v1beta1.Protocol.serializeBinaryToWriter ); } f = message.getState(); if (f !== 0.0) { writer.writeEnum( - 2, + 12, f ); } - f = message.getMountPoint(); + f = message.getOpaque(); if (f != null) { writer.writeMessage( - 3, + 13, f, - proto.cs3.storage.provider.v1beta1.Reference.serializeBinaryToWriter + proto.cs3.types.v1beta1.Opaque.serializeBinaryToWriter ); } - f = message.getHidden(); - if (f) { - writer.writeBool( - 4, + f = message.getResourceType(); + if (f !== 0.0) { + writer.writeEnum( + 14, f ); } @@ -194,30 +342,30 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter = /** - * optional Share share = 1; - * @return {?proto.cs3.sharing.collaboration.v1beta1.Share} + * optional ShareId id = 1; + * @return {?proto.cs3.sharing.ocm.v1beta1.ShareId} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getShare = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.Share} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.Share, 1)); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getId = function() { + return /** @type{?proto.cs3.sharing.ocm.v1beta1.ShareId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.ocm.v1beta1.ShareId, 1)); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.Share|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * @param {?proto.cs3.sharing.ocm.v1beta1.ShareId|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setShare = function(value) { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearShare = function() { - return this.setShare(undefined); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearId = function() { + return this.setId(undefined); }; @@ -225,54 +373,109 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearShare = fun * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.hasShare = function() { +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional ShareState state = 2; - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareState} + * optional string name = 2; + * @return {string} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string remote_share_id = 3; + * @return {string} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getRemoteShareId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setRemoteShareId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional cs3.storage.provider.v1beta1.Grantee grantee = 4; + * @return {?proto.cs3.storage.provider.v1beta1.Grantee} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getGrantee = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 4)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getState = function() { - return /** @type {!proto.cs3.sharing.collaboration.v1beta1.ShareState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearGrantee = function() { + return this.setGrantee(undefined); }; /** - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareState} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional cs3.storage.provider.v1beta1.Reference mount_point = 3; - * @return {?proto.cs3.storage.provider.v1beta1.Reference} + * optional cs3.identity.user.v1beta1.UserId owner = 5; + * @return {?proto.cs3.identity.user.v1beta1.UserId} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getMountPoint = function() { - return /** @type{?proto.cs3.storage.provider.v1beta1.Reference} */ ( - jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Reference, 3)); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getOwner = function() { + return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 5)); }; /** - * @param {?proto.cs3.storage.provider.v1beta1.Reference|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setMountPoint = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearMountPoint = function() { - return this.setMountPoint(undefined); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearOwner = function() { + return this.setOwner(undefined); }; @@ -280,26 +483,285 @@ proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.clearMountPoint * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.hasMountPoint = function() { - return jspb.Message.getField(this, 3) != null; +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasOwner = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional cs3.identity.user.v1beta1.UserId creator = 6; + * @return {?proto.cs3.identity.user.v1beta1.UserId} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getCreator = function() { + return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 6)); +}; + + +/** + * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setCreator = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearCreator = function() { + return this.setCreator(undefined); }; /** - * optional bool hidden = 4; + * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.getHidden = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasCreator = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp ctime = 7; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getCtime = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 7)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setCtime = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearCtime = function() { + return this.setCtime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasCtime = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp mtime = 8; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getMtime = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 8)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setMtime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearMtime = function() { + return this.setMtime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasMtime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional cs3.types.v1beta1.Timestamp expiration = 9; + * @return {?proto.cs3.types.v1beta1.Timestamp} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getExpiration = function() { + return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 9)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional ShareType share_type = 10; + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareType} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getShareType = function() { + return /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareType} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setShareType = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + +/** + * repeated Protocol protocols = 11; + * @return {!Array} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getProtocolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cs3.sharing.ocm.v1beta1.Protocol, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setProtocolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.cs3.sharing.ocm.v1beta1.Protocol=} opt_value + * @param {number=} opt_index + * @return {!proto.cs3.sharing.ocm.v1beta1.Protocol} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.addProtocols = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.cs3.sharing.ocm.v1beta1.Protocol, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearProtocolsList = function() { + return this.setProtocolsList([]); +}; + + +/** + * optional ShareState state = 12; + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareState} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getState = function() { + return /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareState} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareState} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 12, value); +}; + + +/** + * optional cs3.types.v1beta1.Opaque opaque = 13; + * @return {?proto.cs3.types.v1beta1.Opaque} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getOpaque = function() { + return /** @type{?proto.cs3.types.v1beta1.Opaque} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Opaque, 13)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Opaque|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setOpaque = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.clearOpaque = function() { + return this.setOpaque(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.hasOpaque = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.ResourceType resource_type = 14; + * @return {!proto.cs3.storage.provider.v1beta1.ResourceType} + */ +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.getResourceType = function() { + return /** @type {!proto.cs3.storage.provider.v1beta1.ResourceType} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; /** - * @param {boolean} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} returns this + * @param {!proto.cs3.storage.provider.v1beta1.ResourceType} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ReceivedShare} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.prototype.setHidden = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.cs3.sharing.ocm.v1beta1.ReceivedShare.prototype.setResourceType = function(value) { + return jspb.Message.setProto3EnumField(this, 14, value); }; diff --git a/share.js b/share.js index 71431d2..704000b 100644 --- a/share.js +++ b/share.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,18 +11,20 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.Share'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.Share'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); goog.require('jspb.Message'); goog.require('proto.cs3.identity.user.v1beta1.UserId'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareId'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); +goog.require('proto.cs3.sharing.ocm.v1beta1.AccessMethod'); +goog.require('proto.cs3.sharing.ocm.v1beta1.ShareId'); goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); goog.require('proto.cs3.storage.provider.v1beta1.ResourceId'); +goog.require('proto.cs3.types.v1beta1.Opaque'); goog.require('proto.cs3.types.v1beta1.Timestamp'); +goog.forwardDeclare('proto.cs3.sharing.ocm.v1beta1.ShareType'); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -33,18 +35,25 @@ goog.require('proto.cs3.types.v1beta1.Timestamp'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.Share = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.cs3.sharing.ocm.v1beta1.Share = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cs3.sharing.ocm.v1beta1.Share.repeatedFields_, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.Share, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.Share, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.Share.displayName = 'proto.cs3.sharing.collaboration.v1beta1.Share'; + proto.cs3.sharing.ocm.v1beta1.Share.displayName = 'proto.cs3.sharing.ocm.v1beta1.Share'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cs3.sharing.ocm.v1beta1.Share.repeatedFields_ = [12]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -60,8 +69,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.Share.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.Share.toObject(opt_includeInstance, this); }; @@ -70,21 +79,26 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.Share} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.Share} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.Share.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.Share.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject(includeInstance, f), + id: (f = msg.getId()) && proto.cs3.sharing.ocm.v1beta1.ShareId.toObject(includeInstance, f), resourceId: (f = msg.getResourceId()) && proto.cs3.storage.provider.v1beta1.ResourceId.toObject(includeInstance, f), - permissions: (f = msg.getPermissions()) && proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + token: jspb.Message.getFieldWithDefault(msg, 4, ""), grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.toObject(includeInstance, f), owner: (f = msg.getOwner()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), creator: (f = msg.getCreator()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), ctime: (f = msg.getCtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), mtime: (f = msg.getMtime()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), - expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f) + expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f), + shareType: jspb.Message.getFieldWithDefault(msg, 11, 0), + accessMethodsList: jspb.Message.toObjectList(msg.getAccessMethodsList(), + proto.cs3.sharing.ocm.v1beta1.AccessMethod.toObject, includeInstance), + opaque: (f = msg.getOpaque()) && proto.cs3.types.v1beta1.Opaque.toObject(includeInstance, f) }; if (includeInstance) { @@ -98,23 +112,23 @@ proto.cs3.sharing.collaboration.v1beta1.Share.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} */ -proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.Share.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.Share; - return proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.Share; + return proto.cs3.sharing.ocm.v1beta1.Share.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.Share} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.Share} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} */ -proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.Share.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -122,8 +136,8 @@ proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.cs3.sharing.collaboration.v1beta1.ShareId; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader); + var value = new proto.cs3.sharing.ocm.v1beta1.ShareId; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinaryFromReader); msg.setId(value); break; case 2: @@ -132,40 +146,57 @@ proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader = func msg.setResourceId(value); break; case 3: - var value = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader); - msg.setPermissions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + case 5: var value = new proto.cs3.storage.provider.v1beta1.Grantee; reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); msg.setGrantee(value); break; - case 5: + case 6: var value = new proto.cs3.identity.user.v1beta1.UserId; reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); msg.setOwner(value); break; - case 6: + case 7: var value = new proto.cs3.identity.user.v1beta1.UserId; reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); msg.setCreator(value); break; - case 7: + case 8: var value = new proto.cs3.types.v1beta1.Timestamp; reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); msg.setCtime(value); break; - case 8: + case 9: var value = new proto.cs3.types.v1beta1.Timestamp; reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); msg.setMtime(value); break; - case 9: + case 10: var value = new proto.cs3.types.v1beta1.Timestamp; reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); msg.setExpiration(value); break; + case 11: + var value = /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareType} */ (reader.readEnum()); + msg.setShareType(value); + break; + case 12: + var value = new proto.cs3.sharing.ocm.v1beta1.AccessMethod; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.AccessMethod.deserializeBinaryFromReader); + msg.addAccessMethods(value); + break; + case 13: + var value = new proto.cs3.types.v1beta1.Opaque; + reader.readMessage(value,proto.cs3.types.v1beta1.Opaque.deserializeBinaryFromReader); + msg.setOpaque(value); + break; default: reader.skipField(); break; @@ -179,9 +210,9 @@ proto.cs3.sharing.collaboration.v1beta1.Share.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.Share.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -189,18 +220,18 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.Share} message + * @param {!proto.cs3.sharing.ocm.v1beta1.Share} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.Share.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f != null) { writer.writeMessage( 1, f, - proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter + proto.cs3.sharing.ocm.v1beta1.ShareId.serializeBinaryToWriter ); } f = message.getResourceId(); @@ -211,18 +242,24 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function proto.cs3.storage.provider.v1beta1.ResourceId.serializeBinaryToWriter ); } - f = message.getPermissions(); - if (f != null) { - writer.writeMessage( + f = message.getName(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter + f + ); + } + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 4, + f ); } f = message.getGrantee(); if (f != null) { writer.writeMessage( - 4, + 5, f, proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter ); @@ -230,7 +267,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function f = message.getOwner(); if (f != null) { writer.writeMessage( - 5, + 6, f, proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter ); @@ -238,7 +275,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function f = message.getCreator(); if (f != null) { writer.writeMessage( - 6, + 7, f, proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter ); @@ -246,7 +283,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function f = message.getCtime(); if (f != null) { writer.writeMessage( - 7, + 8, f, proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter ); @@ -254,7 +291,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function f = message.getMtime(); if (f != null) { writer.writeMessage( - 8, + 9, f, proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter ); @@ -262,38 +299,61 @@ proto.cs3.sharing.collaboration.v1beta1.Share.serializeBinaryToWriter = function f = message.getExpiration(); if (f != null) { writer.writeMessage( - 9, + 10, f, proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter ); } + f = message.getShareType(); + if (f !== 0.0) { + writer.writeEnum( + 11, + f + ); + } + f = message.getAccessMethodsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.cs3.sharing.ocm.v1beta1.AccessMethod.serializeBinaryToWriter + ); + } + f = message.getOpaque(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.cs3.types.v1beta1.Opaque.serializeBinaryToWriter + ); + } }; /** * optional ShareId id = 1; - * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareId} + * @return {?proto.cs3.sharing.ocm.v1beta1.ShareId} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getId = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareId, 1)); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getId = function() { + return /** @type{?proto.cs3.sharing.ocm.v1beta1.ShareId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.ocm.v1beta1.ShareId, 1)); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @param {?proto.cs3.sharing.ocm.v1beta1.ShareId|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setId = function(value) { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearId = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearId = function() { return this.setId(undefined); }; @@ -302,7 +362,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearId = function() { * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasId = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; @@ -311,7 +371,7 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasId = function() { * optional cs3.storage.provider.v1beta1.ResourceId resource_id = 2; * @return {?proto.cs3.storage.provider.v1beta1.ResourceId} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getResourceId = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getResourceId = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.ResourceId} */ ( jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceId, 2)); }; @@ -319,18 +379,18 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getResourceId = function /** * @param {?proto.cs3.storage.provider.v1beta1.ResourceId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setResourceId = function(value) { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setResourceId = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearResourceId = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearResourceId = function() { return this.setResourceId(undefined); }; @@ -339,72 +399,71 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearResourceId = functi * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasResourceId = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasResourceId = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional SharePermissions permissions = 3; - * @return {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + * optional string name = 3; + * @return {string} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getPermissions = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.SharePermissions, 3)); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this -*/ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setPermissions = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {string} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * optional string token = 4; + * @return {string} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearPermissions = function() { - return this.setPermissions(undefined); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasPermissions = function() { - return jspb.Message.getField(this, 3) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional cs3.storage.provider.v1beta1.Grantee grantee = 4; + * optional cs3.storage.provider.v1beta1.Grantee grantee = 5; * @return {?proto.cs3.storage.provider.v1beta1.Grantee} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getGrantee = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( - jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 4)); + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 5)); }; /** * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setGrantee = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearGrantee = function() { return this.setGrantee(undefined); }; @@ -413,35 +472,35 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearGrantee = function( * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasGrantee = function() { - return jspb.Message.getField(this, 4) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional cs3.identity.user.v1beta1.UserId owner = 5; + * optional cs3.identity.user.v1beta1.UserId owner = 6; * @return {?proto.cs3.identity.user.v1beta1.UserId} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getOwner = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getOwner = function() { return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 5)); + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 6)); }; /** * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setOwner = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearOwner = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearOwner = function() { return this.setOwner(undefined); }; @@ -450,35 +509,35 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearOwner = function() * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasOwner = function() { - return jspb.Message.getField(this, 5) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasOwner = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional cs3.identity.user.v1beta1.UserId creator = 6; + * optional cs3.identity.user.v1beta1.UserId creator = 7; * @return {?proto.cs3.identity.user.v1beta1.UserId} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getCreator = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getCreator = function() { return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 6)); + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 7)); }; /** * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setCreator = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setCreator = function(value) { + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCreator = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearCreator = function() { return this.setCreator(undefined); }; @@ -487,35 +546,35 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCreator = function( * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasCreator = function() { - return jspb.Message.getField(this, 6) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasCreator = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * optional cs3.types.v1beta1.Timestamp ctime = 7; + * optional cs3.types.v1beta1.Timestamp ctime = 8; * @return {?proto.cs3.types.v1beta1.Timestamp} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getCtime = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getCtime = function() { return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( - jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 7)); + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 8)); }; /** * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setCtime = function(value) { - return jspb.Message.setWrapperField(this, 7, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setCtime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCtime = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearCtime = function() { return this.setCtime(undefined); }; @@ -524,35 +583,35 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearCtime = function() * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasCtime = function() { - return jspb.Message.getField(this, 7) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasCtime = function() { + return jspb.Message.getField(this, 8) != null; }; /** - * optional cs3.types.v1beta1.Timestamp mtime = 8; + * optional cs3.types.v1beta1.Timestamp mtime = 9; * @return {?proto.cs3.types.v1beta1.Timestamp} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getMtime = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getMtime = function() { return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( - jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 8)); + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 9)); }; /** * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setMtime = function(value) { - return jspb.Message.setWrapperField(this, 8, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setMtime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearMtime = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearMtime = function() { return this.setMtime(undefined); }; @@ -561,35 +620,35 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearMtime = function() * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasMtime = function() { - return jspb.Message.getField(this, 8) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasMtime = function() { + return jspb.Message.getField(this, 9) != null; }; /** - * optional cs3.types.v1beta1.Timestamp expiration = 9; + * optional cs3.types.v1beta1.Timestamp expiration = 10; * @return {?proto.cs3.types.v1beta1.Timestamp} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.getExpiration = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getExpiration = function() { return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( - jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 9)); + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 10)); }; /** * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.setExpiration = function(value) { - return jspb.Message.setWrapperField(this, 9, value); +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.Share} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearExpiration = function() { +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearExpiration = function() { return this.setExpiration(undefined); }; @@ -598,8 +657,101 @@ proto.cs3.sharing.collaboration.v1beta1.Share.prototype.clearExpiration = functi * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.Share.prototype.hasExpiration = function() { - return jspb.Message.getField(this, 9) != null; +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ShareType share_type = 11; + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareType} + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getShareType = function() { + return /** @type {!proto.cs3.sharing.ocm.v1beta1.ShareType} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareType} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setShareType = function(value) { + return jspb.Message.setProto3EnumField(this, 11, value); +}; + + +/** + * repeated AccessMethod access_methods = 12; + * @return {!Array} + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getAccessMethodsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cs3.sharing.ocm.v1beta1.AccessMethod, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setAccessMethodsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.cs3.sharing.ocm.v1beta1.AccessMethod=} opt_value + * @param {number=} opt_index + * @return {!proto.cs3.sharing.ocm.v1beta1.AccessMethod} + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.addAccessMethods = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.cs3.sharing.ocm.v1beta1.AccessMethod, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearAccessMethodsList = function() { + return this.setAccessMethodsList([]); +}; + + +/** + * optional cs3.types.v1beta1.Opaque opaque = 13; + * @return {?proto.cs3.types.v1beta1.Opaque} + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.getOpaque = function() { + return /** @type{?proto.cs3.types.v1beta1.Opaque} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Opaque, 13)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Opaque|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this +*/ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.setOpaque = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.Share} returns this + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.clearOpaque = function() { + return this.setOpaque(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.Share.prototype.hasOpaque = function() { + return jspb.Message.getField(this, 13) != null; }; diff --git a/sharedresourceinfo.js b/sharedresourceinfo.js new file mode 100644 index 0000000..16bc744 --- /dev/null +++ b/sharedresourceinfo.js @@ -0,0 +1,296 @@ +// source: cs3/gateway/v1beta1/resources.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +goog.provide('proto.cs3.gateway.v1beta1.SharedResourceInfo'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.cs3.sharing.collaboration.v1beta1.ReceivedShare'); +goog.require('proto.cs3.storage.provider.v1beta1.ResourceInfo'); +goog.require('proto.cs3.types.v1beta1.Opaque'); + +/** + * 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.cs3.gateway.v1beta1.SharedResourceInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cs3.gateway.v1beta1.SharedResourceInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cs3.gateway.v1beta1.SharedResourceInfo.displayName = 'proto.cs3.gateway.v1beta1.SharedResourceInfo'; +} + + + +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.cs3.gateway.v1beta1.SharedResourceInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.gateway.v1beta1.SharedResourceInfo.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.cs3.gateway.v1beta1.SharedResourceInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.toObject = function(includeInstance, msg) { + var f, obj = { + opaque: (f = msg.getOpaque()) && proto.cs3.types.v1beta1.Opaque.toObject(includeInstance, f), + share: (f = msg.getShare()) && proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.toObject(includeInstance, f), + resourceInfo: (f = msg.getResourceInfo()) && proto.cs3.storage.provider.v1beta1.ResourceInfo.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.cs3.gateway.v1beta1.SharedResourceInfo} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cs3.gateway.v1beta1.SharedResourceInfo; + return proto.cs3.gateway.v1beta1.SharedResourceInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cs3.gateway.v1beta1.SharedResourceInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cs3.types.v1beta1.Opaque; + reader.readMessage(value,proto.cs3.types.v1beta1.Opaque.deserializeBinaryFromReader); + msg.setOpaque(value); + break; + case 2: + var value = new proto.cs3.sharing.collaboration.v1beta1.ReceivedShare; + reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.deserializeBinaryFromReader); + msg.setShare(value); + break; + case 3: + var value = new proto.cs3.storage.provider.v1beta1.ResourceInfo; + reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourceInfo.deserializeBinaryFromReader); + msg.setResourceInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cs3.gateway.v1beta1.SharedResourceInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cs3.gateway.v1beta1.SharedResourceInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpaque(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cs3.types.v1beta1.Opaque.serializeBinaryToWriter + ); + } + f = message.getShare(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cs3.sharing.collaboration.v1beta1.ReceivedShare.serializeBinaryToWriter + ); + } + f = message.getResourceInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cs3.storage.provider.v1beta1.ResourceInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cs3.types.v1beta1.Opaque opaque = 1; + * @return {?proto.cs3.types.v1beta1.Opaque} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.getOpaque = function() { + return /** @type{?proto.cs3.types.v1beta1.Opaque} */ ( + jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Opaque, 1)); +}; + + +/** + * @param {?proto.cs3.types.v1beta1.Opaque|undefined} value + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this +*/ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.setOpaque = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.clearOpaque = function() { + return this.setOpaque(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.hasOpaque = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cs3.sharing.collaboration.v1beta1.ReceivedShare share = 2; + * @return {?proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.getShare = function() { + return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ReceivedShare} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ReceivedShare, 2)); +}; + + +/** + * @param {?proto.cs3.sharing.collaboration.v1beta1.ReceivedShare|undefined} value + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this +*/ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.setShare = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.clearShare = function() { + return this.setShare(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.hasShare = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cs3.storage.provider.v1beta1.ResourceInfo resource_info = 3; + * @return {?proto.cs3.storage.provider.v1beta1.ResourceInfo} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.getResourceInfo = function() { + return /** @type{?proto.cs3.storage.provider.v1beta1.ResourceInfo} */ ( + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceInfo, 3)); +}; + + +/** + * @param {?proto.cs3.storage.provider.v1beta1.ResourceInfo|undefined} value + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this +*/ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.setResourceInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cs3.gateway.v1beta1.SharedResourceInfo} returns this + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.clearResourceInfo = function() { + return this.setResourceInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.gateway.v1beta1.SharedResourceInfo.prototype.hasResourceInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + diff --git a/sharegrant.js b/sharegrant.js index 2b216a4..cc05457 100644 --- a/sharegrant.js +++ b/sharegrant.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,14 +11,13 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareGrant'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareGrant'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); goog.require('jspb.Message'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); +goog.require('proto.cs3.sharing.ocm.v1beta1.SharePermissions'); goog.require('proto.cs3.storage.provider.v1beta1.Grantee'); -goog.require('proto.cs3.types.v1beta1.Timestamp'); /** * Generated by JsPbCodeGenerator. @@ -30,16 +29,16 @@ goog.require('proto.cs3.types.v1beta1.Timestamp'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant = function(opt_data) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareGrant, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.ShareGrant, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.ShareGrant.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareGrant'; + proto.cs3.sharing.ocm.v1beta1.ShareGrant.displayName = 'proto.cs3.sharing.ocm.v1beta1.ShareGrant'; } @@ -57,8 +56,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.ShareGrant.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.ShareGrant.toObject(opt_includeInstance, this); }; @@ -67,15 +66,14 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.toObject = function(includeInstance, msg) { var f, obj = { grantee: (f = msg.getGrantee()) && proto.cs3.storage.provider.v1beta1.Grantee.toObject(includeInstance, f), - permissions: (f = msg.getPermissions()) && proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject(includeInstance, f), - expiration: (f = msg.getExpiration()) && proto.cs3.types.v1beta1.Timestamp.toObject(includeInstance, f) + permissions: (f = msg.getPermissions()) && proto.cs3.sharing.ocm.v1beta1.SharePermissions.toObject(includeInstance, f) }; if (includeInstance) { @@ -89,23 +87,23 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareGrant; - return proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.ShareGrant; + return proto.cs3.sharing.ocm.v1beta1.ShareGrant.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -118,15 +116,10 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader = msg.setGrantee(value); break; case 2: - var value = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader); + var value = new proto.cs3.sharing.ocm.v1beta1.SharePermissions; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.SharePermissions.deserializeBinaryFromReader); msg.setPermissions(value); break; - case 3: - var value = new proto.cs3.types.v1beta1.Timestamp; - reader.readMessage(value,proto.cs3.types.v1beta1.Timestamp.deserializeBinaryFromReader); - msg.setExpiration(value); - break; default: reader.skipField(); break; @@ -140,9 +133,9 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.ShareGrant.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -150,11 +143,11 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} message + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGrantee(); if (f != null) { @@ -169,15 +162,7 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter = fun writer.writeMessage( 2, f, - proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter - ); - } - f = message.getExpiration(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.cs3.types.v1beta1.Timestamp.serializeBinaryToWriter + proto.cs3.sharing.ocm.v1beta1.SharePermissions.serializeBinaryToWriter ); } }; @@ -187,7 +172,7 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.serializeBinaryToWriter = fun * optional cs3.storage.provider.v1beta1.Grantee grantee = 1; * @return {?proto.cs3.storage.provider.v1beta1.Grantee} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.getGrantee = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 1)); }; @@ -195,18 +180,18 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getGrantee = functi /** * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setGrantee = function(value) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.setGrantee = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.clearGrantee = function() { return this.setGrantee(undefined); }; @@ -215,35 +200,35 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearGrantee = func * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.hasGrantee = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional SharePermissions permissions = 2; - * @return {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + * @return {?proto.cs3.sharing.ocm.v1beta1.SharePermissions} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getPermissions = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.SharePermissions} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.SharePermissions, 2)); +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.getPermissions = function() { + return /** @type{?proto.cs3.sharing.ocm.v1beta1.SharePermissions} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.ocm.v1beta1.SharePermissions, 2)); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.SharePermissions|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + * @param {?proto.cs3.sharing.ocm.v1beta1.SharePermissions|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setPermissions = function(value) { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.setPermissions = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareGrant} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearPermissions = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.clearPermissions = function() { return this.setPermissions(undefined); }; @@ -252,45 +237,8 @@ proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearPermissions = * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasPermissions = function() { +proto.cs3.sharing.ocm.v1beta1.ShareGrant.prototype.hasPermissions = function() { return jspb.Message.getField(this, 2) != null; }; -/** - * optional cs3.types.v1beta1.Timestamp expiration = 3; - * @return {?proto.cs3.types.v1beta1.Timestamp} - */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.getExpiration = function() { - return /** @type{?proto.cs3.types.v1beta1.Timestamp} */ ( - jspb.Message.getWrapperField(this, proto.cs3.types.v1beta1.Timestamp, 3)); -}; - - -/** - * @param {?proto.cs3.types.v1beta1.Timestamp|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this -*/ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.setExpiration = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareGrant} returns this - */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.clearExpiration = function() { - return this.setExpiration(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cs3.sharing.collaboration.v1beta1.ShareGrant.prototype.hasExpiration = function() { - return jspb.Message.getField(this, 3) != null; -}; - - diff --git a/shareid.js b/shareid.js index c7eebdb..3237d2d 100644 --- a/shareid.js +++ b/shareid.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,7 +11,7 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareId'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareId'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); @@ -27,16 +27,16 @@ goog.require('jspb.Message'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.ShareId = function(opt_data) { +proto.cs3.sharing.ocm.v1beta1.ShareId = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareId, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.ShareId, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.ShareId.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareId'; + proto.cs3.sharing.ocm.v1beta1.ShareId.displayName = 'proto.cs3.sharing.ocm.v1beta1.ShareId'; } @@ -54,8 +54,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.ShareId.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.ShareId.toObject(opt_includeInstance, this); }; @@ -64,13 +64,13 @@ proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareId} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.ShareId.toObject = function(includeInstance, msg) { var f, obj = { - opaqueId: jspb.Message.getFieldWithDefault(msg, 2, "") + opaqueId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -84,30 +84,30 @@ proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareId} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareId} */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareId; - return proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.ShareId; + return proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareId} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareId} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareId} */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: + case 1: var value = /** @type {string} */ (reader.readString()); msg.setOpaqueId(value); break; @@ -124,9 +124,9 @@ proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.ShareId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.ShareId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -134,16 +134,16 @@ proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareId} message + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.ShareId.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOpaqueId(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } @@ -151,20 +151,20 @@ proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter = functi /** - * optional string opaque_id = 2; + * optional string opaque_id = 1; * @return {string} */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.getOpaqueId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.cs3.sharing.ocm.v1beta1.ShareId.prototype.getOpaqueId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareId} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareId} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareId.prototype.setOpaqueId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.cs3.sharing.ocm.v1beta1.ShareId.prototype.setOpaqueId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; diff --git a/sharekey.js b/sharekey.js index 5a43e4f..b17cc23 100644 --- a/sharekey.js +++ b/sharekey.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,7 +11,7 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareKey'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareKey'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); @@ -30,16 +30,16 @@ goog.require('proto.cs3.storage.provider.v1beta1.ResourceId'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey = function(opt_data) { +proto.cs3.sharing.ocm.v1beta1.ShareKey = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareKey, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.ShareKey, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.ShareKey.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareKey'; + proto.cs3.sharing.ocm.v1beta1.ShareKey.displayName = 'proto.cs3.sharing.ocm.v1beta1.ShareKey'; } @@ -57,8 +57,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.ShareKey.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.ShareKey.toObject(opt_includeInstance, this); }; @@ -67,11 +67,11 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareKey} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.ShareKey.toObject = function(includeInstance, msg) { var f, obj = { owner: (f = msg.getOwner()) && proto.cs3.identity.user.v1beta1.UserId.toObject(includeInstance, f), resourceId: (f = msg.getResourceId()) && proto.cs3.storage.provider.v1beta1.ResourceId.toObject(includeInstance, f), @@ -89,40 +89,40 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.ShareKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareKey; - return proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.ShareKey; + return proto.cs3.sharing.ocm.v1beta1.ShareKey.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.ShareKey.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: + case 1: var value = new proto.cs3.identity.user.v1beta1.UserId; reader.readMessage(value,proto.cs3.identity.user.v1beta1.UserId.deserializeBinaryFromReader); msg.setOwner(value); break; - case 3: + case 2: var value = new proto.cs3.storage.provider.v1beta1.ResourceId; reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourceId.deserializeBinaryFromReader); msg.setResourceId(value); break; - case 4: + case 3: var value = new proto.cs3.storage.provider.v1beta1.Grantee; reader.readMessage(value,proto.cs3.storage.provider.v1beta1.Grantee.deserializeBinaryFromReader); msg.setGrantee(value); @@ -140,9 +140,9 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.ShareKey.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -150,16 +150,16 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} message + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareKey} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.ShareKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOwner(); if (f != null) { writer.writeMessage( - 2, + 1, f, proto.cs3.identity.user.v1beta1.UserId.serializeBinaryToWriter ); @@ -167,7 +167,7 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter = funct f = message.getResourceId(); if (f != null) { writer.writeMessage( - 3, + 2, f, proto.cs3.storage.provider.v1beta1.ResourceId.serializeBinaryToWriter ); @@ -175,7 +175,7 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter = funct f = message.getGrantee(); if (f != null) { writer.writeMessage( - 4, + 3, f, proto.cs3.storage.provider.v1beta1.Grantee.serializeBinaryToWriter ); @@ -184,29 +184,29 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter = funct /** - * optional cs3.identity.user.v1beta1.UserId owner = 2; + * optional cs3.identity.user.v1beta1.UserId owner = 1; * @return {?proto.cs3.identity.user.v1beta1.UserId} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getOwner = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.getOwner = function() { return /** @type{?proto.cs3.identity.user.v1beta1.UserId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 2)); + jspb.Message.getWrapperField(this, proto.cs3.identity.user.v1beta1.UserId, 1)); }; /** * @param {?proto.cs3.identity.user.v1beta1.UserId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setOwner = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearOwner = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.clearOwner = function() { return this.setOwner(undefined); }; @@ -215,35 +215,35 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearOwner = function * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasOwner = function() { - return jspb.Message.getField(this, 2) != null; +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.hasOwner = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional cs3.storage.provider.v1beta1.ResourceId resource_id = 3; + * optional cs3.storage.provider.v1beta1.ResourceId resource_id = 2; * @return {?proto.cs3.storage.provider.v1beta1.ResourceId} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getResourceId = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.getResourceId = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.ResourceId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceId, 3)); + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourceId, 2)); }; /** * @param {?proto.cs3.storage.provider.v1beta1.ResourceId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setResourceId = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.setResourceId = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearResourceId = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.clearResourceId = function() { return this.setResourceId(undefined); }; @@ -252,35 +252,35 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearResourceId = fun * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasResourceId = function() { - return jspb.Message.getField(this, 3) != null; +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.hasResourceId = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional cs3.storage.provider.v1beta1.Grantee grantee = 4; + * optional cs3.storage.provider.v1beta1.Grantee grantee = 3; * @return {?proto.cs3.storage.provider.v1beta1.Grantee} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.getGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.getGrantee = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.Grantee} */ ( - jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 4)); + jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.Grantee, 3)); }; /** * @param {?proto.cs3.storage.provider.v1beta1.Grantee|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.setGrantee = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.setGrantee = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareKey} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareKey} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearGrantee = function() { +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.clearGrantee = function() { return this.setGrantee(undefined); }; @@ -289,8 +289,8 @@ proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.clearGrantee = functi * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareKey.prototype.hasGrantee = function() { - return jspb.Message.getField(this, 4) != null; +proto.cs3.sharing.ocm.v1beta1.ShareKey.prototype.hasGrantee = function() { + return jspb.Message.getField(this, 3) != null; }; diff --git a/sharepermissions.js b/sharepermissions.js index c983621..f6d6359 100644 --- a/sharepermissions.js +++ b/sharepermissions.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,7 +11,7 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.SharePermissions'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.SharePermissions'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); @@ -28,16 +28,16 @@ goog.require('proto.cs3.storage.provider.v1beta1.ResourcePermissions'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions = function(opt_data) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.SharePermissions, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.SharePermissions, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.SharePermissions.displayName = 'proto.cs3.sharing.collaboration.v1beta1.SharePermissions'; + proto.cs3.sharing.ocm.v1beta1.SharePermissions.displayName = 'proto.cs3.sharing.ocm.v1beta1.SharePermissions'; } @@ -55,8 +55,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.SharePermissions.toObject(opt_includeInstance, this); }; @@ -65,13 +65,14 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.toObject = fu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.toObject = function(includeInstance, msg) { var f, obj = { - permissions: (f = msg.getPermissions()) && proto.cs3.storage.provider.v1beta1.ResourcePermissions.toObject(includeInstance, f) + permissions: (f = msg.getPermissions()) && proto.cs3.storage.provider.v1beta1.ResourcePermissions.toObject(includeInstance, f), + reshare: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -85,23 +86,23 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + * @return {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.SharePermissions; - return proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.SharePermissions; + return proto.cs3.sharing.ocm.v1beta1.SharePermissions.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} + * @return {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -113,6 +114,10 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromRe reader.readMessage(value,proto.cs3.storage.provider.v1beta1.ResourcePermissions.deserializeBinaryFromReader); msg.setPermissions(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReshare(value); + break; default: reader.skipField(); break; @@ -126,9 +131,9 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.SharePermissions.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -136,11 +141,11 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} message + * @param {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPermissions(); if (f != null) { @@ -150,6 +155,13 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter proto.cs3.storage.provider.v1beta1.ResourcePermissions.serializeBinaryToWriter ); } + f = message.getReshare(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -157,7 +169,7 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.serializeBinaryToWriter * optional cs3.storage.provider.v1beta1.ResourcePermissions permissions = 1; * @return {?proto.cs3.storage.provider.v1beta1.ResourcePermissions} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.getPermissions = function() { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.getPermissions = function() { return /** @type{?proto.cs3.storage.provider.v1beta1.ResourcePermissions} */ ( jspb.Message.getWrapperField(this, proto.cs3.storage.provider.v1beta1.ResourcePermissions, 1)); }; @@ -165,18 +177,18 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.getPermission /** * @param {?proto.cs3.storage.provider.v1beta1.ResourcePermissions|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} returns this */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.setPermissions = function(value) { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.setPermissions = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.SharePermissions} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} returns this */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.clearPermissions = function() { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.clearPermissions = function() { return this.setPermissions(undefined); }; @@ -185,8 +197,26 @@ proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.clearPermissi * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.SharePermissions.prototype.hasPermissions = function() { +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.hasPermissions = function() { return jspb.Message.getField(this, 1) != null; }; +/** + * optional bool reshare = 2; + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.getReshare = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cs3.sharing.ocm.v1beta1.SharePermissions} returns this + */ +proto.cs3.sharing.ocm.v1beta1.SharePermissions.prototype.setReshare = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + diff --git a/sharereference.js b/sharereference.js index 37c3965..b550c32 100644 --- a/sharereference.js +++ b/sharereference.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,14 +11,14 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareReference'); -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareReference'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareReference.SpecCase'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); goog.require('jspb.Message'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareId'); -goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareKey'); +goog.require('proto.cs3.sharing.ocm.v1beta1.ShareId'); +goog.require('proto.cs3.sharing.ocm.v1beta1.ShareKey'); /** * Generated by JsPbCodeGenerator. @@ -30,16 +30,16 @@ goog.require('proto.cs3.sharing.collaboration.v1beta1.ShareKey'); * @extends {jspb.Message} * @constructor */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_); +proto.cs3.sharing.ocm.v1beta1.ShareReference = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_); }; -goog.inherits(proto.cs3.sharing.collaboration.v1beta1.ShareReference, jspb.Message); +goog.inherits(proto.cs3.sharing.ocm.v1beta1.ShareReference, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cs3.sharing.collaboration.v1beta1.ShareReference.displayName = 'proto.cs3.sharing.collaboration.v1beta1.ShareReference'; + proto.cs3.sharing.ocm.v1beta1.ShareReference.displayName = 'proto.cs3.sharing.ocm.v1beta1.ShareReference'; } /** @@ -50,22 +50,23 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array>} * @const */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_ = [[1,2]]; +proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_ = [[1,2,3]]; /** * @enum {number} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase = { +proto.cs3.sharing.ocm.v1beta1.ShareReference.SpecCase = { SPEC_NOT_SET: 0, ID: 1, - KEY: 2 + KEY: 2, + TOKEN: 3 }; /** - * @return {proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase} + * @return {proto.cs3.sharing.ocm.v1beta1.ShareReference.SpecCase} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getSpecCase = function() { - return /** @type {proto.cs3.sharing.collaboration.v1beta1.ShareReference.SpecCase} */(jspb.Message.computeOneofCase(this, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0])); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.getSpecCase = function() { + return /** @type {proto.cs3.sharing.ocm.v1beta1.ShareReference.SpecCase} */(jspb.Message.computeOneofCase(this, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_[0])); }; @@ -83,8 +84,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.toObject = function(opt_includeInstance) { - return proto.cs3.sharing.collaboration.v1beta1.ShareReference.toObject(opt_includeInstance, this); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.toObject = function(opt_includeInstance) { + return proto.cs3.sharing.ocm.v1beta1.ShareReference.toObject(opt_includeInstance, this); }; @@ -93,14 +94,15 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.toObject = func * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} msg The msg instance to transform. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareReference} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.toObject = function(includeInstance, msg) { +proto.cs3.sharing.ocm.v1beta1.ShareReference.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.cs3.sharing.collaboration.v1beta1.ShareId.toObject(includeInstance, f), - key: (f = msg.getKey()) && proto.cs3.sharing.collaboration.v1beta1.ShareKey.toObject(includeInstance, f) + id: (f = msg.getId()) && proto.cs3.sharing.ocm.v1beta1.ShareId.toObject(includeInstance, f), + key: (f = msg.getKey()) && proto.cs3.sharing.ocm.v1beta1.ShareKey.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -114,23 +116,23 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinary = function(bytes) { +proto.cs3.sharing.ocm.v1beta1.ShareReference.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cs3.sharing.collaboration.v1beta1.ShareReference; - return proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cs3.sharing.ocm.v1beta1.ShareReference; + return proto.cs3.sharing.ocm.v1beta1.ShareReference.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} msg The message object to deserialize into. + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareReference} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromReader = function(msg, reader) { +proto.cs3.sharing.ocm.v1beta1.ShareReference.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -138,15 +140,19 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.cs3.sharing.collaboration.v1beta1.ShareId; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareId.deserializeBinaryFromReader); + var value = new proto.cs3.sharing.ocm.v1beta1.ShareId; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.ShareId.deserializeBinaryFromReader); msg.setId(value); break; case 2: - var value = new proto.cs3.sharing.collaboration.v1beta1.ShareKey; - reader.readMessage(value,proto.cs3.sharing.collaboration.v1beta1.ShareKey.deserializeBinaryFromReader); + var value = new proto.cs3.sharing.ocm.v1beta1.ShareKey; + reader.readMessage(value,proto.cs3.sharing.ocm.v1beta1.ShareKey.deserializeBinaryFromReader); msg.setKey(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; default: reader.skipField(); break; @@ -160,9 +166,9 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.serializeBinary = function() { +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter(this, writer); + proto.cs3.sharing.ocm.v1beta1.ShareReference.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -170,18 +176,18 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} message + * @param {!proto.cs3.sharing.ocm.v1beta1.ShareReference} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter = function(message, writer) { +proto.cs3.sharing.ocm.v1beta1.ShareReference.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f != null) { writer.writeMessage( 1, f, - proto.cs3.sharing.collaboration.v1beta1.ShareId.serializeBinaryToWriter + proto.cs3.sharing.ocm.v1beta1.ShareId.serializeBinaryToWriter ); } f = message.getKey(); @@ -189,7 +195,14 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter = writer.writeMessage( 2, f, - proto.cs3.sharing.collaboration.v1beta1.ShareKey.serializeBinaryToWriter + proto.cs3.sharing.ocm.v1beta1.ShareKey.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f ); } }; @@ -197,28 +210,28 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.serializeBinaryToWriter = /** * optional ShareId id = 1; - * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareId} + * @return {?proto.cs3.sharing.ocm.v1beta1.ShareId} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getId = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareId} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareId, 1)); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.getId = function() { + return /** @type{?proto.cs3.sharing.ocm.v1beta1.ShareId} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.ocm.v1beta1.ShareId, 1)); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareId|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + * @param {?proto.cs3.sharing.ocm.v1beta1.ShareId|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.setId = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0], value); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.setId = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearId = function() { +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.clearId = function() { return this.setId(undefined); }; @@ -227,35 +240,35 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearId = funct * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.hasId = function() { +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional ShareKey key = 2; - * @return {?proto.cs3.sharing.collaboration.v1beta1.ShareKey} + * @return {?proto.cs3.sharing.ocm.v1beta1.ShareKey} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.getKey = function() { - return /** @type{?proto.cs3.sharing.collaboration.v1beta1.ShareKey} */ ( - jspb.Message.getWrapperField(this, proto.cs3.sharing.collaboration.v1beta1.ShareKey, 2)); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.getKey = function() { + return /** @type{?proto.cs3.sharing.ocm.v1beta1.ShareKey} */ ( + jspb.Message.getWrapperField(this, proto.cs3.sharing.ocm.v1beta1.ShareKey, 2)); }; /** - * @param {?proto.cs3.sharing.collaboration.v1beta1.ShareKey|undefined} value - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + * @param {?proto.cs3.sharing.ocm.v1beta1.ShareKey|undefined} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.setKey = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.cs3.sharing.collaboration.v1beta1.ShareReference.oneofGroups_[0], value); +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.setKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.cs3.sharing.collaboration.v1beta1.ShareReference} returns this + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearKey = function() { +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.clearKey = function() { return this.setKey(undefined); }; @@ -264,8 +277,44 @@ proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.clearKey = func * Returns whether this field is set. * @return {boolean} */ -proto.cs3.sharing.collaboration.v1beta1.ShareReference.prototype.hasKey = function() { +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.hasKey = function() { return jspb.Message.getField(this, 2) != null; }; +/** + * optional string token = 3; + * @return {string} + */ +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.setToken = function(value) { + return jspb.Message.setOneofField(this, 3, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cs3.sharing.ocm.v1beta1.ShareReference} returns this + */ +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.clearToken = function() { + return jspb.Message.setOneofField(this, 3, proto.cs3.sharing.ocm.v1beta1.ShareReference.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cs3.sharing.ocm.v1beta1.ShareReference.prototype.hasToken = function() { + return jspb.Message.getField(this, 3) != null; +}; + + diff --git a/sharestate.js b/sharestate.js index 7af478e..ff33be7 100644 --- a/sharestate.js +++ b/sharestate.js @@ -1,4 +1,4 @@ -// source: cs3/sharing/collaboration/v1beta1/resources.proto +// source: cs3/sharing/ocm/v1beta1/resources.proto /** * @fileoverview * @enhanceable @@ -11,12 +11,12 @@ /* eslint-disable */ // @ts-nocheck -goog.provide('proto.cs3.sharing.collaboration.v1beta1.ShareState'); +goog.provide('proto.cs3.sharing.ocm.v1beta1.ShareState'); /** * @enum {number} */ -proto.cs3.sharing.collaboration.v1beta1.ShareState = { +proto.cs3.sharing.ocm.v1beta1.ShareState = { SHARE_STATE_INVALID: 0, SHARE_STATE_PENDING: 1, SHARE_STATE_ACCEPTED: 2,