blob: ee7bda0f0507cd06b2dfa455e12a65a82fde6cb6 [file] [log] [blame]
Adrià Vilanova Martínez413cb442021-09-06 00:30:45 +02001// source: google/protobuf/field_mask.proto
2/**
3 * @fileoverview
4 * @enhanceable
5 * @suppress {missingRequire} reports error on implicit type usages.
6 * @suppress {messageConventions} JS Compiler reports an error if a variable or
7 * field starts with 'MSG_' and isn't a translatable message.
8 * @public
9 */
10// GENERATED CODE -- DO NOT EDIT!
11/* eslint-disable */
12// @ts-nocheck
13
14var jspb = require('google-protobuf');
15var goog = jspb;
16var proto = {};
17
18goog.exportSymbol('google.protobuf.FieldMask', null, proto);
19/**
20 * Generated by JsPbCodeGenerator.
21 * @param {Array=} opt_data Optional initial data array, typically from a
22 * server response, or constructed directly in Javascript. The array is used
23 * in place and becomes part of the constructed object. It is not cloned.
24 * If no data is provided, the constructed object will be empty, but still
25 * valid.
26 * @extends {jspb.Message}
27 * @constructor
28 */
29proto.google.protobuf.FieldMask = function(opt_data) {
30 jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FieldMask.repeatedFields_, null);
31};
32goog.inherits(proto.google.protobuf.FieldMask, jspb.Message);
33if (goog.DEBUG && !COMPILED) {
34 /**
35 * @public
36 * @override
37 */
38 proto.google.protobuf.FieldMask.displayName = 'proto.google.protobuf.FieldMask';
39}
40
41/**
42 * List of repeated fields within this message type.
43 * @private {!Array<number>}
44 * @const
45 */
46proto.google.protobuf.FieldMask.repeatedFields_ = [1];
47
48
49
50if (jspb.Message.GENERATE_TO_OBJECT) {
51/**
52 * Creates an object representation of this proto.
53 * Field names that are reserved in JavaScript and will be renamed to pb_name.
54 * Optional fields that are not set will be set to undefined.
55 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
56 * For the list of reserved names please see:
57 * net/proto2/compiler/js/internal/generator.cc#kKeyword.
58 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
59 * JSPB instance for transitional soy proto support:
60 * http://goto/soy-param-migration
61 * @return {!Object}
62 */
63proto.google.protobuf.FieldMask.prototype.toObject = function(opt_includeInstance) {
64 return proto.google.protobuf.FieldMask.toObject(opt_includeInstance, this);
65};
66
67
68/**
69 * Static version of the {@see toObject} method.
70 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
71 * the JSPB instance for transitional soy proto support:
72 * http://goto/soy-param-migration
73 * @param {!proto.google.protobuf.FieldMask} msg The msg instance to transform.
74 * @return {!Object}
75 * @suppress {unusedLocalVariables} f is only used for nested messages
76 */
77proto.google.protobuf.FieldMask.toObject = function(includeInstance, msg) {
78 var f, obj = {
79 pathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
80 };
81
82 if (includeInstance) {
83 obj.$jspbMessageInstance = msg;
84 }
85 return obj;
86};
87}
88
89
90/**
91 * Deserializes binary data (in protobuf wire format).
92 * @param {jspb.ByteSource} bytes The bytes to deserialize.
93 * @return {!proto.google.protobuf.FieldMask}
94 */
95proto.google.protobuf.FieldMask.deserializeBinary = function(bytes) {
96 var reader = new jspb.BinaryReader(bytes);
97 var msg = new proto.google.protobuf.FieldMask;
98 return proto.google.protobuf.FieldMask.deserializeBinaryFromReader(msg, reader);
99};
100
101
102/**
103 * Deserializes binary data (in protobuf wire format) from the
104 * given reader into the given message object.
105 * @param {!proto.google.protobuf.FieldMask} msg The message object to deserialize into.
106 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
107 * @return {!proto.google.protobuf.FieldMask}
108 */
109proto.google.protobuf.FieldMask.deserializeBinaryFromReader = function(msg, reader) {
110 while (reader.nextField()) {
111 if (reader.isEndGroup()) {
112 break;
113 }
114 var field = reader.getFieldNumber();
115 switch (field) {
116 case 1:
117 var value = /** @type {string} */ (reader.readString());
118 msg.addPaths(value);
119 break;
120 default:
121 reader.skipField();
122 break;
123 }
124 }
125 return msg;
126};
127
128
129/**
130 * Serializes the message to binary data (in protobuf wire format).
131 * @return {!Uint8Array}
132 */
133proto.google.protobuf.FieldMask.prototype.serializeBinary = function() {
134 var writer = new jspb.BinaryWriter();
135 proto.google.protobuf.FieldMask.serializeBinaryToWriter(this, writer);
136 return writer.getResultBuffer();
137};
138
139
140/**
141 * Serializes the given message to binary data (in protobuf wire
142 * format), writing to the given BinaryWriter.
143 * @param {!proto.google.protobuf.FieldMask} message
144 * @param {!jspb.BinaryWriter} writer
145 * @suppress {unusedLocalVariables} f is only used for nested messages
146 */
147proto.google.protobuf.FieldMask.serializeBinaryToWriter = function(message, writer) {
148 var f = undefined;
149 f = message.getPathsList();
150 if (f.length > 0) {
151 writer.writeRepeatedString(
152 1,
153 f
154 );
155 }
156};
157
158
159/**
160 * repeated string paths = 1;
161 * @return {!Array<string>}
162 */
163proto.google.protobuf.FieldMask.prototype.getPathsList = function() {
164 return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
165};
166
167
168/**
169 * @param {!Array<string>} value
170 * @return {!proto.google.protobuf.FieldMask} returns this
171 */
172proto.google.protobuf.FieldMask.prototype.setPathsList = function(value) {
173 return jspb.Message.setField(this, 1, value || []);
174};
175
176
177/**
178 * @param {string} value
179 * @param {number=} opt_index
180 * @return {!proto.google.protobuf.FieldMask} returns this
181 */
182proto.google.protobuf.FieldMask.prototype.addPaths = function(value, opt_index) {
183 return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
184};
185
186
187/**
188 * Clears the list making it empty but non-null.
189 * @return {!proto.google.protobuf.FieldMask} returns this
190 */
191proto.google.protobuf.FieldMask.prototype.clearPathsList = function() {
192 return this.setPathsList([]);
193};
194
195
196goog.object.extend(exports, proto);