LINE-KickBot1/curve-thrift/SquareService.js

11762 lines
360 KiB
JavaScript
Raw Normal View History

2019-07-13 09:41:46 +08:00
//
// Autogenerated by Thrift Compiler (0.10.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
var thrift = require('thrift');
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var ttypes = require('./line_types');
//HELPER FUNCTIONS AND STRUCTURES
var SquareService_getSquareChatAnnouncements_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareChatAnnouncementsRequest(args.request);
}
}
};
SquareService_getSquareChatAnnouncements_args.prototype = {};
SquareService_getSquareChatAnnouncements_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareChatAnnouncementsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatAnnouncements_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatAnnouncements_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChatAnnouncements_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareChatAnnouncementsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareChatAnnouncements_result.prototype = {};
SquareService_getSquareChatAnnouncements_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareChatAnnouncementsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatAnnouncements_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatAnnouncements_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquareChatAnnouncement_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.DeleteSquareChatAnnouncementRequest(args.request);
}
}
};
SquareService_deleteSquareChatAnnouncement_args.prototype = {};
SquareService_deleteSquareChatAnnouncement_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.DeleteSquareChatAnnouncementRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquareChatAnnouncement_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquareChatAnnouncement_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquareChatAnnouncement_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.DeleteSquareChatAnnouncementResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_deleteSquareChatAnnouncement_result.prototype = {};
SquareService_deleteSquareChatAnnouncement_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.DeleteSquareChatAnnouncementResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquareChatAnnouncement_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquareChatAnnouncement_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquareChatAnnouncement_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.CreateSquareChatAnnouncementRequest(args.request);
}
}
};
SquareService_createSquareChatAnnouncement_args.prototype = {};
SquareService_createSquareChatAnnouncement_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.CreateSquareChatAnnouncementRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquareChatAnnouncement_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquareChatAnnouncement_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquareChatAnnouncement_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.CreateSquareChatAnnouncementResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_createSquareChatAnnouncement_result.prototype = {};
SquareService_createSquareChatAnnouncement_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.CreateSquareChatAnnouncementResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquareChatAnnouncement_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquareChatAnnouncement_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getNoteStatus_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetNoteStatusRequest(args.request);
}
}
};
SquareService_getNoteStatus_args.prototype = {};
SquareService_getNoteStatus_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetNoteStatusRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getNoteStatus_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getNoteStatus_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getNoteStatus_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetNoteStatusResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getNoteStatus_result.prototype = {};
SquareService_getNoteStatus_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetNoteStatusResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getNoteStatus_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getNoteStatus_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareStatus_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareStatusRequest(args.request);
}
}
};
SquareService_getSquareStatus_args.prototype = {};
SquareService_getSquareStatus_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareStatusRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareStatus_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareStatus_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareStatus_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareStatusResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareStatus_result.prototype = {};
SquareService_getSquareStatus_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareStatusResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareStatus_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareStatus_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareMember_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.ReportSquareMemberRequest(args.request);
}
}
};
SquareService_reportSquareMember_args.prototype = {};
SquareService_reportSquareMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.ReportSquareMemberRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareMember_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareMember_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ReportSquareMemberResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_reportSquareMember_result.prototype = {};
SquareService_reportSquareMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ReportSquareMemberResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareMember_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareMessage_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.ReportSquareMessageRequest(args.request);
}
}
};
SquareService_reportSquareMessage_args.prototype = {};
SquareService_reportSquareMessage_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.ReportSquareMessageRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareMessage_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareMessage_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareMessage_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ReportSquareMessageResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_reportSquareMessage_result.prototype = {};
SquareService_reportSquareMessage_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ReportSquareMessageResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareMessage_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareMessage_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.ReportSquareChatRequest(args.request);
}
}
};
SquareService_reportSquareChat_args.prototype = {};
SquareService_reportSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.ReportSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ReportSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_reportSquareChat_result.prototype = {};
SquareService_reportSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ReportSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.ReportSquareRequest(args.request);
}
}
};
SquareService_reportSquare_args.prototype = {};
SquareService_reportSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.ReportSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_reportSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ReportSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_reportSquare_result.prototype = {};
SquareService_reportSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ReportSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_reportSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_reportSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMemberRelation_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareMemberRelationRequest(args.request);
}
}
};
SquareService_updateSquareMemberRelation_args.prototype = {};
SquareService_updateSquareMemberRelation_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareMemberRelationRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMemberRelation_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMemberRelation_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMemberRelation_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareMemberRelationResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareMemberRelation_result.prototype = {};
SquareService_updateSquareMemberRelation_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareMemberRelationResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMemberRelation_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMemberRelation_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareAuthority_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareAuthorityRequest(args.request);
}
}
};
SquareService_updateSquareAuthority_args.prototype = {};
SquareService_updateSquareAuthority_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareAuthorityRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareAuthority_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareAuthority_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareAuthority_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareAuthorityResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareAuthority_result.prototype = {};
SquareService_updateSquareAuthority_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareAuthorityResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareAuthority_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareAuthority_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareChatMember_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareChatMemberRequest(args.request);
}
}
};
SquareService_updateSquareChatMember_args.prototype = {};
SquareService_updateSquareChatMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareChatMemberRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareChatMember_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareChatMember_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareChatMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareChatMemberResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareChatMember_result.prototype = {};
SquareService_updateSquareChatMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareChatMemberResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareChatMember_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareChatMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareChatRequest(args.request);
}
}
};
SquareService_updateSquareChat_args.prototype = {};
SquareService_updateSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareChat_result.prototype = {};
SquareService_updateSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_refreshSubscriptions_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.RefreshSubscriptionsRequest(args.request);
}
}
};
SquareService_refreshSubscriptions_args.prototype = {};
SquareService_refreshSubscriptions_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.RefreshSubscriptionsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_refreshSubscriptions_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_refreshSubscriptions_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_refreshSubscriptions_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.RefreshSubscriptionsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_refreshSubscriptions_result.prototype = {};
SquareService_refreshSubscriptions_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.RefreshSubscriptionsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_refreshSubscriptions_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_refreshSubscriptions_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_removeSubscriptions_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.RemoveSubscriptionsRequest(args.request);
}
}
};
SquareService_removeSubscriptions_args.prototype = {};
SquareService_removeSubscriptions_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.RemoveSubscriptionsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_removeSubscriptions_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_removeSubscriptions_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_removeSubscriptions_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.RemoveSubscriptionsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_removeSubscriptions_result.prototype = {};
SquareService_removeSubscriptions_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.RemoveSubscriptionsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_removeSubscriptions_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_removeSubscriptions_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_rejectSquareMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.RejectSquareMembersRequest(args.request);
}
}
};
SquareService_rejectSquareMembers_args.prototype = {};
SquareService_rejectSquareMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.RejectSquareMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_rejectSquareMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_rejectSquareMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_rejectSquareMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.RejectSquareMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_rejectSquareMembers_result.prototype = {};
SquareService_rejectSquareMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.RejectSquareMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_rejectSquareMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_rejectSquareMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareMembersRequest(args.request);
}
}
};
SquareService_updateSquareMembers_args.prototype = {};
SquareService_updateSquareMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareMembers_result.prototype = {};
SquareService_updateSquareMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMember_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareMemberRequest(args.request);
}
}
};
SquareService_updateSquareMember_args.prototype = {};
SquareService_updateSquareMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareMemberRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMember_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMember_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareMemberResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareMember_result.prototype = {};
SquareService_updateSquareMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareMemberResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareMember_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareFeatureSet_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareFeatureSetRequest(args.request);
}
}
};
SquareService_updateSquareFeatureSet_args.prototype = {};
SquareService_updateSquareFeatureSet_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareFeatureSetRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareFeatureSet_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareFeatureSet_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquareFeatureSet_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareFeatureSetResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquareFeatureSet_result.prototype = {};
SquareService_updateSquareFeatureSet_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareFeatureSetResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquareFeatureSet_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquareFeatureSet_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareFeatureSet_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareFeatureSetRequest(args.request);
}
}
};
SquareService_getSquareFeatureSet_args.prototype = {};
SquareService_getSquareFeatureSet_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareFeatureSetRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareFeatureSet_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareFeatureSet_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareFeatureSet_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareFeatureSetResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareFeatureSet_result.prototype = {};
SquareService_getSquareFeatureSet_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareFeatureSetResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareFeatureSet_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareFeatureSet_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_searchSquares_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.SearchSquaresRequest(args.request);
}
}
};
SquareService_searchSquares_args.prototype = {};
SquareService_searchSquares_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.SearchSquaresRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_searchSquares_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_searchSquares_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_searchSquares_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.SearchSquaresResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_searchSquares_result.prototype = {};
SquareService_searchSquares_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.SearchSquaresResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_searchSquares_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_searchSquares_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.UpdateSquareRequest(args.request);
}
}
};
SquareService_updateSquare_args.prototype = {};
SquareService_updateSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.UpdateSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_updateSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.UpdateSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_updateSquare_result.prototype = {};
SquareService_updateSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.UpdateSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_updateSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_updateSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getCategories_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareCategoriesRequest(args.request);
}
}
};
SquareService_getCategories_args.prototype = {};
SquareService_getCategories_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareCategoriesRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getCategories_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getCategories_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getCategories_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareCategoriesResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getCategories_result.prototype = {};
SquareService_getCategories_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareCategoriesResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getCategories_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getCategories_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_searchSquareMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.SearchSquareMembersRequest(args.request);
}
}
};
SquareService_searchSquareMembers_args.prototype = {};
SquareService_searchSquareMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.SearchSquareMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_searchSquareMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_searchSquareMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_searchSquareMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.SearchSquareMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_searchSquareMembers_result.prototype = {};
SquareService_searchSquareMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.SearchSquareMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_searchSquareMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_searchSquareMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_fetchSquareChatEvents_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.FetchSquareChatEventsRequest(args.request);
}
}
};
SquareService_fetchSquareChatEvents_args.prototype = {};
SquareService_fetchSquareChatEvents_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.FetchSquareChatEventsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_fetchSquareChatEvents_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_fetchSquareChatEvents_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_fetchSquareChatEvents_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.FetchSquareChatEventsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_fetchSquareChatEvents_result.prototype = {};
SquareService_fetchSquareChatEvents_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.FetchSquareChatEventsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_fetchSquareChatEvents_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_fetchSquareChatEvents_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_fetchMyEvents_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.FetchMyEventsRequest(args.request);
}
}
};
SquareService_fetchMyEvents_args.prototype = {};
SquareService_fetchMyEvents_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.FetchMyEventsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_fetchMyEvents_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_fetchMyEvents_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_fetchMyEvents_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.FetchMyEventsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_fetchMyEvents_result.prototype = {};
SquareService_fetchMyEvents_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.FetchMyEventsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_fetchMyEvents_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_fetchMyEvents_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_markAsRead_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.MarkAsReadRequest(args.request);
}
}
};
SquareService_markAsRead_args.prototype = {};
SquareService_markAsRead_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.MarkAsReadRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_markAsRead_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_markAsRead_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_markAsRead_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.MarkAsReadResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_markAsRead_result.prototype = {};
SquareService_markAsRead_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.MarkAsReadResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_markAsRead_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_markAsRead_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareAuthority_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareAuthorityRequest(args.request);
}
}
};
SquareService_getSquareAuthority_args.prototype = {};
SquareService_getSquareAuthority_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareAuthorityRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareAuthority_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareAuthority_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareAuthority_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareAuthorityResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareAuthority_result.prototype = {};
SquareService_getSquareAuthority_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareAuthorityResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareAuthority_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareAuthority_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_sendMessage_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.SendMessageRequest(args.request);
}
}
};
SquareService_sendMessage_args.prototype = {};
SquareService_sendMessage_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.SendMessageRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_sendMessage_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_sendMessage_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_sendMessage_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.SendMessageResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_sendMessage_result.prototype = {};
SquareService_sendMessage_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.SendMessageResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_sendMessage_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_sendMessage_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_leaveSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.LeaveSquareRequest(args.request);
}
}
};
SquareService_leaveSquare_args.prototype = {};
SquareService_leaveSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.LeaveSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_leaveSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_leaveSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_leaveSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.LeaveSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_leaveSquare_result.prototype = {};
SquareService_leaveSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.LeaveSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_leaveSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_leaveSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_leaveSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.LeaveSquareChatRequest(args.request);
}
}
};
SquareService_leaveSquareChat_args.prototype = {};
SquareService_leaveSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.LeaveSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_leaveSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_leaveSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_leaveSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.LeaveSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_leaveSquareChat_result.prototype = {};
SquareService_leaveSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.LeaveSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_leaveSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_leaveSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_joinSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.JoinSquareChatRequest(args.request);
}
}
};
SquareService_joinSquareChat_args.prototype = {};
SquareService_joinSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.JoinSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_joinSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_joinSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_joinSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.JoinSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_joinSquareChat_result.prototype = {};
SquareService_joinSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.JoinSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_joinSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_joinSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_joinSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.JoinSquareRequest(args.request);
}
}
};
SquareService_joinSquare_args.prototype = {};
SquareService_joinSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.JoinSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_joinSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_joinSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_joinSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.JoinSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_joinSquare_result.prototype = {};
SquareService_joinSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.JoinSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_joinSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_joinSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_inviteToSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.InviteToSquareRequest(args.request);
}
}
};
SquareService_inviteToSquare_args.prototype = {};
SquareService_inviteToSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.InviteToSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_inviteToSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_inviteToSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_inviteToSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.InviteToSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_inviteToSquare_result.prototype = {};
SquareService_inviteToSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.InviteToSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_inviteToSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_inviteToSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_inviteToSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.InviteToSquareChatRequest(args.request);
}
}
};
SquareService_inviteToSquareChat_args.prototype = {};
SquareService_inviteToSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.InviteToSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_inviteToSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_inviteToSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_inviteToSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.InviteToSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_inviteToSquareChat_result.prototype = {};
SquareService_inviteToSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.InviteToSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_inviteToSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_inviteToSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMember_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareMemberRequest(args.request);
}
}
};
SquareService_getSquareMember_args.prototype = {};
SquareService_getSquareMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareMemberRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMember_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMember_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareMemberResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareMember_result.prototype = {};
SquareService_getSquareMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareMemberResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMember_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareMembersRequest(args.request);
}
}
};
SquareService_getSquareMembers_args.prototype = {};
SquareService_getSquareMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareMembers_result.prototype = {};
SquareService_getSquareMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMemberRelation_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareMemberRelationRequest(args.request);
}
}
};
SquareService_getSquareMemberRelation_args.prototype = {};
SquareService_getSquareMemberRelation_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareMemberRelationRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMemberRelation_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMemberRelation_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMemberRelation_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareMemberRelationResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareMemberRelation_result.prototype = {};
SquareService_getSquareMemberRelation_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareMemberRelationResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMemberRelation_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMemberRelation_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMemberRelations_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareMemberRelationsRequest(args.request);
}
}
};
SquareService_getSquareMemberRelations_args.prototype = {};
SquareService_getSquareMemberRelations_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareMemberRelationsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMemberRelations_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMemberRelations_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareMemberRelations_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareMemberRelationsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareMemberRelations_result.prototype = {};
SquareService_getSquareMemberRelations_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareMemberRelationsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareMemberRelations_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareMemberRelations_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChatMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareChatMembersRequest(args.request);
}
}
};
SquareService_getSquareChatMembers_args.prototype = {};
SquareService_getSquareChatMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareChatMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChatMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareChatMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareChatMembers_result.prototype = {};
SquareService_getSquareChatMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareChatMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChatStatus_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareChatStatusRequest(args.request);
}
}
};
SquareService_getSquareChatStatus_args.prototype = {};
SquareService_getSquareChatStatus_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareChatStatusRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatStatus_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatStatus_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChatStatus_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareChatStatusResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareChatStatus_result.prototype = {};
SquareService_getSquareChatStatus_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareChatStatusResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChatStatus_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChatStatus_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareChatRequest(args.request);
}
}
};
SquareService_getSquareChat_args.prototype = {};
SquareService_getSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquareChat_result.prototype = {};
SquareService_getSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetSquareRequest(args.request);
}
}
};
SquareService_getSquare_args.prototype = {};
SquareService_getSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getSquare_result.prototype = {};
SquareService_getSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinedSquares_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetJoinedSquaresRequest(args.request);
}
}
};
SquareService_getJoinedSquares_args.prototype = {};
SquareService_getJoinedSquares_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetJoinedSquaresRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinedSquares_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinedSquares_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinedSquares_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetJoinedSquaresResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getJoinedSquares_result.prototype = {};
SquareService_getJoinedSquares_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetJoinedSquaresResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinedSquares_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinedSquares_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinedSquareChats_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetJoinedSquareChatsRequest(args.request);
}
}
};
SquareService_getJoinedSquareChats_args.prototype = {};
SquareService_getJoinedSquareChats_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetJoinedSquareChatsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinedSquareChats_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinedSquareChats_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinedSquareChats_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetJoinedSquareChatsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getJoinedSquareChats_result.prototype = {};
SquareService_getJoinedSquareChats_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetJoinedSquareChatsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinedSquareChats_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinedSquareChats_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_approveSquareMembers_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.ApproveSquareMembersRequest(args.request);
}
}
};
SquareService_approveSquareMembers_args.prototype = {};
SquareService_approveSquareMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.ApproveSquareMembersRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_approveSquareMembers_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_approveSquareMembers_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_approveSquareMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ApproveSquareMembersResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_approveSquareMembers_result.prototype = {};
SquareService_approveSquareMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ApproveSquareMembersResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_approveSquareMembers_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_approveSquareMembers_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.CreateSquareChatRequest(args.request);
}
}
};
SquareService_createSquareChat_args.prototype = {};
SquareService_createSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.CreateSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.CreateSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_createSquareChat_result.prototype = {};
SquareService_createSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.CreateSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.CreateSquareRequest(args.request);
}
}
};
SquareService_createSquare_args.prototype = {};
SquareService_createSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.CreateSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_createSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.CreateSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_createSquare_result.prototype = {};
SquareService_createSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.CreateSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_createSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_createSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquareChat_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.DeleteSquareChatRequest(args.request);
}
}
};
SquareService_deleteSquareChat_args.prototype = {};
SquareService_deleteSquareChat_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.DeleteSquareChatRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquareChat_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquareChat_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquareChat_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.DeleteSquareChatResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_deleteSquareChat_result.prototype = {};
SquareService_deleteSquareChat_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.DeleteSquareChatResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquareChat_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquareChat_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquare_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.DeleteSquareRequest(args.request);
}
}
};
SquareService_deleteSquare_args.prototype = {};
SquareService_deleteSquare_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.DeleteSquareRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquare_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquare_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_deleteSquare_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.DeleteSquareResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_deleteSquare_result.prototype = {};
SquareService_deleteSquare_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.DeleteSquareResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_deleteSquare_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_deleteSquare_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_destroyMessage_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.DestroyMessageRequest(args.request);
}
}
};
SquareService_destroyMessage_args.prototype = {};
SquareService_destroyMessage_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.DestroyMessageRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_destroyMessage_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_destroyMessage_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_destroyMessage_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.DestroyMessageResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_destroyMessage_result.prototype = {};
SquareService_destroyMessage_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.DestroyMessageResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_destroyMessage_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_destroyMessage_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinableSquareChats_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetJoinableSquareChatsRequest(args.request);
}
}
};
SquareService_getJoinableSquareChats_args.prototype = {};
SquareService_getJoinableSquareChats_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetJoinableSquareChatsRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinableSquareChats_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinableSquareChats_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getJoinableSquareChats_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetJoinableSquareChatsResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getJoinableSquareChats_result.prototype = {};
SquareService_getJoinableSquareChats_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetJoinableSquareChatsResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getJoinableSquareChats_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getJoinableSquareChats_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getInvitationTicketUrl_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.GetInvitationTicketUrlRequest(args.request);
}
}
};
SquareService_getInvitationTicketUrl_args.prototype = {};
SquareService_getInvitationTicketUrl_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.GetInvitationTicketUrlRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getInvitationTicketUrl_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_getInvitationTicketUrl_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_getInvitationTicketUrl_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GetInvitationTicketUrlResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_getInvitationTicketUrl_result.prototype = {};
SquareService_getInvitationTicketUrl_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.GetInvitationTicketUrlResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_getInvitationTicketUrl_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_getInvitationTicketUrl_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_findSquareByInvitationTicket_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.FindSquareByInvitationTicketRequest(args.request);
}
}
};
SquareService_findSquareByInvitationTicket_args.prototype = {};
SquareService_findSquareByInvitationTicket_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.request = new ttypes.FindSquareByInvitationTicketRequest();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_findSquareByInvitationTicket_args.prototype.write = function(output) {
output.writeStructBegin('SquareService_findSquareByInvitationTicket_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareService_findSquareByInvitationTicket_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.SquareException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.FindSquareByInvitationTicketResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
SquareService_findSquareByInvitationTicket_result.prototype = {};
SquareService_findSquareByInvitationTicket_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.FindSquareByInvitationTicketResponse();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.SquareException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
SquareService_findSquareByInvitationTicket_result.prototype.write = function(output) {
output.writeStructBegin('SquareService_findSquareByInvitationTicket_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var SquareServiceClient = exports.Client = function(output, pClass) {
this.output = output;
this.pClass = pClass;
this._seqid = 0;
this._reqs = {};
};
SquareServiceClient.prototype = {};
SquareServiceClient.prototype.seqid = function() { return this._seqid; };
SquareServiceClient.prototype.new_seqid = function() { return this._seqid += 1; };
SquareServiceClient.prototype.getSquareChatAnnouncements = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareChatAnnouncements(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareChatAnnouncements(request);
}
};
SquareServiceClient.prototype.send_getSquareChatAnnouncements = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareChatAnnouncements', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareChatAnnouncements_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareChatAnnouncements = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareChatAnnouncements_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareChatAnnouncements failed: unknown result');
};
SquareServiceClient.prototype.deleteSquareChatAnnouncement = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_deleteSquareChatAnnouncement(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_deleteSquareChatAnnouncement(request);
}
};
SquareServiceClient.prototype.send_deleteSquareChatAnnouncement = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('deleteSquareChatAnnouncement', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_deleteSquareChatAnnouncement_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_deleteSquareChatAnnouncement = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_deleteSquareChatAnnouncement_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('deleteSquareChatAnnouncement failed: unknown result');
};
SquareServiceClient.prototype.createSquareChatAnnouncement = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_createSquareChatAnnouncement(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_createSquareChatAnnouncement(request);
}
};
SquareServiceClient.prototype.send_createSquareChatAnnouncement = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('createSquareChatAnnouncement', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_createSquareChatAnnouncement_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_createSquareChatAnnouncement = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_createSquareChatAnnouncement_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('createSquareChatAnnouncement failed: unknown result');
};
SquareServiceClient.prototype.getNoteStatus = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getNoteStatus(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getNoteStatus(request);
}
};
SquareServiceClient.prototype.send_getNoteStatus = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getNoteStatus', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getNoteStatus_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getNoteStatus = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getNoteStatus_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getNoteStatus failed: unknown result');
};
SquareServiceClient.prototype.getSquareStatus = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareStatus(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareStatus(request);
}
};
SquareServiceClient.prototype.send_getSquareStatus = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareStatus', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareStatus_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareStatus = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareStatus_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareStatus failed: unknown result');
};
SquareServiceClient.prototype.reportSquareMember = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_reportSquareMember(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_reportSquareMember(request);
}
};
SquareServiceClient.prototype.send_reportSquareMember = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('reportSquareMember', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_reportSquareMember_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_reportSquareMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_reportSquareMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('reportSquareMember failed: unknown result');
};
SquareServiceClient.prototype.reportSquareMessage = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_reportSquareMessage(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_reportSquareMessage(request);
}
};
SquareServiceClient.prototype.send_reportSquareMessage = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('reportSquareMessage', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_reportSquareMessage_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_reportSquareMessage = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_reportSquareMessage_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('reportSquareMessage failed: unknown result');
};
SquareServiceClient.prototype.reportSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_reportSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_reportSquareChat(request);
}
};
SquareServiceClient.prototype.send_reportSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('reportSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_reportSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_reportSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_reportSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('reportSquareChat failed: unknown result');
};
SquareServiceClient.prototype.reportSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_reportSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_reportSquare(request);
}
};
SquareServiceClient.prototype.send_reportSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('reportSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_reportSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_reportSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_reportSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('reportSquare failed: unknown result');
};
SquareServiceClient.prototype.updateSquareMemberRelation = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareMemberRelation(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareMemberRelation(request);
}
};
SquareServiceClient.prototype.send_updateSquareMemberRelation = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareMemberRelation', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareMemberRelation_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareMemberRelation = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareMemberRelation_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareMemberRelation failed: unknown result');
};
SquareServiceClient.prototype.updateSquareAuthority = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareAuthority(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareAuthority(request);
}
};
SquareServiceClient.prototype.send_updateSquareAuthority = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareAuthority', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareAuthority_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareAuthority = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareAuthority_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareAuthority failed: unknown result');
};
SquareServiceClient.prototype.updateSquareChatMember = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareChatMember(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareChatMember(request);
}
};
SquareServiceClient.prototype.send_updateSquareChatMember = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareChatMember', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareChatMember_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareChatMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareChatMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareChatMember failed: unknown result');
};
SquareServiceClient.prototype.updateSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareChat(request);
}
};
SquareServiceClient.prototype.send_updateSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareChat failed: unknown result');
};
SquareServiceClient.prototype.refreshSubscriptions = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_refreshSubscriptions(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_refreshSubscriptions(request);
}
};
SquareServiceClient.prototype.send_refreshSubscriptions = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('refreshSubscriptions', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_refreshSubscriptions_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_refreshSubscriptions = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_refreshSubscriptions_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('refreshSubscriptions failed: unknown result');
};
SquareServiceClient.prototype.removeSubscriptions = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_removeSubscriptions(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_removeSubscriptions(request);
}
};
SquareServiceClient.prototype.send_removeSubscriptions = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('removeSubscriptions', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_removeSubscriptions_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_removeSubscriptions = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_removeSubscriptions_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('removeSubscriptions failed: unknown result');
};
SquareServiceClient.prototype.rejectSquareMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_rejectSquareMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_rejectSquareMembers(request);
}
};
SquareServiceClient.prototype.send_rejectSquareMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('rejectSquareMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_rejectSquareMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_rejectSquareMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_rejectSquareMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('rejectSquareMembers failed: unknown result');
};
SquareServiceClient.prototype.updateSquareMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareMembers(request);
}
};
SquareServiceClient.prototype.send_updateSquareMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareMembers failed: unknown result');
};
SquareServiceClient.prototype.updateSquareMember = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareMember(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareMember(request);
}
};
SquareServiceClient.prototype.send_updateSquareMember = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareMember', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareMember_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareMember failed: unknown result');
};
SquareServiceClient.prototype.updateSquareFeatureSet = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquareFeatureSet(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquareFeatureSet(request);
}
};
SquareServiceClient.prototype.send_updateSquareFeatureSet = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquareFeatureSet', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquareFeatureSet_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquareFeatureSet = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquareFeatureSet_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquareFeatureSet failed: unknown result');
};
SquareServiceClient.prototype.getSquareFeatureSet = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareFeatureSet(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareFeatureSet(request);
}
};
SquareServiceClient.prototype.send_getSquareFeatureSet = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareFeatureSet', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareFeatureSet_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareFeatureSet = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareFeatureSet_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareFeatureSet failed: unknown result');
};
SquareServiceClient.prototype.searchSquares = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_searchSquares(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_searchSquares(request);
}
};
SquareServiceClient.prototype.send_searchSquares = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('searchSquares', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_searchSquares_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_searchSquares = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_searchSquares_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('searchSquares failed: unknown result');
};
SquareServiceClient.prototype.updateSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateSquare(request);
}
};
SquareServiceClient.prototype.send_updateSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_updateSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_updateSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_updateSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('updateSquare failed: unknown result');
};
SquareServiceClient.prototype.getCategories = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getCategories(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getCategories(request);
}
};
SquareServiceClient.prototype.send_getCategories = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getCategories', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getCategories_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getCategories = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getCategories_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getCategories failed: unknown result');
};
SquareServiceClient.prototype.searchSquareMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_searchSquareMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_searchSquareMembers(request);
}
};
SquareServiceClient.prototype.send_searchSquareMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('searchSquareMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_searchSquareMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_searchSquareMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_searchSquareMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('searchSquareMembers failed: unknown result');
};
SquareServiceClient.prototype.fetchSquareChatEvents = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_fetchSquareChatEvents(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_fetchSquareChatEvents(request);
}
};
SquareServiceClient.prototype.send_fetchSquareChatEvents = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('fetchSquareChatEvents', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_fetchSquareChatEvents_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_fetchSquareChatEvents = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_fetchSquareChatEvents_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('fetchSquareChatEvents failed: unknown result');
};
SquareServiceClient.prototype.fetchMyEvents = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_fetchMyEvents(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_fetchMyEvents(request);
}
};
SquareServiceClient.prototype.send_fetchMyEvents = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('fetchMyEvents', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_fetchMyEvents_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_fetchMyEvents = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_fetchMyEvents_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('fetchMyEvents failed: unknown result');
};
SquareServiceClient.prototype.markAsRead = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_markAsRead(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_markAsRead(request);
}
};
SquareServiceClient.prototype.send_markAsRead = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('markAsRead', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_markAsRead_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_markAsRead = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_markAsRead_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('markAsRead failed: unknown result');
};
SquareServiceClient.prototype.getSquareAuthority = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareAuthority(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareAuthority(request);
}
};
SquareServiceClient.prototype.send_getSquareAuthority = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareAuthority', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareAuthority_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareAuthority = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareAuthority_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareAuthority failed: unknown result');
};
SquareServiceClient.prototype.sendMessage = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_sendMessage(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sendMessage(request);
}
};
SquareServiceClient.prototype.send_sendMessage = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sendMessage', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_sendMessage_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_sendMessage = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_sendMessage_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sendMessage failed: unknown result');
};
SquareServiceClient.prototype.leaveSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_leaveSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_leaveSquare(request);
}
};
SquareServiceClient.prototype.send_leaveSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('leaveSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_leaveSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_leaveSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_leaveSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('leaveSquare failed: unknown result');
};
SquareServiceClient.prototype.leaveSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_leaveSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_leaveSquareChat(request);
}
};
SquareServiceClient.prototype.send_leaveSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('leaveSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_leaveSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_leaveSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_leaveSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('leaveSquareChat failed: unknown result');
};
SquareServiceClient.prototype.joinSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_joinSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_joinSquareChat(request);
}
};
SquareServiceClient.prototype.send_joinSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('joinSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_joinSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_joinSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_joinSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('joinSquareChat failed: unknown result');
};
SquareServiceClient.prototype.joinSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_joinSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_joinSquare(request);
}
};
SquareServiceClient.prototype.send_joinSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('joinSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_joinSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_joinSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_joinSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('joinSquare failed: unknown result');
};
SquareServiceClient.prototype.inviteToSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_inviteToSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_inviteToSquare(request);
}
};
SquareServiceClient.prototype.send_inviteToSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('inviteToSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_inviteToSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_inviteToSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_inviteToSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('inviteToSquare failed: unknown result');
};
SquareServiceClient.prototype.inviteToSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_inviteToSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_inviteToSquareChat(request);
}
};
SquareServiceClient.prototype.send_inviteToSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('inviteToSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_inviteToSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_inviteToSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_inviteToSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('inviteToSquareChat failed: unknown result');
};
SquareServiceClient.prototype.getSquareMember = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareMember(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareMember(request);
}
};
SquareServiceClient.prototype.send_getSquareMember = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareMember', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareMember_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareMember failed: unknown result');
};
SquareServiceClient.prototype.getSquareMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareMembers(request);
}
};
SquareServiceClient.prototype.send_getSquareMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareMembers failed: unknown result');
};
SquareServiceClient.prototype.getSquareMemberRelation = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareMemberRelation(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareMemberRelation(request);
}
};
SquareServiceClient.prototype.send_getSquareMemberRelation = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareMemberRelation', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareMemberRelation_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareMemberRelation = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareMemberRelation_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareMemberRelation failed: unknown result');
};
SquareServiceClient.prototype.getSquareMemberRelations = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareMemberRelations(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareMemberRelations(request);
}
};
SquareServiceClient.prototype.send_getSquareMemberRelations = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareMemberRelations', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareMemberRelations_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareMemberRelations = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareMemberRelations_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareMemberRelations failed: unknown result');
};
SquareServiceClient.prototype.getSquareChatMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareChatMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareChatMembers(request);
}
};
SquareServiceClient.prototype.send_getSquareChatMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareChatMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareChatMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareChatMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareChatMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareChatMembers failed: unknown result');
};
SquareServiceClient.prototype.getSquareChatStatus = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareChatStatus(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareChatStatus(request);
}
};
SquareServiceClient.prototype.send_getSquareChatStatus = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareChatStatus', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareChatStatus_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareChatStatus = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareChatStatus_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareChatStatus failed: unknown result');
};
SquareServiceClient.prototype.getSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquareChat(request);
}
};
SquareServiceClient.prototype.send_getSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquareChat failed: unknown result');
};
SquareServiceClient.prototype.getSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSquare(request);
}
};
SquareServiceClient.prototype.send_getSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSquare failed: unknown result');
};
SquareServiceClient.prototype.getJoinedSquares = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getJoinedSquares(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getJoinedSquares(request);
}
};
SquareServiceClient.prototype.send_getJoinedSquares = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getJoinedSquares', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getJoinedSquares_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getJoinedSquares = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getJoinedSquares_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getJoinedSquares failed: unknown result');
};
SquareServiceClient.prototype.getJoinedSquareChats = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getJoinedSquareChats(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getJoinedSquareChats(request);
}
};
SquareServiceClient.prototype.send_getJoinedSquareChats = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getJoinedSquareChats', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getJoinedSquareChats_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getJoinedSquareChats = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getJoinedSquareChats_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getJoinedSquareChats failed: unknown result');
};
SquareServiceClient.prototype.approveSquareMembers = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_approveSquareMembers(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_approveSquareMembers(request);
}
};
SquareServiceClient.prototype.send_approveSquareMembers = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('approveSquareMembers', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_approveSquareMembers_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_approveSquareMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_approveSquareMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('approveSquareMembers failed: unknown result');
};
SquareServiceClient.prototype.createSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_createSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_createSquareChat(request);
}
};
SquareServiceClient.prototype.send_createSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('createSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_createSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_createSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_createSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('createSquareChat failed: unknown result');
};
SquareServiceClient.prototype.createSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_createSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_createSquare(request);
}
};
SquareServiceClient.prototype.send_createSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('createSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_createSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_createSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_createSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('createSquare failed: unknown result');
};
SquareServiceClient.prototype.deleteSquareChat = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_deleteSquareChat(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_deleteSquareChat(request);
}
};
SquareServiceClient.prototype.send_deleteSquareChat = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('deleteSquareChat', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_deleteSquareChat_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_deleteSquareChat = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_deleteSquareChat_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('deleteSquareChat failed: unknown result');
};
SquareServiceClient.prototype.deleteSquare = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_deleteSquare(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_deleteSquare(request);
}
};
SquareServiceClient.prototype.send_deleteSquare = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('deleteSquare', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_deleteSquare_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_deleteSquare = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_deleteSquare_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('deleteSquare failed: unknown result');
};
SquareServiceClient.prototype.destroyMessage = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_destroyMessage(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_destroyMessage(request);
}
};
SquareServiceClient.prototype.send_destroyMessage = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('destroyMessage', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_destroyMessage_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_destroyMessage = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_destroyMessage_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('destroyMessage failed: unknown result');
};
SquareServiceClient.prototype.getJoinableSquareChats = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getJoinableSquareChats(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getJoinableSquareChats(request);
}
};
SquareServiceClient.prototype.send_getJoinableSquareChats = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getJoinableSquareChats', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getJoinableSquareChats_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getJoinableSquareChats = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getJoinableSquareChats_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getJoinableSquareChats failed: unknown result');
};
SquareServiceClient.prototype.getInvitationTicketUrl = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getInvitationTicketUrl(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getInvitationTicketUrl(request);
}
};
SquareServiceClient.prototype.send_getInvitationTicketUrl = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getInvitationTicketUrl', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_getInvitationTicketUrl_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_getInvitationTicketUrl = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_getInvitationTicketUrl_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getInvitationTicketUrl failed: unknown result');
};
SquareServiceClient.prototype.findSquareByInvitationTicket = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_findSquareByInvitationTicket(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_findSquareByInvitationTicket(request);
}
};
SquareServiceClient.prototype.send_findSquareByInvitationTicket = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('findSquareByInvitationTicket', Thrift.MessageType.CALL, this.seqid());
var args = new SquareService_findSquareByInvitationTicket_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
SquareServiceClient.prototype.recv_findSquareByInvitationTicket = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new SquareService_findSquareByInvitationTicket_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('findSquareByInvitationTicket failed: unknown result');
};
var SquareServiceProcessor = exports.Processor = function(handler) {
this._handler = handler;
}
;
SquareServiceProcessor.prototype.process = function(input, output) {
var r = input.readMessageBegin();
if (this['process_' + r.fname]) {
return this['process_' + r.fname].call(this, r.rseqid, input, output);
} else {
input.skip(Thrift.Type.STRUCT);
input.readMessageEnd();
var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
x.write(output);
output.writeMessageEnd();
output.flush();
}
}
;
SquareServiceProcessor.prototype.process_getSquareChatAnnouncements = function(seqid, input, output) {
var args = new SquareService_getSquareChatAnnouncements_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareChatAnnouncements.length === 1) {
Q.fcall(this._handler.getSquareChatAnnouncements, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareChatAnnouncements_result({success: result});
output.writeMessageBegin("getSquareChatAnnouncements", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareChatAnnouncements_result(err);
output.writeMessageBegin("getSquareChatAnnouncements", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatAnnouncements", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareChatAnnouncements(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareChatAnnouncements_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareChatAnnouncements", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatAnnouncements", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_deleteSquareChatAnnouncement = function(seqid, input, output) {
var args = new SquareService_deleteSquareChatAnnouncement_args();
args.read(input);
input.readMessageEnd();
if (this._handler.deleteSquareChatAnnouncement.length === 1) {
Q.fcall(this._handler.deleteSquareChatAnnouncement, args.request)
.then(function(result) {
var result_obj = new SquareService_deleteSquareChatAnnouncement_result({success: result});
output.writeMessageBegin("deleteSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_deleteSquareChatAnnouncement_result(err);
output.writeMessageBegin("deleteSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquareChatAnnouncement", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.deleteSquareChatAnnouncement(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_deleteSquareChatAnnouncement_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("deleteSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquareChatAnnouncement", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_createSquareChatAnnouncement = function(seqid, input, output) {
var args = new SquareService_createSquareChatAnnouncement_args();
args.read(input);
input.readMessageEnd();
if (this._handler.createSquareChatAnnouncement.length === 1) {
Q.fcall(this._handler.createSquareChatAnnouncement, args.request)
.then(function(result) {
var result_obj = new SquareService_createSquareChatAnnouncement_result({success: result});
output.writeMessageBegin("createSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_createSquareChatAnnouncement_result(err);
output.writeMessageBegin("createSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquareChatAnnouncement", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.createSquareChatAnnouncement(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_createSquareChatAnnouncement_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("createSquareChatAnnouncement", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquareChatAnnouncement", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getNoteStatus = function(seqid, input, output) {
var args = new SquareService_getNoteStatus_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getNoteStatus.length === 1) {
Q.fcall(this._handler.getNoteStatus, args.request)
.then(function(result) {
var result_obj = new SquareService_getNoteStatus_result({success: result});
output.writeMessageBegin("getNoteStatus", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getNoteStatus_result(err);
output.writeMessageBegin("getNoteStatus", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getNoteStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getNoteStatus(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getNoteStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getNoteStatus", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getNoteStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareStatus = function(seqid, input, output) {
var args = new SquareService_getSquareStatus_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareStatus.length === 1) {
Q.fcall(this._handler.getSquareStatus, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareStatus_result({success: result});
output.writeMessageBegin("getSquareStatus", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareStatus_result(err);
output.writeMessageBegin("getSquareStatus", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareStatus(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareStatus", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_reportSquareMember = function(seqid, input, output) {
var args = new SquareService_reportSquareMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.reportSquareMember.length === 1) {
Q.fcall(this._handler.reportSquareMember, args.request)
.then(function(result) {
var result_obj = new SquareService_reportSquareMember_result({success: result});
output.writeMessageBegin("reportSquareMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_reportSquareMember_result(err);
output.writeMessageBegin("reportSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.reportSquareMember(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_reportSquareMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("reportSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_reportSquareMessage = function(seqid, input, output) {
var args = new SquareService_reportSquareMessage_args();
args.read(input);
input.readMessageEnd();
if (this._handler.reportSquareMessage.length === 1) {
Q.fcall(this._handler.reportSquareMessage, args.request)
.then(function(result) {
var result_obj = new SquareService_reportSquareMessage_result({success: result});
output.writeMessageBegin("reportSquareMessage", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_reportSquareMessage_result(err);
output.writeMessageBegin("reportSquareMessage", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.reportSquareMessage(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_reportSquareMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("reportSquareMessage", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_reportSquareChat = function(seqid, input, output) {
var args = new SquareService_reportSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.reportSquareChat.length === 1) {
Q.fcall(this._handler.reportSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_reportSquareChat_result({success: result});
output.writeMessageBegin("reportSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_reportSquareChat_result(err);
output.writeMessageBegin("reportSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.reportSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_reportSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("reportSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_reportSquare = function(seqid, input, output) {
var args = new SquareService_reportSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.reportSquare.length === 1) {
Q.fcall(this._handler.reportSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_reportSquare_result({success: result});
output.writeMessageBegin("reportSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_reportSquare_result(err);
output.writeMessageBegin("reportSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.reportSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_reportSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("reportSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reportSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareMemberRelation = function(seqid, input, output) {
var args = new SquareService_updateSquareMemberRelation_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareMemberRelation.length === 1) {
Q.fcall(this._handler.updateSquareMemberRelation, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareMemberRelation_result({success: result});
output.writeMessageBegin("updateSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareMemberRelation_result(err);
output.writeMessageBegin("updateSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMemberRelation", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareMemberRelation(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareMemberRelation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMemberRelation", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareAuthority = function(seqid, input, output) {
var args = new SquareService_updateSquareAuthority_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareAuthority.length === 1) {
Q.fcall(this._handler.updateSquareAuthority, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareAuthority_result({success: result});
output.writeMessageBegin("updateSquareAuthority", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareAuthority_result(err);
output.writeMessageBegin("updateSquareAuthority", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareAuthority", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareAuthority(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareAuthority_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareAuthority", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareAuthority", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareChatMember = function(seqid, input, output) {
var args = new SquareService_updateSquareChatMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareChatMember.length === 1) {
Q.fcall(this._handler.updateSquareChatMember, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareChatMember_result({success: result});
output.writeMessageBegin("updateSquareChatMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareChatMember_result(err);
output.writeMessageBegin("updateSquareChatMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareChatMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareChatMember(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareChatMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareChatMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareChatMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareChat = function(seqid, input, output) {
var args = new SquareService_updateSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareChat.length === 1) {
Q.fcall(this._handler.updateSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareChat_result({success: result});
output.writeMessageBegin("updateSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareChat_result(err);
output.writeMessageBegin("updateSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_refreshSubscriptions = function(seqid, input, output) {
var args = new SquareService_refreshSubscriptions_args();
args.read(input);
input.readMessageEnd();
if (this._handler.refreshSubscriptions.length === 1) {
Q.fcall(this._handler.refreshSubscriptions, args.request)
.then(function(result) {
var result_obj = new SquareService_refreshSubscriptions_result({success: result});
output.writeMessageBegin("refreshSubscriptions", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_refreshSubscriptions_result(err);
output.writeMessageBegin("refreshSubscriptions", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("refreshSubscriptions", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.refreshSubscriptions(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_refreshSubscriptions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("refreshSubscriptions", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("refreshSubscriptions", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_removeSubscriptions = function(seqid, input, output) {
var args = new SquareService_removeSubscriptions_args();
args.read(input);
input.readMessageEnd();
if (this._handler.removeSubscriptions.length === 1) {
Q.fcall(this._handler.removeSubscriptions, args.request)
.then(function(result) {
var result_obj = new SquareService_removeSubscriptions_result({success: result});
output.writeMessageBegin("removeSubscriptions", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_removeSubscriptions_result(err);
output.writeMessageBegin("removeSubscriptions", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("removeSubscriptions", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.removeSubscriptions(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_removeSubscriptions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("removeSubscriptions", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("removeSubscriptions", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_rejectSquareMembers = function(seqid, input, output) {
var args = new SquareService_rejectSquareMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.rejectSquareMembers.length === 1) {
Q.fcall(this._handler.rejectSquareMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_rejectSquareMembers_result({success: result});
output.writeMessageBegin("rejectSquareMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_rejectSquareMembers_result(err);
output.writeMessageBegin("rejectSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("rejectSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.rejectSquareMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_rejectSquareMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("rejectSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("rejectSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareMembers = function(seqid, input, output) {
var args = new SquareService_updateSquareMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareMembers.length === 1) {
Q.fcall(this._handler.updateSquareMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareMembers_result({success: result});
output.writeMessageBegin("updateSquareMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareMembers_result(err);
output.writeMessageBegin("updateSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareMember = function(seqid, input, output) {
var args = new SquareService_updateSquareMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareMember.length === 1) {
Q.fcall(this._handler.updateSquareMember, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareMember_result({success: result});
output.writeMessageBegin("updateSquareMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareMember_result(err);
output.writeMessageBegin("updateSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareMember(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquareFeatureSet = function(seqid, input, output) {
var args = new SquareService_updateSquareFeatureSet_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquareFeatureSet.length === 1) {
Q.fcall(this._handler.updateSquareFeatureSet, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquareFeatureSet_result({success: result});
output.writeMessageBegin("updateSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquareFeatureSet_result(err);
output.writeMessageBegin("updateSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareFeatureSet", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquareFeatureSet(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquareFeatureSet_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquareFeatureSet", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareFeatureSet = function(seqid, input, output) {
var args = new SquareService_getSquareFeatureSet_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareFeatureSet.length === 1) {
Q.fcall(this._handler.getSquareFeatureSet, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareFeatureSet_result({success: result});
output.writeMessageBegin("getSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareFeatureSet_result(err);
output.writeMessageBegin("getSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareFeatureSet", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareFeatureSet(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareFeatureSet_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareFeatureSet", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareFeatureSet", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_searchSquares = function(seqid, input, output) {
var args = new SquareService_searchSquares_args();
args.read(input);
input.readMessageEnd();
if (this._handler.searchSquares.length === 1) {
Q.fcall(this._handler.searchSquares, args.request)
.then(function(result) {
var result_obj = new SquareService_searchSquares_result({success: result});
output.writeMessageBegin("searchSquares", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_searchSquares_result(err);
output.writeMessageBegin("searchSquares", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchSquares", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.searchSquares(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_searchSquares_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("searchSquares", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchSquares", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_updateSquare = function(seqid, input, output) {
var args = new SquareService_updateSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateSquare.length === 1) {
Q.fcall(this._handler.updateSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_updateSquare_result({success: result});
output.writeMessageBegin("updateSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_updateSquare_result(err);
output.writeMessageBegin("updateSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_updateSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getCategories = function(seqid, input, output) {
var args = new SquareService_getCategories_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getCategories.length === 1) {
Q.fcall(this._handler.getCategories, args.request)
.then(function(result) {
var result_obj = new SquareService_getCategories_result({success: result});
output.writeMessageBegin("getCategories", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getCategories_result(err);
output.writeMessageBegin("getCategories", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCategories", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getCategories(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getCategories_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getCategories", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCategories", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_searchSquareMembers = function(seqid, input, output) {
var args = new SquareService_searchSquareMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.searchSquareMembers.length === 1) {
Q.fcall(this._handler.searchSquareMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_searchSquareMembers_result({success: result});
output.writeMessageBegin("searchSquareMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_searchSquareMembers_result(err);
output.writeMessageBegin("searchSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.searchSquareMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_searchSquareMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("searchSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_fetchSquareChatEvents = function(seqid, input, output) {
var args = new SquareService_fetchSquareChatEvents_args();
args.read(input);
input.readMessageEnd();
if (this._handler.fetchSquareChatEvents.length === 1) {
Q.fcall(this._handler.fetchSquareChatEvents, args.request)
.then(function(result) {
var result_obj = new SquareService_fetchSquareChatEvents_result({success: result});
output.writeMessageBegin("fetchSquareChatEvents", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_fetchSquareChatEvents_result(err);
output.writeMessageBegin("fetchSquareChatEvents", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("fetchSquareChatEvents", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.fetchSquareChatEvents(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_fetchSquareChatEvents_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("fetchSquareChatEvents", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("fetchSquareChatEvents", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_fetchMyEvents = function(seqid, input, output) {
var args = new SquareService_fetchMyEvents_args();
args.read(input);
input.readMessageEnd();
if (this._handler.fetchMyEvents.length === 1) {
Q.fcall(this._handler.fetchMyEvents, args.request)
.then(function(result) {
var result_obj = new SquareService_fetchMyEvents_result({success: result});
output.writeMessageBegin("fetchMyEvents", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_fetchMyEvents_result(err);
output.writeMessageBegin("fetchMyEvents", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("fetchMyEvents", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.fetchMyEvents(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_fetchMyEvents_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("fetchMyEvents", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("fetchMyEvents", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_markAsRead = function(seqid, input, output) {
var args = new SquareService_markAsRead_args();
args.read(input);
input.readMessageEnd();
if (this._handler.markAsRead.length === 1) {
Q.fcall(this._handler.markAsRead, args.request)
.then(function(result) {
var result_obj = new SquareService_markAsRead_result({success: result});
output.writeMessageBegin("markAsRead", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_markAsRead_result(err);
output.writeMessageBegin("markAsRead", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("markAsRead", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.markAsRead(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_markAsRead_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("markAsRead", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("markAsRead", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareAuthority = function(seqid, input, output) {
var args = new SquareService_getSquareAuthority_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareAuthority.length === 1) {
Q.fcall(this._handler.getSquareAuthority, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareAuthority_result({success: result});
output.writeMessageBegin("getSquareAuthority", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareAuthority_result(err);
output.writeMessageBegin("getSquareAuthority", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareAuthority", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareAuthority(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareAuthority_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareAuthority", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareAuthority", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_sendMessage = function(seqid, input, output) {
var args = new SquareService_sendMessage_args();
args.read(input);
input.readMessageEnd();
if (this._handler.sendMessage.length === 1) {
Q.fcall(this._handler.sendMessage, args.request)
.then(function(result) {
var result_obj = new SquareService_sendMessage_result({success: result});
output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_sendMessage_result(err);
output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.sendMessage(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_sendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_leaveSquare = function(seqid, input, output) {
var args = new SquareService_leaveSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.leaveSquare.length === 1) {
Q.fcall(this._handler.leaveSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_leaveSquare_result({success: result});
output.writeMessageBegin("leaveSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_leaveSquare_result(err);
output.writeMessageBegin("leaveSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("leaveSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.leaveSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_leaveSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("leaveSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("leaveSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_leaveSquareChat = function(seqid, input, output) {
var args = new SquareService_leaveSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.leaveSquareChat.length === 1) {
Q.fcall(this._handler.leaveSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_leaveSquareChat_result({success: result});
output.writeMessageBegin("leaveSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_leaveSquareChat_result(err);
output.writeMessageBegin("leaveSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("leaveSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.leaveSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_leaveSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("leaveSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("leaveSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_joinSquareChat = function(seqid, input, output) {
var args = new SquareService_joinSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.joinSquareChat.length === 1) {
Q.fcall(this._handler.joinSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_joinSquareChat_result({success: result});
output.writeMessageBegin("joinSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_joinSquareChat_result(err);
output.writeMessageBegin("joinSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("joinSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.joinSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_joinSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("joinSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("joinSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_joinSquare = function(seqid, input, output) {
var args = new SquareService_joinSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.joinSquare.length === 1) {
Q.fcall(this._handler.joinSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_joinSquare_result({success: result});
output.writeMessageBegin("joinSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_joinSquare_result(err);
output.writeMessageBegin("joinSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("joinSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.joinSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_joinSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("joinSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("joinSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_inviteToSquare = function(seqid, input, output) {
var args = new SquareService_inviteToSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.inviteToSquare.length === 1) {
Q.fcall(this._handler.inviteToSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_inviteToSquare_result({success: result});
output.writeMessageBegin("inviteToSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_inviteToSquare_result(err);
output.writeMessageBegin("inviteToSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteToSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.inviteToSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_inviteToSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("inviteToSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteToSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_inviteToSquareChat = function(seqid, input, output) {
var args = new SquareService_inviteToSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.inviteToSquareChat.length === 1) {
Q.fcall(this._handler.inviteToSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_inviteToSquareChat_result({success: result});
output.writeMessageBegin("inviteToSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_inviteToSquareChat_result(err);
output.writeMessageBegin("inviteToSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteToSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.inviteToSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_inviteToSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("inviteToSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteToSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareMember = function(seqid, input, output) {
var args = new SquareService_getSquareMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareMember.length === 1) {
Q.fcall(this._handler.getSquareMember, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareMember_result({success: result});
output.writeMessageBegin("getSquareMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareMember_result(err);
output.writeMessageBegin("getSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareMember(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareMembers = function(seqid, input, output) {
var args = new SquareService_getSquareMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareMembers.length === 1) {
Q.fcall(this._handler.getSquareMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareMembers_result({success: result});
output.writeMessageBegin("getSquareMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareMembers_result(err);
output.writeMessageBegin("getSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareMemberRelation = function(seqid, input, output) {
var args = new SquareService_getSquareMemberRelation_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareMemberRelation.length === 1) {
Q.fcall(this._handler.getSquareMemberRelation, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareMemberRelation_result({success: result});
output.writeMessageBegin("getSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareMemberRelation_result(err);
output.writeMessageBegin("getSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMemberRelation", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareMemberRelation(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareMemberRelation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareMemberRelation", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMemberRelation", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareMemberRelations = function(seqid, input, output) {
var args = new SquareService_getSquareMemberRelations_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareMemberRelations.length === 1) {
Q.fcall(this._handler.getSquareMemberRelations, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareMemberRelations_result({success: result});
output.writeMessageBegin("getSquareMemberRelations", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareMemberRelations_result(err);
output.writeMessageBegin("getSquareMemberRelations", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMemberRelations", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareMemberRelations(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareMemberRelations_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareMemberRelations", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareMemberRelations", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareChatMembers = function(seqid, input, output) {
var args = new SquareService_getSquareChatMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareChatMembers.length === 1) {
Q.fcall(this._handler.getSquareChatMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareChatMembers_result({success: result});
output.writeMessageBegin("getSquareChatMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareChatMembers_result(err);
output.writeMessageBegin("getSquareChatMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareChatMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareChatMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareChatMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareChatStatus = function(seqid, input, output) {
var args = new SquareService_getSquareChatStatus_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareChatStatus.length === 1) {
Q.fcall(this._handler.getSquareChatStatus, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareChatStatus_result({success: result});
output.writeMessageBegin("getSquareChatStatus", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareChatStatus_result(err);
output.writeMessageBegin("getSquareChatStatus", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareChatStatus(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareChatStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareChatStatus", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChatStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquareChat = function(seqid, input, output) {
var args = new SquareService_getSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquareChat.length === 1) {
Q.fcall(this._handler.getSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquareChat_result({success: result});
output.writeMessageBegin("getSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquareChat_result(err);
output.writeMessageBegin("getSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getSquare = function(seqid, input, output) {
var args = new SquareService_getSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSquare.length === 1) {
Q.fcall(this._handler.getSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_getSquare_result({success: result});
output.writeMessageBegin("getSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getSquare_result(err);
output.writeMessageBegin("getSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getJoinedSquares = function(seqid, input, output) {
var args = new SquareService_getJoinedSquares_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getJoinedSquares.length === 1) {
Q.fcall(this._handler.getJoinedSquares, args.request)
.then(function(result) {
var result_obj = new SquareService_getJoinedSquares_result({success: result});
output.writeMessageBegin("getJoinedSquares", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getJoinedSquares_result(err);
output.writeMessageBegin("getJoinedSquares", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedSquares", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getJoinedSquares(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getJoinedSquares_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getJoinedSquares", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedSquares", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getJoinedSquareChats = function(seqid, input, output) {
var args = new SquareService_getJoinedSquareChats_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getJoinedSquareChats.length === 1) {
Q.fcall(this._handler.getJoinedSquareChats, args.request)
.then(function(result) {
var result_obj = new SquareService_getJoinedSquareChats_result({success: result});
output.writeMessageBegin("getJoinedSquareChats", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getJoinedSquareChats_result(err);
output.writeMessageBegin("getJoinedSquareChats", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedSquareChats", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getJoinedSquareChats(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getJoinedSquareChats_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getJoinedSquareChats", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedSquareChats", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_approveSquareMembers = function(seqid, input, output) {
var args = new SquareService_approveSquareMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.approveSquareMembers.length === 1) {
Q.fcall(this._handler.approveSquareMembers, args.request)
.then(function(result) {
var result_obj = new SquareService_approveSquareMembers_result({success: result});
output.writeMessageBegin("approveSquareMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_approveSquareMembers_result(err);
output.writeMessageBegin("approveSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("approveSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.approveSquareMembers(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_approveSquareMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("approveSquareMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("approveSquareMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_createSquareChat = function(seqid, input, output) {
var args = new SquareService_createSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.createSquareChat.length === 1) {
Q.fcall(this._handler.createSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_createSquareChat_result({success: result});
output.writeMessageBegin("createSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_createSquareChat_result(err);
output.writeMessageBegin("createSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.createSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_createSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("createSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_createSquare = function(seqid, input, output) {
var args = new SquareService_createSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.createSquare.length === 1) {
Q.fcall(this._handler.createSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_createSquare_result({success: result});
output.writeMessageBegin("createSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_createSquare_result(err);
output.writeMessageBegin("createSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.createSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_createSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("createSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_deleteSquareChat = function(seqid, input, output) {
var args = new SquareService_deleteSquareChat_args();
args.read(input);
input.readMessageEnd();
if (this._handler.deleteSquareChat.length === 1) {
Q.fcall(this._handler.deleteSquareChat, args.request)
.then(function(result) {
var result_obj = new SquareService_deleteSquareChat_result({success: result});
output.writeMessageBegin("deleteSquareChat", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_deleteSquareChat_result(err);
output.writeMessageBegin("deleteSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.deleteSquareChat(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_deleteSquareChat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("deleteSquareChat", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquareChat", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_deleteSquare = function(seqid, input, output) {
var args = new SquareService_deleteSquare_args();
args.read(input);
input.readMessageEnd();
if (this._handler.deleteSquare.length === 1) {
Q.fcall(this._handler.deleteSquare, args.request)
.then(function(result) {
var result_obj = new SquareService_deleteSquare_result({success: result});
output.writeMessageBegin("deleteSquare", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_deleteSquare_result(err);
output.writeMessageBegin("deleteSquare", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.deleteSquare(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_deleteSquare_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("deleteSquare", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("deleteSquare", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_destroyMessage = function(seqid, input, output) {
var args = new SquareService_destroyMessage_args();
args.read(input);
input.readMessageEnd();
if (this._handler.destroyMessage.length === 1) {
Q.fcall(this._handler.destroyMessage, args.request)
.then(function(result) {
var result_obj = new SquareService_destroyMessage_result({success: result});
output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_destroyMessage_result(err);
output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("destroyMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.destroyMessage(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_destroyMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("destroyMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getJoinableSquareChats = function(seqid, input, output) {
var args = new SquareService_getJoinableSquareChats_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getJoinableSquareChats.length === 1) {
Q.fcall(this._handler.getJoinableSquareChats, args.request)
.then(function(result) {
var result_obj = new SquareService_getJoinableSquareChats_result({success: result});
output.writeMessageBegin("getJoinableSquareChats", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getJoinableSquareChats_result(err);
output.writeMessageBegin("getJoinableSquareChats", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinableSquareChats", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getJoinableSquareChats(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getJoinableSquareChats_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getJoinableSquareChats", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinableSquareChats", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_getInvitationTicketUrl = function(seqid, input, output) {
var args = new SquareService_getInvitationTicketUrl_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getInvitationTicketUrl.length === 1) {
Q.fcall(this._handler.getInvitationTicketUrl, args.request)
.then(function(result) {
var result_obj = new SquareService_getInvitationTicketUrl_result({success: result});
output.writeMessageBegin("getInvitationTicketUrl", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_getInvitationTicketUrl_result(err);
output.writeMessageBegin("getInvitationTicketUrl", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getInvitationTicketUrl", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getInvitationTicketUrl(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_getInvitationTicketUrl_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getInvitationTicketUrl", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getInvitationTicketUrl", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
SquareServiceProcessor.prototype.process_findSquareByInvitationTicket = function(seqid, input, output) {
var args = new SquareService_findSquareByInvitationTicket_args();
args.read(input);
input.readMessageEnd();
if (this._handler.findSquareByInvitationTicket.length === 1) {
Q.fcall(this._handler.findSquareByInvitationTicket, args.request)
.then(function(result) {
var result_obj = new SquareService_findSquareByInvitationTicket_result({success: result});
output.writeMessageBegin("findSquareByInvitationTicket", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.SquareException) {
result = new SquareService_findSquareByInvitationTicket_result(err);
output.writeMessageBegin("findSquareByInvitationTicket", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("findSquareByInvitationTicket", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.findSquareByInvitationTicket(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.SquareException) {
result_obj = new SquareService_findSquareByInvitationTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("findSquareByInvitationTicket", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("findSquareByInvitationTicket", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};