@ondewo/csi-client-nodejs
Version:
ONDEWO Communication System Integration (CSI) Client library for Nodejs
1,515 lines (1,333 loc) • 119 kB
JavaScript
// source: google/cloud/iot/v1/resources.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js');
goog.object.extend(proto, google_api_annotations_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var google_rpc_status_pb = require('../../../../google/rpc/status_pb.js');
goog.object.extend(proto, google_rpc_status_pb);
goog.exportSymbol('proto.google.cloud.iot.v1.Device', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.DeviceConfig', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.DeviceCredential', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.DeviceCredential.CredentialCase', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.DeviceRegistry', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.DeviceState', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.EventNotificationConfig', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.HttpConfig', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.HttpState', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.MqttConfig', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.MqttState', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.PublicKeyCertificate', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.PublicKeyCertificateFormat', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.PublicKeyCredential', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.PublicKeyFormat', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.RegistryCredential', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.RegistryCredential.CredentialCase', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.StateNotificationConfig', null, global);
goog.exportSymbol('proto.google.cloud.iot.v1.X509CertificateDetails', 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.google.cloud.iot.v1.Device = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.cloud.iot.v1.Device.repeatedFields_, null);
};
goog.inherits(proto.google.cloud.iot.v1.Device, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.Device.displayName = 'proto.google.cloud.iot.v1.Device';
}
/**
* 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.google.cloud.iot.v1.DeviceRegistry = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.cloud.iot.v1.DeviceRegistry.repeatedFields_, null);
};
goog.inherits(proto.google.cloud.iot.v1.DeviceRegistry, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.DeviceRegistry.displayName = 'proto.google.cloud.iot.v1.DeviceRegistry';
}
/**
* 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.google.cloud.iot.v1.MqttConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.MqttConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.MqttConfig.displayName = 'proto.google.cloud.iot.v1.MqttConfig';
}
/**
* 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.google.cloud.iot.v1.HttpConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.HttpConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.HttpConfig.displayName = 'proto.google.cloud.iot.v1.HttpConfig';
}
/**
* 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.google.cloud.iot.v1.EventNotificationConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.EventNotificationConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.EventNotificationConfig.displayName = 'proto.google.cloud.iot.v1.EventNotificationConfig';
}
/**
* 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.google.cloud.iot.v1.StateNotificationConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.StateNotificationConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.StateNotificationConfig.displayName = 'proto.google.cloud.iot.v1.StateNotificationConfig';
}
/**
* 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.google.cloud.iot.v1.RegistryCredential = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.cloud.iot.v1.RegistryCredential.oneofGroups_);
};
goog.inherits(proto.google.cloud.iot.v1.RegistryCredential, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.RegistryCredential.displayName = 'proto.google.cloud.iot.v1.RegistryCredential';
}
/**
* 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.google.cloud.iot.v1.X509CertificateDetails = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.X509CertificateDetails, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.X509CertificateDetails.displayName = 'proto.google.cloud.iot.v1.X509CertificateDetails';
}
/**
* 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.google.cloud.iot.v1.PublicKeyCertificate = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.PublicKeyCertificate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.PublicKeyCertificate.displayName = 'proto.google.cloud.iot.v1.PublicKeyCertificate';
}
/**
* 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.google.cloud.iot.v1.DeviceCredential = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.cloud.iot.v1.DeviceCredential.oneofGroups_);
};
goog.inherits(proto.google.cloud.iot.v1.DeviceCredential, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.DeviceCredential.displayName = 'proto.google.cloud.iot.v1.DeviceCredential';
}
/**
* 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.google.cloud.iot.v1.PublicKeyCredential = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.PublicKeyCredential, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.PublicKeyCredential.displayName = 'proto.google.cloud.iot.v1.PublicKeyCredential';
}
/**
* 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.google.cloud.iot.v1.DeviceConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.DeviceConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.DeviceConfig.displayName = 'proto.google.cloud.iot.v1.DeviceConfig';
}
/**
* 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.google.cloud.iot.v1.DeviceState = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.iot.v1.DeviceState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.iot.v1.DeviceState.displayName = 'proto.google.cloud.iot.v1.DeviceState';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.cloud.iot.v1.Device.repeatedFields_ = [12];
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.google.cloud.iot.v1.Device.prototype.toObject = function(opt_includeInstance) {
return proto.google.cloud.iot.v1.Device.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.google.cloud.iot.v1.Device} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.iot.v1.Device.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
numId: jspb.Message.getFieldWithDefault(msg, 3, 0),
credentialsList: jspb.Message.toObjectList(msg.getCredentialsList(),
proto.google.cloud.iot.v1.DeviceCredential.toObject, includeInstance),
lastHeartbeatTime: (f = msg.getLastHeartbeatTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastEventTime: (f = msg.getLastEventTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastStateTime: (f = msg.getLastStateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastConfigAckTime: (f = msg.getLastConfigAckTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastConfigSendTime: (f = msg.getLastConfigSendTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
blocked: jspb.Message.getBooleanFieldWithDefault(msg, 19, false),
lastErrorTime: (f = msg.getLastErrorTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastErrorStatus: (f = msg.getLastErrorStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f),
config: (f = msg.getConfig()) && proto.google.cloud.iot.v1.DeviceConfig.toObject(includeInstance, f),
state: (f = msg.getState()) && proto.google.cloud.iot.v1.DeviceState.toObject(includeInstance, f),
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.cloud.iot.v1.Device}
*/
proto.google.cloud.iot.v1.Device.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.cloud.iot.v1.Device;
return proto.google.cloud.iot.v1.Device.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.cloud.iot.v1.Device} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.cloud.iot.v1.Device}
*/
proto.google.cloud.iot.v1.Device.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setNumId(value);
break;
case 12:
var value = new proto.google.cloud.iot.v1.DeviceCredential;
reader.readMessage(value,proto.google.cloud.iot.v1.DeviceCredential.deserializeBinaryFromReader);
msg.addCredentials(value);
break;
case 7:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastHeartbeatTime(value);
break;
case 8:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastEventTime(value);
break;
case 20:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastStateTime(value);
break;
case 14:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastConfigAckTime(value);
break;
case 18:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastConfigSendTime(value);
break;
case 19:
var value = /** @type {boolean} */ (reader.readBool());
msg.setBlocked(value);
break;
case 10:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastErrorTime(value);
break;
case 11:
var value = new google_rpc_status_pb.Status;
reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader);
msg.setLastErrorStatus(value);
break;
case 13:
var value = new proto.google.cloud.iot.v1.DeviceConfig;
reader.readMessage(value,proto.google.cloud.iot.v1.DeviceConfig.deserializeBinaryFromReader);
msg.setConfig(value);
break;
case 16:
var value = new proto.google.cloud.iot.v1.DeviceState;
reader.readMessage(value,proto.google.cloud.iot.v1.DeviceState.deserializeBinaryFromReader);
msg.setState(value);
break;
case 17:
var value = msg.getMetadataMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.cloud.iot.v1.Device.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.cloud.iot.v1.Device.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.cloud.iot.v1.Device} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.iot.v1.Device.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getNumId();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getCredentialsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
12,
f,
proto.google.cloud.iot.v1.DeviceCredential.serializeBinaryToWriter
);
}
f = message.getLastHeartbeatTime();
if (f != null) {
writer.writeMessage(
7,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getLastEventTime();
if (f != null) {
writer.writeMessage(
8,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getLastStateTime();
if (f != null) {
writer.writeMessage(
20,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getLastConfigAckTime();
if (f != null) {
writer.writeMessage(
14,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getLastConfigSendTime();
if (f != null) {
writer.writeMessage(
18,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getBlocked();
if (f) {
writer.writeBool(
19,
f
);
}
f = message.getLastErrorTime();
if (f != null) {
writer.writeMessage(
10,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getLastErrorStatus();
if (f != null) {
writer.writeMessage(
11,
f,
google_rpc_status_pb.Status.serializeBinaryToWriter
);
}
f = message.getConfig();
if (f != null) {
writer.writeMessage(
13,
f,
proto.google.cloud.iot.v1.DeviceConfig.serializeBinaryToWriter
);
}
f = message.getState();
if (f != null) {
writer.writeMessage(
16,
f,
proto.google.cloud.iot.v1.DeviceState.serializeBinaryToWriter
);
}
f = message.getMetadataMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(17, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.google.cloud.iot.v1.Device.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.google.cloud.iot.v1.Device.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 num_id = 3;
* @return {number}
*/
proto.google.cloud.iot.v1.Device.prototype.getNumId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setNumId = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* repeated DeviceCredential credentials = 12;
* @return {!Array<!proto.google.cloud.iot.v1.DeviceCredential>}
*/
proto.google.cloud.iot.v1.Device.prototype.getCredentialsList = function() {
return /** @type{!Array<!proto.google.cloud.iot.v1.DeviceCredential>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.cloud.iot.v1.DeviceCredential, 12));
};
/**
* @param {!Array<!proto.google.cloud.iot.v1.DeviceCredential>} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setCredentialsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 12, value);
};
/**
* @param {!proto.google.cloud.iot.v1.DeviceCredential=} opt_value
* @param {number=} opt_index
* @return {!proto.google.cloud.iot.v1.DeviceCredential}
*/
proto.google.cloud.iot.v1.Device.prototype.addCredentials = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.google.cloud.iot.v1.DeviceCredential, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearCredentialsList = function() {
return this.setCredentialsList([]);
};
/**
* optional google.protobuf.Timestamp last_heartbeat_time = 7;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastHeartbeatTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastHeartbeatTime = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastHeartbeatTime = function() {
return this.setLastHeartbeatTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastHeartbeatTime = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional google.protobuf.Timestamp last_event_time = 8;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastEventTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastEventTime = function(value) {
return jspb.Message.setWrapperField(this, 8, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastEventTime = function() {
return this.setLastEventTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastEventTime = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional google.protobuf.Timestamp last_state_time = 20;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastStateTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 20));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastStateTime = function(value) {
return jspb.Message.setWrapperField(this, 20, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastStateTime = function() {
return this.setLastStateTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastStateTime = function() {
return jspb.Message.getField(this, 20) != null;
};
/**
* optional google.protobuf.Timestamp last_config_ack_time = 14;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastConfigAckTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 14));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastConfigAckTime = function(value) {
return jspb.Message.setWrapperField(this, 14, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastConfigAckTime = function() {
return this.setLastConfigAckTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastConfigAckTime = function() {
return jspb.Message.getField(this, 14) != null;
};
/**
* optional google.protobuf.Timestamp last_config_send_time = 18;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastConfigSendTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 18));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastConfigSendTime = function(value) {
return jspb.Message.setWrapperField(this, 18, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastConfigSendTime = function() {
return this.setLastConfigSendTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastConfigSendTime = function() {
return jspb.Message.getField(this, 18) != null;
};
/**
* optional bool blocked = 19;
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.getBlocked = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 19, false));
};
/**
* @param {boolean} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setBlocked = function(value) {
return jspb.Message.setProto3BooleanField(this, 19, value);
};
/**
* optional google.protobuf.Timestamp last_error_time = 10;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastErrorTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastErrorTime = function(value) {
return jspb.Message.setWrapperField(this, 10, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastErrorTime = function() {
return this.setLastErrorTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastErrorTime = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* optional google.rpc.Status last_error_status = 11;
* @return {?proto.google.rpc.Status}
*/
proto.google.cloud.iot.v1.Device.prototype.getLastErrorStatus = function() {
return /** @type{?proto.google.rpc.Status} */ (
jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 11));
};
/**
* @param {?proto.google.rpc.Status|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setLastErrorStatus = function(value) {
return jspb.Message.setWrapperField(this, 11, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearLastErrorStatus = function() {
return this.setLastErrorStatus(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasLastErrorStatus = function() {
return jspb.Message.getField(this, 11) != null;
};
/**
* optional DeviceConfig config = 13;
* @return {?proto.google.cloud.iot.v1.DeviceConfig}
*/
proto.google.cloud.iot.v1.Device.prototype.getConfig = function() {
return /** @type{?proto.google.cloud.iot.v1.DeviceConfig} */ (
jspb.Message.getWrapperField(this, proto.google.cloud.iot.v1.DeviceConfig, 13));
};
/**
* @param {?proto.google.cloud.iot.v1.DeviceConfig|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setConfig = function(value) {
return jspb.Message.setWrapperField(this, 13, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearConfig = function() {
return this.setConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasConfig = function() {
return jspb.Message.getField(this, 13) != null;
};
/**
* optional DeviceState state = 16;
* @return {?proto.google.cloud.iot.v1.DeviceState}
*/
proto.google.cloud.iot.v1.Device.prototype.getState = function() {
return /** @type{?proto.google.cloud.iot.v1.DeviceState} */ (
jspb.Message.getWrapperField(this, proto.google.cloud.iot.v1.DeviceState, 16));
};
/**
* @param {?proto.google.cloud.iot.v1.DeviceState|undefined} value
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.setState = function(value) {
return jspb.Message.setWrapperField(this, 16, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearState = function() {
return this.setState(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.Device.prototype.hasState = function() {
return jspb.Message.getField(this, 16) != null;
};
/**
* map<string, string> metadata = 17;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.google.cloud.iot.v1.Device.prototype.getMetadataMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 17, opt_noLazyCreate,
null));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.google.cloud.iot.v1.Device} returns this
*/
proto.google.cloud.iot.v1.Device.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.cloud.iot.v1.DeviceRegistry.repeatedFields_ = [10,8];
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.google.cloud.iot.v1.DeviceRegistry.prototype.toObject = function(opt_includeInstance) {
return proto.google.cloud.iot.v1.DeviceRegistry.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.google.cloud.iot.v1.DeviceRegistry} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.iot.v1.DeviceRegistry.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
eventNotificationConfigsList: jspb.Message.toObjectList(msg.getEventNotificationConfigsList(),
proto.google.cloud.iot.v1.EventNotificationConfig.toObject, includeInstance),
stateNotificationConfig: (f = msg.getStateNotificationConfig()) && proto.google.cloud.iot.v1.StateNotificationConfig.toObject(includeInstance, f),
mqttConfig: (f = msg.getMqttConfig()) && proto.google.cloud.iot.v1.MqttConfig.toObject(includeInstance, f),
httpConfig: (f = msg.getHttpConfig()) && proto.google.cloud.iot.v1.HttpConfig.toObject(includeInstance, f),
credentialsList: jspb.Message.toObjectList(msg.getCredentialsList(),
proto.google.cloud.iot.v1.RegistryCredential.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.google.cloud.iot.v1.DeviceRegistry}
*/
proto.google.cloud.iot.v1.DeviceRegistry.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.cloud.iot.v1.DeviceRegistry;
return proto.google.cloud.iot.v1.DeviceRegistry.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.cloud.iot.v1.DeviceRegistry} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry}
*/
proto.google.cloud.iot.v1.DeviceRegistry.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 10:
var value = new proto.google.cloud.iot.v1.EventNotificationConfig;
reader.readMessage(value,proto.google.cloud.iot.v1.EventNotificationConfig.deserializeBinaryFromReader);
msg.addEventNotificationConfigs(value);
break;
case 7:
var value = new proto.google.cloud.iot.v1.StateNotificationConfig;
reader.readMessage(value,proto.google.cloud.iot.v1.StateNotificationConfig.deserializeBinaryFromReader);
msg.setStateNotificationConfig(value);
break;
case 4:
var value = new proto.google.cloud.iot.v1.MqttConfig;
reader.readMessage(value,proto.google.cloud.iot.v1.MqttConfig.deserializeBinaryFromReader);
msg.setMqttConfig(value);
break;
case 9:
var value = new proto.google.cloud.iot.v1.HttpConfig;
reader.readMessage(value,proto.google.cloud.iot.v1.HttpConfig.deserializeBinaryFromReader);
msg.setHttpConfig(value);
break;
case 8:
var value = new proto.google.cloud.iot.v1.RegistryCredential;
reader.readMessage(value,proto.google.cloud.iot.v1.RegistryCredential.deserializeBinaryFromReader);
msg.addCredentials(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.cloud.iot.v1.DeviceRegistry.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.cloud.iot.v1.DeviceRegistry} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.iot.v1.DeviceRegistry.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getEventNotificationConfigsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
10,
f,
proto.google.cloud.iot.v1.EventNotificationConfig.serializeBinaryToWriter
);
}
f = message.getStateNotificationConfig();
if (f != null) {
writer.writeMessage(
7,
f,
proto.google.cloud.iot.v1.StateNotificationConfig.serializeBinaryToWriter
);
}
f = message.getMqttConfig();
if (f != null) {
writer.writeMessage(
4,
f,
proto.google.cloud.iot.v1.MqttConfig.serializeBinaryToWriter
);
}
f = message.getHttpConfig();
if (f != null) {
writer.writeMessage(
9,
f,
proto.google.cloud.iot.v1.HttpConfig.serializeBinaryToWriter
);
}
f = message.getCredentialsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
f,
proto.google.cloud.iot.v1.RegistryCredential.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated EventNotificationConfig event_notification_configs = 10;
* @return {!Array<!proto.google.cloud.iot.v1.EventNotificationConfig>}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getEventNotificationConfigsList = function() {
return /** @type{!Array<!proto.google.cloud.iot.v1.EventNotificationConfig>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.cloud.iot.v1.EventNotificationConfig, 10));
};
/**
* @param {!Array<!proto.google.cloud.iot.v1.EventNotificationConfig>} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setEventNotificationConfigsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 10, value);
};
/**
* @param {!proto.google.cloud.iot.v1.EventNotificationConfig=} opt_value
* @param {number=} opt_index
* @return {!proto.google.cloud.iot.v1.EventNotificationConfig}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.addEventNotificationConfigs = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.google.cloud.iot.v1.EventNotificationConfig, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.clearEventNotificationConfigsList = function() {
return this.setEventNotificationConfigsList([]);
};
/**
* optional StateNotificationConfig state_notification_config = 7;
* @return {?proto.google.cloud.iot.v1.StateNotificationConfig}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getStateNotificationConfig = function() {
return /** @type{?proto.google.cloud.iot.v1.StateNotificationConfig} */ (
jspb.Message.getWrapperField(this, proto.google.cloud.iot.v1.StateNotificationConfig, 7));
};
/**
* @param {?proto.google.cloud.iot.v1.StateNotificationConfig|undefined} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setStateNotificationConfig = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.clearStateNotificationConfig = function() {
return this.setStateNotificationConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.hasStateNotificationConfig = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional MqttConfig mqtt_config = 4;
* @return {?proto.google.cloud.iot.v1.MqttConfig}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getMqttConfig = function() {
return /** @type{?proto.google.cloud.iot.v1.MqttConfig} */ (
jspb.Message.getWrapperField(this, proto.google.cloud.iot.v1.MqttConfig, 4));
};
/**
* @param {?proto.google.cloud.iot.v1.MqttConfig|undefined} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setMqttConfig = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.clearMqttConfig = function() {
return this.setMqttConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.hasMqttConfig = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional HttpConfig http_config = 9;
* @return {?proto.google.cloud.iot.v1.HttpConfig}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getHttpConfig = function() {
return /** @type{?proto.google.cloud.iot.v1.HttpConfig} */ (
jspb.Message.getWrapperField(this, proto.google.cloud.iot.v1.HttpConfig, 9));
};
/**
* @param {?proto.google.cloud.iot.v1.HttpConfig|undefined} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setHttpConfig = function(value) {
return jspb.Message.setWrapperField(this, 9, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.clearHttpConfig = function() {
return this.setHttpConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.hasHttpConfig = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* repeated RegistryCredential credentials = 8;
* @return {!Array<!proto.google.cloud.iot.v1.RegistryCredential>}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.getCredentialsList = function() {
return /** @type{!Array<!proto.google.cloud.iot.v1.RegistryCredential>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.cloud.iot.v1.RegistryCredential, 8));
};
/**
* @param {!Array<!proto.google.cloud.iot.v1.RegistryCredential>} value
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.setCredentialsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 8, value);
};
/**
* @param {!proto.google.cloud.iot.v1.RegistryCredential=} opt_value
* @param {number=} opt_index
* @return {!proto.google.cloud.iot.v1.RegistryCredential}
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.addCredentials = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.cloud.iot.v1.RegistryCredential, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.cloud.iot.v1.DeviceRegistry} returns this
*/
proto.google.cloud.iot.v1.DeviceRegistry.prototype.clearCredentialsLis