// source: galleries.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

var jspb = require('google-protobuf');
var goog = jspb;
var global =
    (typeof globalThis !== 'undefined' && globalThis) ||
    (typeof window !== 'undefined' && window) ||
    (typeof global !== 'undefined' && global) ||
    (typeof self !== 'undefined' && self) ||
    (function () { return this; }).call(null) ||
    Function('return this')();

var annotations_pb = require('./annotations_pb.js');
goog.object.extend(proto, annotations_pb);
goog.exportSymbol('proto.org.couchers.api.galleries.AddPhotoToGalleryReq', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.GetGalleryEditInfoReq', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.GetGalleryEditInfoRes', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.GetGalleryReq', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.MovePhotoReq', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.PhotoGallery', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.PhotoGalleryItem', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq', null, global);
goog.exportSymbol('proto.org.couchers.api.galleries.UpdatePhotoCaptionReq', null, global);
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.org.couchers.api.galleries.PhotoGalleryItem = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.PhotoGalleryItem, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.PhotoGalleryItem.displayName = 'proto.org.couchers.api.galleries.PhotoGalleryItem';
}
/**
 * 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.org.couchers.api.galleries.PhotoGallery = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.org.couchers.api.galleries.PhotoGallery.repeatedFields_, null);
};
goog.inherits(proto.org.couchers.api.galleries.PhotoGallery, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.PhotoGallery.displayName = 'proto.org.couchers.api.galleries.PhotoGallery';
}
/**
 * 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.org.couchers.api.galleries.GetGalleryReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.GetGalleryReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.GetGalleryReq.displayName = 'proto.org.couchers.api.galleries.GetGalleryReq';
}
/**
 * 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.org.couchers.api.galleries.AddPhotoToGalleryReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.AddPhotoToGalleryReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.AddPhotoToGalleryReq.displayName = 'proto.org.couchers.api.galleries.AddPhotoToGalleryReq';
}
/**
 * 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.org.couchers.api.galleries.RemovePhotoFromGalleryReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.displayName = 'proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq';
}
/**
 * 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.org.couchers.api.galleries.MovePhotoReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.MovePhotoReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.MovePhotoReq.displayName = 'proto.org.couchers.api.galleries.MovePhotoReq';
}
/**
 * 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.org.couchers.api.galleries.UpdatePhotoCaptionReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.UpdatePhotoCaptionReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.displayName = 'proto.org.couchers.api.galleries.UpdatePhotoCaptionReq';
}
/**
 * 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.org.couchers.api.galleries.GetGalleryEditInfoReq = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.GetGalleryEditInfoReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.GetGalleryEditInfoReq.displayName = 'proto.org.couchers.api.galleries.GetGalleryEditInfoReq';
}
/**
 * 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.org.couchers.api.galleries.GetGalleryEditInfoRes = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.couchers.api.galleries.GetGalleryEditInfoRes, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.couchers.api.galleries.GetGalleryEditInfoRes.displayName = 'proto.org.couchers.api.galleries.GetGalleryEditInfoRes';
}



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_<name>, 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.org.couchers.api.galleries.PhotoGalleryItem.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.PhotoGalleryItem.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.org.couchers.api.galleries.PhotoGalleryItem} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.toObject = function(includeInstance, msg) {
  var f, obj = {
    itemId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    fullUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
    thumbnailUrl: jspb.Message.getFieldWithDefault(msg, 3, ""),
    caption: 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.org.couchers.api.galleries.PhotoGalleryItem}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.PhotoGalleryItem;
  return proto.org.couchers.api.galleries.PhotoGalleryItem.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.PhotoGalleryItem} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setItemId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFullUrl(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setThumbnailUrl(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setCaption(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.PhotoGalleryItem.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.PhotoGalleryItem} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getItemId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getFullUrl();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getThumbnailUrl();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getCaption();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
};


/**
 * optional int64 item_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.getItemId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem} returns this
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.setItemId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional string full_url = 2;
 * @return {string}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.getFullUrl = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem} returns this
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.setFullUrl = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string thumbnail_url = 3;
 * @return {string}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.getThumbnailUrl = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem} returns this
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.setThumbnailUrl = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string caption = 4;
 * @return {string}
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.getCaption = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem} returns this
 */
proto.org.couchers.api.galleries.PhotoGalleryItem.prototype.setCaption = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.org.couchers.api.galleries.PhotoGallery.repeatedFields_ = [2];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.PhotoGallery.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.PhotoGallery.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.org.couchers.api.galleries.PhotoGallery} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.PhotoGallery.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    photosList: jspb.Message.toObjectList(msg.getPhotosList(),
    proto.org.couchers.api.galleries.PhotoGalleryItem.toObject, includeInstance),
    canEdit: jspb.Message.getBooleanFieldWithDefault(msg, 3, 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.org.couchers.api.galleries.PhotoGallery}
 */
proto.org.couchers.api.galleries.PhotoGallery.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.PhotoGallery;
  return proto.org.couchers.api.galleries.PhotoGallery.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.PhotoGallery} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.PhotoGallery}
 */
proto.org.couchers.api.galleries.PhotoGallery.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = new proto.org.couchers.api.galleries.PhotoGalleryItem;
      reader.readMessage(value,proto.org.couchers.api.galleries.PhotoGalleryItem.deserializeBinaryFromReader);
      msg.addPhotos(value);
      break;
    case 3:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setCanEdit(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.PhotoGallery.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.PhotoGallery} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.PhotoGallery.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getPhotosList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.org.couchers.api.galleries.PhotoGalleryItem.serializeBinaryToWriter
    );
  }
  f = message.getCanEdit();
  if (f) {
    writer.writeBool(
      3,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.PhotoGallery} returns this
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * repeated PhotoGalleryItem photos = 2;
 * @return {!Array<!proto.org.couchers.api.galleries.PhotoGalleryItem>}
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.getPhotosList = function() {
  return /** @type{!Array<!proto.org.couchers.api.galleries.PhotoGalleryItem>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.org.couchers.api.galleries.PhotoGalleryItem, 2));
};


/**
 * @param {!Array<!proto.org.couchers.api.galleries.PhotoGalleryItem>} value
 * @return {!proto.org.couchers.api.galleries.PhotoGallery} returns this
*/
proto.org.couchers.api.galleries.PhotoGallery.prototype.setPhotosList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.org.couchers.api.galleries.PhotoGalleryItem=} opt_value
 * @param {number=} opt_index
 * @return {!proto.org.couchers.api.galleries.PhotoGalleryItem}
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.addPhotos = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.couchers.api.galleries.PhotoGalleryItem, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.org.couchers.api.galleries.PhotoGallery} returns this
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.clearPhotosList = function() {
  return this.setPhotosList([]);
};


/**
 * optional bool can_edit = 3;
 * @return {boolean}
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.getCanEdit = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};


/**
 * @param {boolean} value
 * @return {!proto.org.couchers.api.galleries.PhotoGallery} returns this
 */
proto.org.couchers.api.galleries.PhotoGallery.prototype.setCanEdit = function(value) {
  return jspb.Message.setProto3BooleanField(this, 3, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.GetGalleryReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.GetGalleryReq.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.org.couchers.api.galleries.GetGalleryReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.GetGalleryReq}
 */
proto.org.couchers.api.galleries.GetGalleryReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.GetGalleryReq;
  return proto.org.couchers.api.galleries.GetGalleryReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.GetGalleryReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.GetGalleryReq}
 */
proto.org.couchers.api.galleries.GetGalleryReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.GetGalleryReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.GetGalleryReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.GetGalleryReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.GetGalleryReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.GetGalleryReq} returns this
 */
proto.org.couchers.api.galleries.GetGalleryReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.AddPhotoToGalleryReq.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.org.couchers.api.galleries.AddPhotoToGalleryReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    uploadKey: jspb.Message.getFieldWithDefault(msg, 2, ""),
    caption: jspb.Message.getFieldWithDefault(msg, 3, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.AddPhotoToGalleryReq;
  return proto.org.couchers.api.galleries.AddPhotoToGalleryReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setUploadKey(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setCaption(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.AddPhotoToGalleryReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getUploadKey();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getCaption();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq} returns this
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional string upload_key = 2;
 * @return {string}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.getUploadKey = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq} returns this
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.setUploadKey = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string caption = 3;
 * @return {string}
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.getCaption = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.AddPhotoToGalleryReq} returns this
 */
proto.org.couchers.api.galleries.AddPhotoToGalleryReq.prototype.setCaption = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.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.org.couchers.api.galleries.RemovePhotoFromGalleryReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    itemId: jspb.Message.getFieldWithDefault(msg, 2, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq}
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq;
  return proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq}
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setItemId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getItemId();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq} returns this
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional int64 item_id = 2;
 * @return {number}
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.getItemId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq} returns this
 */
proto.org.couchers.api.galleries.RemovePhotoFromGalleryReq.prototype.setItemId = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.MovePhotoReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.MovePhotoReq.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.org.couchers.api.galleries.MovePhotoReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.MovePhotoReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    itemId: jspb.Message.getFieldWithDefault(msg, 2, 0),
    afterItemId: jspb.Message.getFieldWithDefault(msg, 3, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.MovePhotoReq}
 */
proto.org.couchers.api.galleries.MovePhotoReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.MovePhotoReq;
  return proto.org.couchers.api.galleries.MovePhotoReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.MovePhotoReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.MovePhotoReq}
 */
proto.org.couchers.api.galleries.MovePhotoReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setItemId(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setAfterItemId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.MovePhotoReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.MovePhotoReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.MovePhotoReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getItemId();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = message.getAfterItemId();
  if (f !== 0) {
    writer.writeInt64(
      3,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.MovePhotoReq} returns this
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional int64 item_id = 2;
 * @return {number}
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.getItemId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.MovePhotoReq} returns this
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.setItemId = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional int64 after_item_id = 3;
 * @return {number}
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.getAfterItemId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.MovePhotoReq} returns this
 */
proto.org.couchers.api.galleries.MovePhotoReq.prototype.setAfterItemId = function(value) {
  return jspb.Message.setProto3IntField(this, 3, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.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.org.couchers.api.galleries.UpdatePhotoCaptionReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    itemId: jspb.Message.getFieldWithDefault(msg, 2, 0),
    caption: jspb.Message.getFieldWithDefault(msg, 3, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.UpdatePhotoCaptionReq;
  return proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setItemId(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setCaption(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getItemId();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = message.getCaption();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq} returns this
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional int64 item_id = 2;
 * @return {number}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.getItemId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq} returns this
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.setItemId = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional string caption = 3;
 * @return {string}
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.getCaption = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.couchers.api.galleries.UpdatePhotoCaptionReq} returns this
 */
proto.org.couchers.api.galleries.UpdatePhotoCaptionReq.prototype.setCaption = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.GetGalleryEditInfoReq.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.GetGalleryEditInfoReq.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.org.couchers.api.galleries.GetGalleryEditInfoReq} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoReq}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.GetGalleryEditInfoReq;
  return proto.org.couchers.api.galleries.GetGalleryEditInfoReq.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.GetGalleryEditInfoReq} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoReq}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.GetGalleryEditInfoReq.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.GetGalleryEditInfoReq} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoReq} returns this
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoReq.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, 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.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.toObject = function(opt_includeInstance) {
  return proto.org.couchers.api.galleries.GetGalleryEditInfoRes.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.org.couchers.api.galleries.GetGalleryEditInfoRes} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.toObject = function(includeInstance, msg) {
  var f, obj = {
    galleryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    maxPhotos: jspb.Message.getFieldWithDefault(msg, 2, 0),
    currentPhotoCount: jspb.Message.getFieldWithDefault(msg, 3, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.couchers.api.galleries.GetGalleryEditInfoRes;
  return proto.org.couchers.api.galleries.GetGalleryEditInfoRes.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setGalleryId(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setMaxPhotos(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setCurrentPhotoCount(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.couchers.api.galleries.GetGalleryEditInfoRes.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGalleryId();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getMaxPhotos();
  if (f !== 0) {
    writer.writeUint32(
      2,
      f
    );
  }
  f = message.getCurrentPhotoCount();
  if (f !== 0) {
    writer.writeUint32(
      3,
      f
    );
  }
};


/**
 * optional int64 gallery_id = 1;
 * @return {number}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.getGalleryId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes} returns this
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.setGalleryId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional uint32 max_photos = 2;
 * @return {number}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.getMaxPhotos = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes} returns this
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.setMaxPhotos = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional uint32 current_photo_count = 3;
 * @return {number}
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.getCurrentPhotoCount = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.couchers.api.galleries.GetGalleryEditInfoRes} returns this
 */
proto.org.couchers.api.galleries.GetGalleryEditInfoRes.prototype.setCurrentPhotoCount = function(value) {
  return jspb.Message.setProto3IntField(this, 3, value);
};


goog.object.extend(exports, proto.org.couchers.api.galleries);
