custos-client-sdks/custos-js-sdk/stubs/core-services/agent-profile-service/AgentProfileService_pb.js (450 lines of code) (raw):
// source: src/main/proto/AgentProfileService.proto
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.org.apache.custos.agent.profile.service.Agent', null, global);
goog.exportSymbol('proto.org.apache.custos.agent.profile.service.AgentAttribute', null, global);
goog.exportSymbol('proto.org.apache.custos.agent.profile.service.AgentRequest', null, global);
goog.exportSymbol('proto.org.apache.custos.agent.profile.service.AgentStatus', null, global);
goog.exportSymbol('proto.org.apache.custos.agent.profile.service.OperationStatus', 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.apache.custos.agent.profile.service.Agent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.apache.custos.agent.profile.service.Agent.repeatedFields_, null);
};
goog.inherits(proto.org.apache.custos.agent.profile.service.Agent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.apache.custos.agent.profile.service.Agent.displayName = 'proto.org.apache.custos.agent.profile.service.Agent';
}
/**
* 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.apache.custos.agent.profile.service.AgentAttribute = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.apache.custos.agent.profile.service.AgentAttribute.repeatedFields_, null);
};
goog.inherits(proto.org.apache.custos.agent.profile.service.AgentAttribute, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.displayName = 'proto.org.apache.custos.agent.profile.service.AgentAttribute';
}
/**
* 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.apache.custos.agent.profile.service.AgentRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.apache.custos.agent.profile.service.AgentRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.displayName = 'proto.org.apache.custos.agent.profile.service.AgentRequest';
}
/**
* 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.apache.custos.agent.profile.service.OperationStatus = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.apache.custos.agent.profile.service.OperationStatus, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.displayName = 'proto.org.apache.custos.agent.profile.service.OperationStatus';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.apache.custos.agent.profile.service.Agent.repeatedFields_ = [5,6];
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.apache.custos.agent.profile.service.Agent.prototype.toObject = function(opt_includeInstance) {
return proto.org.apache.custos.agent.profile.service.Agent.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.apache.custos.agent.profile.service.Agent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.Agent.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
status: jspb.Message.getFieldWithDefault(msg, 2, 0),
createdAt: jspb.Message.getFieldWithDefault(msg, 3, 0),
lastModifiedAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
rolesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
attributesList: jspb.Message.toObjectList(msg.getAttributesList(),
proto.org.apache.custos.agent.profile.service.AgentAttribute.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.apache.custos.agent.profile.service.Agent}
*/
proto.org.apache.custos.agent.profile.service.Agent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.apache.custos.agent.profile.service.Agent;
return proto.org.apache.custos.agent.profile.service.Agent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.apache.custos.agent.profile.service.Agent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.apache.custos.agent.profile.service.Agent}
*/
proto.org.apache.custos.agent.profile.service.Agent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {!proto.org.apache.custos.agent.profile.service.AgentStatus} */ (reader.readEnum());
msg.setStatus(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setCreatedAt(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setLastModifiedAt(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.addRoles(value);
break;
case 6:
var value = new proto.org.apache.custos.agent.profile.service.AgentAttribute;
reader.readMessage(value,proto.org.apache.custos.agent.profile.service.AgentAttribute.deserializeBinaryFromReader);
msg.addAttributes(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.apache.custos.agent.profile.service.Agent.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.apache.custos.agent.profile.service.Agent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.Agent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getCreatedAt();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = message.getLastModifiedAt();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getRolesList();
if (f.length > 0) {
writer.writeRepeatedString(
5,
f
);
}
f = message.getAttributesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.org.apache.custos.agent.profile.service.AgentAttribute.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional AgentStatus status = 2;
* @return {!proto.org.apache.custos.agent.profile.service.AgentStatus}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getStatus = function() {
return /** @type {!proto.org.apache.custos.agent.profile.service.AgentStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.org.apache.custos.agent.profile.service.AgentStatus} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional int64 created_at = 3;
* @return {number}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getCreatedAt = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setCreatedAt = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 last_modified_at = 4;
* @return {number}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getLastModifiedAt = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setLastModifiedAt = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* repeated string roles = 5;
* @return {!Array<string>}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getRolesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
};
/**
* @param {!Array<string>} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setRolesList = function(value) {
return jspb.Message.setField(this, 5, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.addRoles = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.clearRolesList = function() {
return this.setRolesList([]);
};
/**
* repeated AgentAttribute attributes = 6;
* @return {!Array<!proto.org.apache.custos.agent.profile.service.AgentAttribute>}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.getAttributesList = function() {
return /** @type{!Array<!proto.org.apache.custos.agent.profile.service.AgentAttribute>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.apache.custos.agent.profile.service.AgentAttribute, 6));
};
/**
* @param {!Array<!proto.org.apache.custos.agent.profile.service.AgentAttribute>} value
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.setAttributesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.org.apache.custos.agent.profile.service.AgentAttribute=} opt_value
* @param {number=} opt_index
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute}
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.addAttributes = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.org.apache.custos.agent.profile.service.AgentAttribute, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.apache.custos.agent.profile.service.Agent} returns this
*/
proto.org.apache.custos.agent.profile.service.Agent.prototype.clearAttributesList = function() {
return this.setAttributesList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.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_<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.apache.custos.agent.profile.service.AgentAttribute.prototype.toObject = function(opt_includeInstance) {
return proto.org.apache.custos.agent.profile.service.AgentAttribute.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.apache.custos.agent.profile.service.AgentAttribute} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
key: jspb.Message.getFieldWithDefault(msg, 2, ""),
valueList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.apache.custos.agent.profile.service.AgentAttribute;
return proto.org.apache.custos.agent.profile.service.AgentAttribute.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.apache.custos.agent.profile.service.AgentAttribute} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.addValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.apache.custos.agent.profile.service.AgentAttribute.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.apache.custos.agent.profile.service.AgentAttribute} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getValueList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string key = 2;
* @return {string}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated string value = 3;
* @return {!Array<string>}
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.getValueList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* @param {!Array<string>} value
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.setValueList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.addValue = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.apache.custos.agent.profile.service.AgentAttribute} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentAttribute.prototype.clearValueList = function() {
return this.setValueList([]);
};
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.apache.custos.agent.profile.service.AgentRequest.prototype.toObject = function(opt_includeInstance) {
return proto.org.apache.custos.agent.profile.service.AgentRequest.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.apache.custos.agent.profile.service.AgentRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.toObject = function(includeInstance, msg) {
var f, obj = {
tenantid: jspb.Message.getFieldWithDefault(msg, 1, 0),
agent: (f = msg.getAgent()) && proto.org.apache.custos.agent.profile.service.Agent.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.org.apache.custos.agent.profile.service.AgentRequest}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.apache.custos.agent.profile.service.AgentRequest;
return proto.org.apache.custos.agent.profile.service.AgentRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.apache.custos.agent.profile.service.AgentRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.apache.custos.agent.profile.service.AgentRequest}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.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.setTenantid(value);
break;
case 2:
var value = new proto.org.apache.custos.agent.profile.service.Agent;
reader.readMessage(value,proto.org.apache.custos.agent.profile.service.Agent.deserializeBinaryFromReader);
msg.setAgent(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.apache.custos.agent.profile.service.AgentRequest.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.apache.custos.agent.profile.service.AgentRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTenantid();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getAgent();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.apache.custos.agent.profile.service.Agent.serializeBinaryToWriter
);
}
};
/**
* optional int64 tenantId = 1;
* @return {number}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.getTenantid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.org.apache.custos.agent.profile.service.AgentRequest} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.setTenantid = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional Agent agent = 2;
* @return {?proto.org.apache.custos.agent.profile.service.Agent}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.getAgent = function() {
return /** @type{?proto.org.apache.custos.agent.profile.service.Agent} */ (
jspb.Message.getWrapperField(this, proto.org.apache.custos.agent.profile.service.Agent, 2));
};
/**
* @param {?proto.org.apache.custos.agent.profile.service.Agent|undefined} value
* @return {!proto.org.apache.custos.agent.profile.service.AgentRequest} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.setAgent = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.apache.custos.agent.profile.service.AgentRequest} returns this
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.clearAgent = function() {
return this.setAgent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.apache.custos.agent.profile.service.AgentRequest.prototype.hasAgent = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.apache.custos.agent.profile.service.OperationStatus.prototype.toObject = function(opt_includeInstance) {
return proto.org.apache.custos.agent.profile.service.OperationStatus.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.apache.custos.agent.profile.service.OperationStatus} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.toObject = function(includeInstance, msg) {
var f, obj = {
status: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.apache.custos.agent.profile.service.OperationStatus}
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.apache.custos.agent.profile.service.OperationStatus;
return proto.org.apache.custos.agent.profile.service.OperationStatus.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.apache.custos.agent.profile.service.OperationStatus} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.apache.custos.agent.profile.service.OperationStatus}
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setStatus(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.apache.custos.agent.profile.service.OperationStatus.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.apache.custos.agent.profile.service.OperationStatus} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStatus();
if (f) {
writer.writeBool(
1,
f
);
}
};
/**
* optional bool status = 1;
* @return {boolean}
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.prototype.getStatus = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.org.apache.custos.agent.profile.service.OperationStatus} returns this
*/
proto.org.apache.custos.agent.profile.service.OperationStatus.prototype.setStatus = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* @enum {number}
*/
proto.org.apache.custos.agent.profile.service.AgentStatus = {
ENABLED: 0,
DISABLED: 1
};
goog.object.extend(exports, proto.org.apache.custos.agent.profile.service);