joynr.system.JoynrLogEvent.js Maven / Gradle / Ivy
/**
* This is the generated struct type JoynrLogEvent: DOCS GENERATED FROM INTERFACE DESCRIPTION
* Generation date: Mon Dec 05 09:32:59 CET 2016
*/
(function(undefined) {
/**
* @name JoynrLogEvent
* @constructor
*
* @classdesc
* This is the generated struct type JoynrLogEvent: DOCS GENERATED FROM INTERFACE DESCRIPTION
*
Generation date: Mon Dec 05 09:32:59 CET 2016
*
Record describing a log event
*
* @param {Object} members - an object containing the individual member elements
* @param {Number} members.timestamp - The time the logging event happened
* @param {String} members.eventVersion - The version of the event
* @param {String} members.host - The host
* @param {String} members.path - The path
* @param {String} members.message - The message
* @param {JoynrLogLevel} members.priority - The priority
* @param {JoynrLoggedError} members.errorEvent - The event
* @param {Array.} members.tags - List of text classifying the event
* @returns {JoynrLogEvent} a new instance of a JoynrLogEvent
*/
var JoynrLogEvent = function JoynrLogEvent(members) {
if (!(this instanceof JoynrLogEvent)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new JoynrLogEvent(members);
}
/**
* Used for serialization.
* @name JoynrLogEvent#_typeName
* @type String
* @readonly
*/
Object.defineProperty(this, "_typeName", {
configurable : false,
writable : false,
enumerable : true,
value : JoynrLogEvent._typeName
});
/**
* The time the logging event happened
* @name JoynrLogEvent#timestamp
* @type Number
*/
/**
* The version of the event
* @name JoynrLogEvent#eventVersion
* @type String
*/
/**
* The host
* @name JoynrLogEvent#host
* @type String
*/
/**
* The path
* @name JoynrLogEvent#path
* @type String
*/
/**
* The message
* @name JoynrLogEvent#message
* @type String
*/
/**
* The priority
* @name JoynrLogEvent#priority
* @type JoynrLogLevel
*/
/**
* The event
* @name JoynrLogEvent#errorEvent
* @type JoynrLoggedError
*/
/**
* List of text classifying the event
* @name JoynrLogEvent#tags
* @type Array.
*/
if (members !== undefined) {
this.timestamp = members.timestamp;
this.eventVersion = members.eventVersion;
this.host = members.host;
this.path = members.path;
this.message = members.message;
this.priority = members.priority;
this.errorEvent = members.errorEvent;
this.tags = members.tags;
}
};
Object.defineProperty(JoynrLogEvent, "_typeName", {
configurable : false,
writable : false,
enumerable : false,
value : "joynr.system.JoynrLogEvent"
});
Object.defineProperty(JoynrLogEvent, 'checkMembers', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: function checkMembers(instance, check) {
check(instance.timestamp, "Number", "members.timestamp");
check(instance.eventVersion, "String", "members.eventVersion");
check(instance.host, "String", "members.host");
check(instance.path, "String", "members.path");
check(instance.message, "String", "members.message");
check(instance.priority, ["String", "Object", "JoynrLogLevel"], "members.priority");
check(instance.errorEvent, ["Object", "JoynrLoggedError"], "members.errorEvent");
check(instance.tags, "Array", "members.tags");
}
});
/**
* @name JoynrLogEvent#MAJOR_VERSION
* @constant {Number}
* @default 0
* @summary The MAJOR_VERSION of the struct type JoynrLogEvent is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(JoynrLogEvent, 'MAJOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
/**
* @name JoynrLogEvent#MINOR_VERSION
* @constant {Number}
* @default 0
* @summary The MINOR_VERSION of the struct type JoynrLogEvent is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(JoynrLogEvent, 'MINOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
var preparePrototype = function(joynr) {
JoynrLogEvent.prototype = new joynr.JoynrObject();
JoynrLogEvent.prototype.constructor = JoynrLogEvent;
Object.defineProperty(JoynrLogEvent.prototype, 'equals', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: function equals(other) {
var i;
if (this === other) {
return true;
}
if (other === undefined || other === null) {
return false;
}
if (other._typeName === undefined || this._typeName !== other._typeName) {
return false;
}
if (this.timestamp === undefined || this.timestamp === null) {
if (other.timestamp !== null && other.timestamp !== undefined) {
return false;
}
} else if (this.timestamp !== other.timestamp){
return false;
}
if (this.eventVersion === undefined || this.eventVersion === null) {
if (other.eventVersion !== null && other.eventVersion !== undefined) {
return false;
}
} else if (this.eventVersion !== other.eventVersion){
return false;
}
if (this.host === undefined || this.host === null) {
if (other.host !== null && other.host !== undefined) {
return false;
}
} else if (this.host !== other.host){
return false;
}
if (this.path === undefined || this.path === null) {
if (other.path !== null && other.path !== undefined) {
return false;
}
} else if (this.path !== other.path){
return false;
}
if (this.message === undefined || this.message === null) {
if (other.message !== null && other.message !== undefined) {
return false;
}
} else if (this.message !== other.message){
return false;
}
if (this.priority === undefined || this.priority === null) {
if (other.priority !== null && other.priority !== undefined) {
return false;
}
} else if (!this.priority.equals(other.priority)){
return false;
}
if (this.errorEvent === undefined || this.errorEvent === null) {
if (other.errorEvent !== null && other.errorEvent !== undefined) {
return false;
}
} else if (!this.errorEvent.equals(other.errorEvent)){
return false;
}
if (this.tags === undefined || this.tags === null) {
if (other.tags !== null && other.tags !== undefined) {
return false;
}
} else {
if (this.tags.length !== other.tags.length) {
return false;
}
for (i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy