com.rbkmoney.damsel.fraudbusters.PaymentServiceSrv Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fraudbusters-proto Show documentation
Show all versions of fraudbusters-proto Show documentation
Generates jar artifact containing compiled thrift classes based on generated thrift IDL files
/**
* Autogenerated by Thrift Compiler (1.0.0-dev)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.rbkmoney.damsel.fraudbusters;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2021-08-02")
public class PaymentServiceSrv {
/**
* Интерфейс для управления FraudoPayment
*/
public interface Iface {
/**
* Проверяет компиляцию шаблонов на актуальной версии языка
*
*
* @param templates
*/
public ValidateTemplateResponse validateCompilationTemplate(List templates) throws org.apache.thrift.TException;
public void insertFraudPayments(List payments) throws org.apache.thrift.TException;
public void insertPayments(List payments) throws InsertionException, org.apache.thrift.TException;
public void insertWithdrawals(List payments) throws InsertionException, org.apache.thrift.TException;
public void insertRefunds(List refunds) throws InsertionException, org.apache.thrift.TException;
public void insertChargebacks(List chargebacks) throws InsertionException, org.apache.thrift.TException;
}
public interface AsyncIface {
public void validateCompilationTemplate(List templates, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void insertFraudPayments(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void insertPayments(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void insertWithdrawals(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void insertRefunds(List refunds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void insertChargebacks(List chargebacks, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public ValidateTemplateResponse validateCompilationTemplate(List templates) throws org.apache.thrift.TException
{
sendValidateCompilationTemplate(templates);
return recvValidateCompilationTemplate();
}
public void sendValidateCompilationTemplate(List templates) throws org.apache.thrift.TException
{
validateCompilationTemplate_args args = new validateCompilationTemplate_args();
args.setTemplates(templates);
sendBase("validateCompilationTemplate", args);
}
public ValidateTemplateResponse recvValidateCompilationTemplate() throws org.apache.thrift.TException
{
validateCompilationTemplate_result result = new validateCompilationTemplate_result();
receiveBase(result, "validateCompilationTemplate");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateCompilationTemplate failed: unknown result");
}
public void insertFraudPayments(List payments) throws org.apache.thrift.TException
{
sendInsertFraudPayments(payments);
recvInsertFraudPayments();
}
public void sendInsertFraudPayments(List payments) throws org.apache.thrift.TException
{
insertFraudPayments_args args = new insertFraudPayments_args();
args.setPayments(payments);
sendBase("insertFraudPayments", args);
}
public void recvInsertFraudPayments() throws org.apache.thrift.TException
{
insertFraudPayments_result result = new insertFraudPayments_result();
receiveBase(result, "insertFraudPayments");
return;
}
public void insertPayments(List payments) throws InsertionException, org.apache.thrift.TException
{
sendInsertPayments(payments);
recvInsertPayments();
}
public void sendInsertPayments(List payments) throws org.apache.thrift.TException
{
insertPayments_args args = new insertPayments_args();
args.setPayments(payments);
sendBase("insertPayments", args);
}
public void recvInsertPayments() throws InsertionException, org.apache.thrift.TException
{
insertPayments_result result = new insertPayments_result();
receiveBase(result, "insertPayments");
if (result.ex1 != null) {
throw result.ex1;
}
return;
}
public void insertWithdrawals(List payments) throws InsertionException, org.apache.thrift.TException
{
sendInsertWithdrawals(payments);
recvInsertWithdrawals();
}
public void sendInsertWithdrawals(List payments) throws org.apache.thrift.TException
{
insertWithdrawals_args args = new insertWithdrawals_args();
args.setPayments(payments);
sendBase("insertWithdrawals", args);
}
public void recvInsertWithdrawals() throws InsertionException, org.apache.thrift.TException
{
insertWithdrawals_result result = new insertWithdrawals_result();
receiveBase(result, "insertWithdrawals");
if (result.ex1 != null) {
throw result.ex1;
}
return;
}
public void insertRefunds(List refunds) throws InsertionException, org.apache.thrift.TException
{
sendInsertRefunds(refunds);
recvInsertRefunds();
}
public void sendInsertRefunds(List refunds) throws org.apache.thrift.TException
{
insertRefunds_args args = new insertRefunds_args();
args.setRefunds(refunds);
sendBase("insertRefunds", args);
}
public void recvInsertRefunds() throws InsertionException, org.apache.thrift.TException
{
insertRefunds_result result = new insertRefunds_result();
receiveBase(result, "insertRefunds");
if (result.ex1 != null) {
throw result.ex1;
}
return;
}
public void insertChargebacks(List chargebacks) throws InsertionException, org.apache.thrift.TException
{
sendInsertChargebacks(chargebacks);
recvInsertChargebacks();
}
public void sendInsertChargebacks(List chargebacks) throws org.apache.thrift.TException
{
insertChargebacks_args args = new insertChargebacks_args();
args.setChargebacks(chargebacks);
sendBase("insertChargebacks", args);
}
public void recvInsertChargebacks() throws InsertionException, org.apache.thrift.TException
{
insertChargebacks_result result = new insertChargebacks_result();
receiveBase(result, "insertChargebacks");
if (result.ex1 != null) {
throw result.ex1;
}
return;
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void validateCompilationTemplate(List templates, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
validateCompilationTemplate_call method_call = new validateCompilationTemplate_call(templates, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class validateCompilationTemplate_call extends org.apache.thrift.async.TAsyncMethodCall {
private List templates;
public validateCompilationTemplate_call(List templates, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.templates = templates;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateCompilationTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0));
validateCompilationTemplate_args args = new validateCompilationTemplate_args();
args.setTemplates(templates);
args.write(prot);
prot.writeMessageEnd();
}
public ValidateTemplateResponse getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recvValidateCompilationTemplate();
}
}
public void insertFraudPayments(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
insertFraudPayments_call method_call = new insertFraudPayments_call(payments, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class insertFraudPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
private List payments;
public insertFraudPayments_call(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.payments = payments;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertFraudPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
insertFraudPayments_args args = new insertFraudPayments_args();
args.setPayments(payments);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
public void insertPayments(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
insertPayments_call method_call = new insertPayments_call(payments, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class insertPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
private List payments;
public insertPayments_call(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.payments = payments;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
insertPayments_args args = new insertPayments_args();
args.setPayments(payments);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws InsertionException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
public void insertWithdrawals(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
insertWithdrawals_call method_call = new insertWithdrawals_call(payments, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class insertWithdrawals_call extends org.apache.thrift.async.TAsyncMethodCall {
private List payments;
public insertWithdrawals_call(List payments, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.payments = payments;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertWithdrawals", org.apache.thrift.protocol.TMessageType.CALL, 0));
insertWithdrawals_args args = new insertWithdrawals_args();
args.setPayments(payments);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws InsertionException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
public void insertRefunds(List refunds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
insertRefunds_call method_call = new insertRefunds_call(refunds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class insertRefunds_call extends org.apache.thrift.async.TAsyncMethodCall {
private List refunds;
public insertRefunds_call(List refunds, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.refunds = refunds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRefunds", org.apache.thrift.protocol.TMessageType.CALL, 0));
insertRefunds_args args = new insertRefunds_args();
args.setRefunds(refunds);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws InsertionException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
public void insertChargebacks(List chargebacks, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
insertChargebacks_call method_call = new insertChargebacks_call(chargebacks, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class insertChargebacks_call extends org.apache.thrift.async.TAsyncMethodCall {
private List chargebacks;
public insertChargebacks_call(List chargebacks, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.chargebacks = chargebacks;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertChargebacks", org.apache.thrift.protocol.TMessageType.CALL, 0));
insertChargebacks_args args = new insertChargebacks_args();
args.setChargebacks(chargebacks);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws InsertionException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
}
public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("validateCompilationTemplate", new validateCompilationTemplate());
processMap.put("insertFraudPayments", new insertFraudPayments());
processMap.put("insertPayments", new insertPayments());
processMap.put("insertWithdrawals", new insertWithdrawals());
processMap.put("insertRefunds", new insertRefunds());
processMap.put("insertChargebacks", new insertChargebacks());
return processMap;
}
public static class validateCompilationTemplate extends org.apache.thrift.ProcessFunction {
public validateCompilationTemplate() {
super("validateCompilationTemplate");
}
public validateCompilationTemplate_args getEmptyArgsInstance() {
return new validateCompilationTemplate_args();
}
protected boolean isOneway() {
return false;
}
public validateCompilationTemplate_result getResult(I iface, validateCompilationTemplate_args args) throws org.apache.thrift.TException {
validateCompilationTemplate_result result = new validateCompilationTemplate_result();
result.success = iface.validateCompilationTemplate(args.templates);
return result;
}
}
public static class insertFraudPayments extends org.apache.thrift.ProcessFunction {
public insertFraudPayments() {
super("insertFraudPayments");
}
public insertFraudPayments_args getEmptyArgsInstance() {
return new insertFraudPayments_args();
}
protected boolean isOneway() {
return false;
}
public insertFraudPayments_result getResult(I iface, insertFraudPayments_args args) throws org.apache.thrift.TException {
insertFraudPayments_result result = new insertFraudPayments_result();
iface.insertFraudPayments(args.payments);
return result;
}
}
public static class insertPayments extends org.apache.thrift.ProcessFunction {
public insertPayments() {
super("insertPayments");
}
public insertPayments_args getEmptyArgsInstance() {
return new insertPayments_args();
}
protected boolean isOneway() {
return false;
}
public insertPayments_result getResult(I iface, insertPayments_args args) throws org.apache.thrift.TException {
insertPayments_result result = new insertPayments_result();
try {
iface.insertPayments(args.payments);
} catch (InsertionException ex1) {
result.ex1 = ex1;
}
return result;
}
}
public static class insertWithdrawals extends org.apache.thrift.ProcessFunction {
public insertWithdrawals() {
super("insertWithdrawals");
}
public insertWithdrawals_args getEmptyArgsInstance() {
return new insertWithdrawals_args();
}
protected boolean isOneway() {
return false;
}
public insertWithdrawals_result getResult(I iface, insertWithdrawals_args args) throws org.apache.thrift.TException {
insertWithdrawals_result result = new insertWithdrawals_result();
try {
iface.insertWithdrawals(args.payments);
} catch (InsertionException ex1) {
result.ex1 = ex1;
}
return result;
}
}
public static class insertRefunds extends org.apache.thrift.ProcessFunction {
public insertRefunds() {
super("insertRefunds");
}
public insertRefunds_args getEmptyArgsInstance() {
return new insertRefunds_args();
}
protected boolean isOneway() {
return false;
}
public insertRefunds_result getResult(I iface, insertRefunds_args args) throws org.apache.thrift.TException {
insertRefunds_result result = new insertRefunds_result();
try {
iface.insertRefunds(args.refunds);
} catch (InsertionException ex1) {
result.ex1 = ex1;
}
return result;
}
}
public static class insertChargebacks extends org.apache.thrift.ProcessFunction {
public insertChargebacks() {
super("insertChargebacks");
}
public insertChargebacks_args getEmptyArgsInstance() {
return new insertChargebacks_args();
}
protected boolean isOneway() {
return false;
}
public insertChargebacks_result getResult(I iface, insertChargebacks_args args) throws org.apache.thrift.TException {
insertChargebacks_result result = new insertChargebacks_result();
try {
iface.insertChargebacks(args.chargebacks);
} catch (InsertionException ex1) {
result.ex1 = ex1;
}
return result;
}
}
}
public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected AsyncProcessor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("validateCompilationTemplate", new validateCompilationTemplate());
processMap.put("insertFraudPayments", new insertFraudPayments());
processMap.put("insertPayments", new insertPayments());
processMap.put("insertWithdrawals", new insertWithdrawals());
processMap.put("insertRefunds", new insertRefunds());
processMap.put("insertChargebacks", new insertChargebacks());
return processMap;
}
public static class validateCompilationTemplate extends org.apache.thrift.AsyncProcessFunction {
public validateCompilationTemplate() {
super("validateCompilationTemplate");
}
public validateCompilationTemplate_args getEmptyArgsInstance() {
return new validateCompilationTemplate_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(com.rbkmoney.damsel.fraudbusters.ValidateTemplateResponse o) {
validateCompilationTemplate_result result = new validateCompilationTemplate_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
validateCompilationTemplate_result result = new validateCompilationTemplate_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, validateCompilationTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.validateCompilationTemplate(args.templates,resultHandler);
}
}
public static class insertFraudPayments extends org.apache.thrift.AsyncProcessFunction {
public insertFraudPayments() {
super("insertFraudPayments");
}
public insertFraudPayments_args getEmptyArgsInstance() {
return new insertFraudPayments_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
insertFraudPayments_result result = new insertFraudPayments_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
insertFraudPayments_result result = new insertFraudPayments_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, insertFraudPayments_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.insertFraudPayments(args.payments,resultHandler);
}
}
public static class insertPayments extends org.apache.thrift.AsyncProcessFunction {
public insertPayments() {
super("insertPayments");
}
public insertPayments_args getEmptyArgsInstance() {
return new insertPayments_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
insertPayments_result result = new insertPayments_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
insertPayments_result result = new insertPayments_result();
if (e instanceof InsertionException) {
result.ex1 = (InsertionException) e;
result.setEx1IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, insertPayments_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.insertPayments(args.payments,resultHandler);
}
}
public static class insertWithdrawals extends org.apache.thrift.AsyncProcessFunction {
public insertWithdrawals() {
super("insertWithdrawals");
}
public insertWithdrawals_args getEmptyArgsInstance() {
return new insertWithdrawals_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
insertWithdrawals_result result = new insertWithdrawals_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
insertWithdrawals_result result = new insertWithdrawals_result();
if (e instanceof InsertionException) {
result.ex1 = (InsertionException) e;
result.setEx1IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, insertWithdrawals_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.insertWithdrawals(args.payments,resultHandler);
}
}
public static class insertRefunds extends org.apache.thrift.AsyncProcessFunction {
public insertRefunds() {
super("insertRefunds");
}
public insertRefunds_args getEmptyArgsInstance() {
return new insertRefunds_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
insertRefunds_result result = new insertRefunds_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
insertRefunds_result result = new insertRefunds_result();
if (e instanceof InsertionException) {
result.ex1 = (InsertionException) e;
result.setEx1IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, insertRefunds_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.insertRefunds(args.refunds,resultHandler);
}
}
public static class insertChargebacks extends org.apache.thrift.AsyncProcessFunction {
public insertChargebacks() {
super("insertChargebacks");
}
public insertChargebacks_args getEmptyArgsInstance() {
return new insertChargebacks_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
insertChargebacks_result result = new insertChargebacks_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
insertChargebacks_result result = new insertChargebacks_result();
if (e instanceof InsertionException) {
result.ex1 = (InsertionException) e;
result.setEx1IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, insertChargebacks_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.insertChargebacks(args.chargebacks,resultHandler);
}
}
}
public static class validateCompilationTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCompilationTemplate_args");
private static final org.apache.thrift.protocol.TField TEMPLATES_FIELD_DESC = new org.apache.thrift.protocol.TField("templates", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new validateCompilationTemplate_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new validateCompilationTemplate_argsTupleSchemeFactory();
public List templates; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TEMPLATES((short)1, "templates");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TEMPLATES
return TEMPLATES;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TEMPLATES, new org.apache.thrift.meta_data.FieldMetaData("templates", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Template.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCompilationTemplate_args.class, metaDataMap);
}
public validateCompilationTemplate_args() {
}
public validateCompilationTemplate_args(
List templates)
{
this();
this.templates = templates;
}
/**
* Performs a deep copy on other.
*/
public validateCompilationTemplate_args(validateCompilationTemplate_args other) {
if (other.isSetTemplates()) {
List __this__templates = new ArrayList(other.templates.size());
for (Template other_element : other.templates) {
__this__templates.add(new Template(other_element));
}
this.templates = __this__templates;
}
}
public validateCompilationTemplate_args deepCopy() {
return new validateCompilationTemplate_args(this);
}
@Override
public void clear() {
this.templates = null;
}
public int getTemplatesSize() {
return (this.templates == null) ? 0 : this.templates.size();
}
public java.util.Iterator getTemplatesIterator() {
return (this.templates == null) ? null : this.templates.iterator();
}
public void addToTemplates(Template elem) {
if (this.templates == null) {
this.templates = new ArrayList();
}
this.templates.add(elem);
}
public List getTemplates() {
return this.templates;
}
public validateCompilationTemplate_args setTemplates(List templates) {
this.templates = templates;
return this;
}
public void unsetTemplates() {
this.templates = null;
}
/** Returns true if field templates is set (has been assigned a value) and false otherwise */
public boolean isSetTemplates() {
return this.templates != null;
}
public void setTemplatesIsSet(boolean value) {
if (!value) {
this.templates = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TEMPLATES:
if (value == null) {
unsetTemplates();
} else {
setTemplates((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TEMPLATES:
return getTemplates();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TEMPLATES:
return isSetTemplates();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof validateCompilationTemplate_args)
return this.equals((validateCompilationTemplate_args)that);
return false;
}
public boolean equals(validateCompilationTemplate_args that) {
if (that == null)
return false;
boolean this_present_templates = true && this.isSetTemplates();
boolean that_present_templates = true && that.isSetTemplates();
if (this_present_templates || that_present_templates) {
if (!(this_present_templates && that_present_templates))
return false;
if (!this.templates.equals(that.templates))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTemplates()) ? 131071 : 524287);
if (isSetTemplates())
hashCode = hashCode * 8191 + templates.hashCode();
return hashCode;
}
@Override
public int compareTo(validateCompilationTemplate_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTemplates()).compareTo(other.isSetTemplates());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTemplates()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templates, other.templates);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("validateCompilationTemplate_args(");
boolean first = true;
sb.append("templates:");
if (this.templates == null) {
sb.append("null");
} else {
sb.append(this.templates);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateCompilationTemplate_argsStandardSchemeFactory implements SchemeFactory {
public validateCompilationTemplate_argsStandardScheme getScheme() {
return new validateCompilationTemplate_argsStandardScheme();
}
}
private static class validateCompilationTemplate_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateCompilationTemplate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TEMPLATES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
struct.templates = new ArrayList(_list88.size);
Template _elem89;
for (int _i90 = 0; _i90 < _list88.size; ++_i90)
{
_elem89 = new Template();
_elem89.read(iprot);
struct.templates.add(_elem89);
}
iprot.readListEnd();
}
struct.setTemplatesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, validateCompilationTemplate_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.templates != null) {
oprot.writeFieldBegin(TEMPLATES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.templates.size()));
for (Template _iter91 : struct.templates)
{
_iter91.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateCompilationTemplate_argsTupleSchemeFactory implements SchemeFactory {
public validateCompilationTemplate_argsTupleScheme getScheme() {
return new validateCompilationTemplate_argsTupleScheme();
}
}
private static class validateCompilationTemplate_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateCompilationTemplate_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTemplates()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTemplates()) {
{
oprot.writeI32(struct.templates.size());
for (Template _iter92 : struct.templates)
{
_iter92.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateCompilationTemplate_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.templates = new ArrayList(_list93.size);
Template _elem94;
for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
_elem94 = new Template();
_elem94.read(iprot);
struct.templates.add(_elem94);
}
}
struct.setTemplatesIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class validateCompilationTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCompilationTemplate_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new validateCompilationTemplate_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new validateCompilationTemplate_resultTupleSchemeFactory();
public ValidateTemplateResponse success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ValidateTemplateResponse.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCompilationTemplate_result.class, metaDataMap);
}
public validateCompilationTemplate_result() {
}
public validateCompilationTemplate_result(
ValidateTemplateResponse success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on other.
*/
public validateCompilationTemplate_result(validateCompilationTemplate_result other) {
if (other.isSetSuccess()) {
this.success = new ValidateTemplateResponse(other.success);
}
}
public validateCompilationTemplate_result deepCopy() {
return new validateCompilationTemplate_result(this);
}
@Override
public void clear() {
this.success = null;
}
public ValidateTemplateResponse getSuccess() {
return this.success;
}
public validateCompilationTemplate_result setSuccess(ValidateTemplateResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ValidateTemplateResponse)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof validateCompilationTemplate_result)
return this.equals((validateCompilationTemplate_result)that);
return false;
}
public boolean equals(validateCompilationTemplate_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(validateCompilationTemplate_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("validateCompilationTemplate_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateCompilationTemplate_resultStandardSchemeFactory implements SchemeFactory {
public validateCompilationTemplate_resultStandardScheme getScheme() {
return new validateCompilationTemplate_resultStandardScheme();
}
}
private static class validateCompilationTemplate_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateCompilationTemplate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new ValidateTemplateResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, validateCompilationTemplate_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateCompilationTemplate_resultTupleSchemeFactory implements SchemeFactory {
public validateCompilationTemplate_resultTupleScheme getScheme() {
return new validateCompilationTemplate_resultTupleScheme();
}
}
private static class validateCompilationTemplate_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateCompilationTemplate_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateCompilationTemplate_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new ValidateTemplateResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertFraudPayments_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertFraudPayments_args");
private static final org.apache.thrift.protocol.TField PAYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("payments", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertFraudPayments_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertFraudPayments_argsTupleSchemeFactory();
public List payments; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PAYMENTS((short)1, "payments");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PAYMENTS
return PAYMENTS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PAYMENTS, new org.apache.thrift.meta_data.FieldMetaData("payments", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FraudPayment.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertFraudPayments_args.class, metaDataMap);
}
public insertFraudPayments_args() {
}
public insertFraudPayments_args(
List payments)
{
this();
this.payments = payments;
}
/**
* Performs a deep copy on other.
*/
public insertFraudPayments_args(insertFraudPayments_args other) {
if (other.isSetPayments()) {
List __this__payments = new ArrayList(other.payments.size());
for (FraudPayment other_element : other.payments) {
__this__payments.add(new FraudPayment(other_element));
}
this.payments = __this__payments;
}
}
public insertFraudPayments_args deepCopy() {
return new insertFraudPayments_args(this);
}
@Override
public void clear() {
this.payments = null;
}
public int getPaymentsSize() {
return (this.payments == null) ? 0 : this.payments.size();
}
public java.util.Iterator getPaymentsIterator() {
return (this.payments == null) ? null : this.payments.iterator();
}
public void addToPayments(FraudPayment elem) {
if (this.payments == null) {
this.payments = new ArrayList();
}
this.payments.add(elem);
}
public List getPayments() {
return this.payments;
}
public insertFraudPayments_args setPayments(List payments) {
this.payments = payments;
return this;
}
public void unsetPayments() {
this.payments = null;
}
/** Returns true if field payments is set (has been assigned a value) and false otherwise */
public boolean isSetPayments() {
return this.payments != null;
}
public void setPaymentsIsSet(boolean value) {
if (!value) {
this.payments = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PAYMENTS:
if (value == null) {
unsetPayments();
} else {
setPayments((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PAYMENTS:
return getPayments();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PAYMENTS:
return isSetPayments();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertFraudPayments_args)
return this.equals((insertFraudPayments_args)that);
return false;
}
public boolean equals(insertFraudPayments_args that) {
if (that == null)
return false;
boolean this_present_payments = true && this.isSetPayments();
boolean that_present_payments = true && that.isSetPayments();
if (this_present_payments || that_present_payments) {
if (!(this_present_payments && that_present_payments))
return false;
if (!this.payments.equals(that.payments))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetPayments()) ? 131071 : 524287);
if (isSetPayments())
hashCode = hashCode * 8191 + payments.hashCode();
return hashCode;
}
@Override
public int compareTo(insertFraudPayments_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPayments()).compareTo(other.isSetPayments());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPayments()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payments, other.payments);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertFraudPayments_args(");
boolean first = true;
sb.append("payments:");
if (this.payments == null) {
sb.append("null");
} else {
sb.append(this.payments);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertFraudPayments_argsStandardSchemeFactory implements SchemeFactory {
public insertFraudPayments_argsStandardScheme getScheme() {
return new insertFraudPayments_argsStandardScheme();
}
}
private static class insertFraudPayments_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertFraudPayments_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PAYMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
struct.payments = new ArrayList(_list96.size);
FraudPayment _elem97;
for (int _i98 = 0; _i98 < _list96.size; ++_i98)
{
_elem97 = new FraudPayment();
_elem97.read(iprot);
struct.payments.add(_elem97);
}
iprot.readListEnd();
}
struct.setPaymentsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertFraudPayments_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.payments != null) {
oprot.writeFieldBegin(PAYMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.payments.size()));
for (FraudPayment _iter99 : struct.payments)
{
_iter99.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertFraudPayments_argsTupleSchemeFactory implements SchemeFactory {
public insertFraudPayments_argsTupleScheme getScheme() {
return new insertFraudPayments_argsTupleScheme();
}
}
private static class insertFraudPayments_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertFraudPayments_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPayments()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetPayments()) {
{
oprot.writeI32(struct.payments.size());
for (FraudPayment _iter100 : struct.payments)
{
_iter100.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertFraudPayments_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.payments = new ArrayList(_list101.size);
FraudPayment _elem102;
for (int _i103 = 0; _i103 < _list101.size; ++_i103)
{
_elem102 = new FraudPayment();
_elem102.read(iprot);
struct.payments.add(_elem102);
}
}
struct.setPaymentsIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertFraudPayments_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertFraudPayments_result");
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertFraudPayments_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertFraudPayments_resultTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertFraudPayments_result.class, metaDataMap);
}
public insertFraudPayments_result() {
}
/**
* Performs a deep copy on other.
*/
public insertFraudPayments_result(insertFraudPayments_result other) {
}
public insertFraudPayments_result deepCopy() {
return new insertFraudPayments_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertFraudPayments_result)
return this.equals((insertFraudPayments_result)that);
return false;
}
public boolean equals(insertFraudPayments_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(insertFraudPayments_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertFraudPayments_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertFraudPayments_resultStandardSchemeFactory implements SchemeFactory {
public insertFraudPayments_resultStandardScheme getScheme() {
return new insertFraudPayments_resultStandardScheme();
}
}
private static class insertFraudPayments_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertFraudPayments_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertFraudPayments_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertFraudPayments_resultTupleSchemeFactory implements SchemeFactory {
public insertFraudPayments_resultTupleScheme getScheme() {
return new insertFraudPayments_resultTupleScheme();
}
}
private static class insertFraudPayments_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertFraudPayments_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertFraudPayments_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertPayments_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertPayments_args");
private static final org.apache.thrift.protocol.TField PAYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("payments", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertPayments_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertPayments_argsTupleSchemeFactory();
public List payments; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PAYMENTS((short)1, "payments");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PAYMENTS
return PAYMENTS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PAYMENTS, new org.apache.thrift.meta_data.FieldMetaData("payments", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertPayments_args.class, metaDataMap);
}
public insertPayments_args() {
}
public insertPayments_args(
List payments)
{
this();
this.payments = payments;
}
/**
* Performs a deep copy on other.
*/
public insertPayments_args(insertPayments_args other) {
if (other.isSetPayments()) {
List __this__payments = new ArrayList(other.payments.size());
for (Payment other_element : other.payments) {
__this__payments.add(new Payment(other_element));
}
this.payments = __this__payments;
}
}
public insertPayments_args deepCopy() {
return new insertPayments_args(this);
}
@Override
public void clear() {
this.payments = null;
}
public int getPaymentsSize() {
return (this.payments == null) ? 0 : this.payments.size();
}
public java.util.Iterator getPaymentsIterator() {
return (this.payments == null) ? null : this.payments.iterator();
}
public void addToPayments(Payment elem) {
if (this.payments == null) {
this.payments = new ArrayList();
}
this.payments.add(elem);
}
public List getPayments() {
return this.payments;
}
public insertPayments_args setPayments(List payments) {
this.payments = payments;
return this;
}
public void unsetPayments() {
this.payments = null;
}
/** Returns true if field payments is set (has been assigned a value) and false otherwise */
public boolean isSetPayments() {
return this.payments != null;
}
public void setPaymentsIsSet(boolean value) {
if (!value) {
this.payments = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PAYMENTS:
if (value == null) {
unsetPayments();
} else {
setPayments((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PAYMENTS:
return getPayments();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PAYMENTS:
return isSetPayments();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertPayments_args)
return this.equals((insertPayments_args)that);
return false;
}
public boolean equals(insertPayments_args that) {
if (that == null)
return false;
boolean this_present_payments = true && this.isSetPayments();
boolean that_present_payments = true && that.isSetPayments();
if (this_present_payments || that_present_payments) {
if (!(this_present_payments && that_present_payments))
return false;
if (!this.payments.equals(that.payments))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetPayments()) ? 131071 : 524287);
if (isSetPayments())
hashCode = hashCode * 8191 + payments.hashCode();
return hashCode;
}
@Override
public int compareTo(insertPayments_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPayments()).compareTo(other.isSetPayments());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPayments()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payments, other.payments);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertPayments_args(");
boolean first = true;
sb.append("payments:");
if (this.payments == null) {
sb.append("null");
} else {
sb.append(this.payments);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertPayments_argsStandardSchemeFactory implements SchemeFactory {
public insertPayments_argsStandardScheme getScheme() {
return new insertPayments_argsStandardScheme();
}
}
private static class insertPayments_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertPayments_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PAYMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
struct.payments = new ArrayList(_list104.size);
Payment _elem105;
for (int _i106 = 0; _i106 < _list104.size; ++_i106)
{
_elem105 = new Payment();
_elem105.read(iprot);
struct.payments.add(_elem105);
}
iprot.readListEnd();
}
struct.setPaymentsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertPayments_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.payments != null) {
oprot.writeFieldBegin(PAYMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.payments.size()));
for (Payment _iter107 : struct.payments)
{
_iter107.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertPayments_argsTupleSchemeFactory implements SchemeFactory {
public insertPayments_argsTupleScheme getScheme() {
return new insertPayments_argsTupleScheme();
}
}
private static class insertPayments_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertPayments_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPayments()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetPayments()) {
{
oprot.writeI32(struct.payments.size());
for (Payment _iter108 : struct.payments)
{
_iter108.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertPayments_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.payments = new ArrayList(_list109.size);
Payment _elem110;
for (int _i111 = 0; _i111 < _list109.size; ++_i111)
{
_elem110 = new Payment();
_elem110.read(iprot);
struct.payments.add(_elem110);
}
}
struct.setPaymentsIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertPayments_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertPayments_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertPayments_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertPayments_resultTupleSchemeFactory();
public InsertionException ex1; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EX1((short)1, "ex1");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EX1
return EX1;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertionException.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertPayments_result.class, metaDataMap);
}
public insertPayments_result() {
}
public insertPayments_result(
InsertionException ex1)
{
this();
this.ex1 = ex1;
}
/**
* Performs a deep copy on other.
*/
public insertPayments_result(insertPayments_result other) {
if (other.isSetEx1()) {
this.ex1 = new InsertionException(other.ex1);
}
}
public insertPayments_result deepCopy() {
return new insertPayments_result(this);
}
@Override
public void clear() {
this.ex1 = null;
}
public InsertionException getEx1() {
return this.ex1;
}
public insertPayments_result setEx1(InsertionException ex1) {
this.ex1 = ex1;
return this;
}
public void unsetEx1() {
this.ex1 = null;
}
/** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
public boolean isSetEx1() {
return this.ex1 != null;
}
public void setEx1IsSet(boolean value) {
if (!value) {
this.ex1 = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EX1:
if (value == null) {
unsetEx1();
} else {
setEx1((InsertionException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertPayments_result)
return this.equals((insertPayments_result)that);
return false;
}
public boolean equals(insertPayments_result that) {
if (that == null)
return false;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
if (this_present_ex1 || that_present_ex1) {
if (!(this_present_ex1 && that_present_ex1))
return false;
if (!this.ex1.equals(that.ex1))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
if (isSetEx1())
hashCode = hashCode * 8191 + ex1.hashCode();
return hashCode;
}
@Override
public int compareTo(insertPayments_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEx1()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertPayments_result(");
boolean first = true;
sb.append("ex1:");
if (this.ex1 == null) {
sb.append("null");
} else {
sb.append(this.ex1);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertPayments_resultStandardSchemeFactory implements SchemeFactory {
public insertPayments_resultStandardScheme getScheme() {
return new insertPayments_resultStandardScheme();
}
}
private static class insertPayments_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertPayments_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EX1
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertPayments_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ex1 != null) {
oprot.writeFieldBegin(EX1_FIELD_DESC);
struct.ex1.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertPayments_resultTupleSchemeFactory implements SchemeFactory {
public insertPayments_resultTupleScheme getScheme() {
return new insertPayments_resultTupleScheme();
}
}
private static class insertPayments_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertPayments_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEx1()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEx1()) {
struct.ex1.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertPayments_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertWithdrawals_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertWithdrawals_args");
private static final org.apache.thrift.protocol.TField PAYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("payments", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertWithdrawals_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertWithdrawals_argsTupleSchemeFactory();
public List payments; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PAYMENTS((short)1, "payments");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PAYMENTS
return PAYMENTS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PAYMENTS, new org.apache.thrift.meta_data.FieldMetaData("payments", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Withdrawal.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertWithdrawals_args.class, metaDataMap);
}
public insertWithdrawals_args() {
}
public insertWithdrawals_args(
List payments)
{
this();
this.payments = payments;
}
/**
* Performs a deep copy on other.
*/
public insertWithdrawals_args(insertWithdrawals_args other) {
if (other.isSetPayments()) {
List __this__payments = new ArrayList(other.payments.size());
for (Withdrawal other_element : other.payments) {
__this__payments.add(new Withdrawal(other_element));
}
this.payments = __this__payments;
}
}
public insertWithdrawals_args deepCopy() {
return new insertWithdrawals_args(this);
}
@Override
public void clear() {
this.payments = null;
}
public int getPaymentsSize() {
return (this.payments == null) ? 0 : this.payments.size();
}
public java.util.Iterator getPaymentsIterator() {
return (this.payments == null) ? null : this.payments.iterator();
}
public void addToPayments(Withdrawal elem) {
if (this.payments == null) {
this.payments = new ArrayList();
}
this.payments.add(elem);
}
public List getPayments() {
return this.payments;
}
public insertWithdrawals_args setPayments(List payments) {
this.payments = payments;
return this;
}
public void unsetPayments() {
this.payments = null;
}
/** Returns true if field payments is set (has been assigned a value) and false otherwise */
public boolean isSetPayments() {
return this.payments != null;
}
public void setPaymentsIsSet(boolean value) {
if (!value) {
this.payments = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PAYMENTS:
if (value == null) {
unsetPayments();
} else {
setPayments((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PAYMENTS:
return getPayments();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PAYMENTS:
return isSetPayments();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertWithdrawals_args)
return this.equals((insertWithdrawals_args)that);
return false;
}
public boolean equals(insertWithdrawals_args that) {
if (that == null)
return false;
boolean this_present_payments = true && this.isSetPayments();
boolean that_present_payments = true && that.isSetPayments();
if (this_present_payments || that_present_payments) {
if (!(this_present_payments && that_present_payments))
return false;
if (!this.payments.equals(that.payments))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetPayments()) ? 131071 : 524287);
if (isSetPayments())
hashCode = hashCode * 8191 + payments.hashCode();
return hashCode;
}
@Override
public int compareTo(insertWithdrawals_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPayments()).compareTo(other.isSetPayments());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPayments()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payments, other.payments);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertWithdrawals_args(");
boolean first = true;
sb.append("payments:");
if (this.payments == null) {
sb.append("null");
} else {
sb.append(this.payments);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertWithdrawals_argsStandardSchemeFactory implements SchemeFactory {
public insertWithdrawals_argsStandardScheme getScheme() {
return new insertWithdrawals_argsStandardScheme();
}
}
private static class insertWithdrawals_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertWithdrawals_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PAYMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list112 = iprot.readListBegin();
struct.payments = new ArrayList(_list112.size);
Withdrawal _elem113;
for (int _i114 = 0; _i114 < _list112.size; ++_i114)
{
_elem113 = new Withdrawal();
_elem113.read(iprot);
struct.payments.add(_elem113);
}
iprot.readListEnd();
}
struct.setPaymentsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertWithdrawals_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.payments != null) {
oprot.writeFieldBegin(PAYMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.payments.size()));
for (Withdrawal _iter115 : struct.payments)
{
_iter115.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertWithdrawals_argsTupleSchemeFactory implements SchemeFactory {
public insertWithdrawals_argsTupleScheme getScheme() {
return new insertWithdrawals_argsTupleScheme();
}
}
private static class insertWithdrawals_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertWithdrawals_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPayments()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetPayments()) {
{
oprot.writeI32(struct.payments.size());
for (Withdrawal _iter116 : struct.payments)
{
_iter116.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertWithdrawals_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.payments = new ArrayList(_list117.size);
Withdrawal _elem118;
for (int _i119 = 0; _i119 < _list117.size; ++_i119)
{
_elem118 = new Withdrawal();
_elem118.read(iprot);
struct.payments.add(_elem118);
}
}
struct.setPaymentsIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertWithdrawals_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertWithdrawals_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertWithdrawals_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertWithdrawals_resultTupleSchemeFactory();
public InsertionException ex1; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EX1((short)1, "ex1");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EX1
return EX1;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertionException.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertWithdrawals_result.class, metaDataMap);
}
public insertWithdrawals_result() {
}
public insertWithdrawals_result(
InsertionException ex1)
{
this();
this.ex1 = ex1;
}
/**
* Performs a deep copy on other.
*/
public insertWithdrawals_result(insertWithdrawals_result other) {
if (other.isSetEx1()) {
this.ex1 = new InsertionException(other.ex1);
}
}
public insertWithdrawals_result deepCopy() {
return new insertWithdrawals_result(this);
}
@Override
public void clear() {
this.ex1 = null;
}
public InsertionException getEx1() {
return this.ex1;
}
public insertWithdrawals_result setEx1(InsertionException ex1) {
this.ex1 = ex1;
return this;
}
public void unsetEx1() {
this.ex1 = null;
}
/** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
public boolean isSetEx1() {
return this.ex1 != null;
}
public void setEx1IsSet(boolean value) {
if (!value) {
this.ex1 = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EX1:
if (value == null) {
unsetEx1();
} else {
setEx1((InsertionException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertWithdrawals_result)
return this.equals((insertWithdrawals_result)that);
return false;
}
public boolean equals(insertWithdrawals_result that) {
if (that == null)
return false;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
if (this_present_ex1 || that_present_ex1) {
if (!(this_present_ex1 && that_present_ex1))
return false;
if (!this.ex1.equals(that.ex1))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
if (isSetEx1())
hashCode = hashCode * 8191 + ex1.hashCode();
return hashCode;
}
@Override
public int compareTo(insertWithdrawals_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEx1()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertWithdrawals_result(");
boolean first = true;
sb.append("ex1:");
if (this.ex1 == null) {
sb.append("null");
} else {
sb.append(this.ex1);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertWithdrawals_resultStandardSchemeFactory implements SchemeFactory {
public insertWithdrawals_resultStandardScheme getScheme() {
return new insertWithdrawals_resultStandardScheme();
}
}
private static class insertWithdrawals_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertWithdrawals_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EX1
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertWithdrawals_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ex1 != null) {
oprot.writeFieldBegin(EX1_FIELD_DESC);
struct.ex1.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertWithdrawals_resultTupleSchemeFactory implements SchemeFactory {
public insertWithdrawals_resultTupleScheme getScheme() {
return new insertWithdrawals_resultTupleScheme();
}
}
private static class insertWithdrawals_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertWithdrawals_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEx1()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEx1()) {
struct.ex1.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertWithdrawals_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertRefunds_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRefunds_args");
private static final org.apache.thrift.protocol.TField REFUNDS_FIELD_DESC = new org.apache.thrift.protocol.TField("refunds", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertRefunds_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertRefunds_argsTupleSchemeFactory();
public List refunds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
REFUNDS((short)1, "refunds");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REFUNDS
return REFUNDS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.REFUNDS, new org.apache.thrift.meta_data.FieldMetaData("refunds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Refund.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRefunds_args.class, metaDataMap);
}
public insertRefunds_args() {
}
public insertRefunds_args(
List refunds)
{
this();
this.refunds = refunds;
}
/**
* Performs a deep copy on other.
*/
public insertRefunds_args(insertRefunds_args other) {
if (other.isSetRefunds()) {
List __this__refunds = new ArrayList(other.refunds.size());
for (Refund other_element : other.refunds) {
__this__refunds.add(new Refund(other_element));
}
this.refunds = __this__refunds;
}
}
public insertRefunds_args deepCopy() {
return new insertRefunds_args(this);
}
@Override
public void clear() {
this.refunds = null;
}
public int getRefundsSize() {
return (this.refunds == null) ? 0 : this.refunds.size();
}
public java.util.Iterator getRefundsIterator() {
return (this.refunds == null) ? null : this.refunds.iterator();
}
public void addToRefunds(Refund elem) {
if (this.refunds == null) {
this.refunds = new ArrayList();
}
this.refunds.add(elem);
}
public List getRefunds() {
return this.refunds;
}
public insertRefunds_args setRefunds(List refunds) {
this.refunds = refunds;
return this;
}
public void unsetRefunds() {
this.refunds = null;
}
/** Returns true if field refunds is set (has been assigned a value) and false otherwise */
public boolean isSetRefunds() {
return this.refunds != null;
}
public void setRefundsIsSet(boolean value) {
if (!value) {
this.refunds = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REFUNDS:
if (value == null) {
unsetRefunds();
} else {
setRefunds((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REFUNDS:
return getRefunds();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case REFUNDS:
return isSetRefunds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertRefunds_args)
return this.equals((insertRefunds_args)that);
return false;
}
public boolean equals(insertRefunds_args that) {
if (that == null)
return false;
boolean this_present_refunds = true && this.isSetRefunds();
boolean that_present_refunds = true && that.isSetRefunds();
if (this_present_refunds || that_present_refunds) {
if (!(this_present_refunds && that_present_refunds))
return false;
if (!this.refunds.equals(that.refunds))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetRefunds()) ? 131071 : 524287);
if (isSetRefunds())
hashCode = hashCode * 8191 + refunds.hashCode();
return hashCode;
}
@Override
public int compareTo(insertRefunds_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRefunds()).compareTo(other.isSetRefunds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRefunds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refunds, other.refunds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertRefunds_args(");
boolean first = true;
sb.append("refunds:");
if (this.refunds == null) {
sb.append("null");
} else {
sb.append(this.refunds);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertRefunds_argsStandardSchemeFactory implements SchemeFactory {
public insertRefunds_argsStandardScheme getScheme() {
return new insertRefunds_argsStandardScheme();
}
}
private static class insertRefunds_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertRefunds_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // REFUNDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list120 = iprot.readListBegin();
struct.refunds = new ArrayList(_list120.size);
Refund _elem121;
for (int _i122 = 0; _i122 < _list120.size; ++_i122)
{
_elem121 = new Refund();
_elem121.read(iprot);
struct.refunds.add(_elem121);
}
iprot.readListEnd();
}
struct.setRefundsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertRefunds_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.refunds != null) {
oprot.writeFieldBegin(REFUNDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.refunds.size()));
for (Refund _iter123 : struct.refunds)
{
_iter123.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertRefunds_argsTupleSchemeFactory implements SchemeFactory {
public insertRefunds_argsTupleScheme getScheme() {
return new insertRefunds_argsTupleScheme();
}
}
private static class insertRefunds_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertRefunds_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRefunds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRefunds()) {
{
oprot.writeI32(struct.refunds.size());
for (Refund _iter124 : struct.refunds)
{
_iter124.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertRefunds_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.refunds = new ArrayList(_list125.size);
Refund _elem126;
for (int _i127 = 0; _i127 < _list125.size; ++_i127)
{
_elem126 = new Refund();
_elem126.read(iprot);
struct.refunds.add(_elem126);
}
}
struct.setRefundsIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertRefunds_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRefunds_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertRefunds_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertRefunds_resultTupleSchemeFactory();
public InsertionException ex1; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EX1((short)1, "ex1");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EX1
return EX1;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertionException.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRefunds_result.class, metaDataMap);
}
public insertRefunds_result() {
}
public insertRefunds_result(
InsertionException ex1)
{
this();
this.ex1 = ex1;
}
/**
* Performs a deep copy on other.
*/
public insertRefunds_result(insertRefunds_result other) {
if (other.isSetEx1()) {
this.ex1 = new InsertionException(other.ex1);
}
}
public insertRefunds_result deepCopy() {
return new insertRefunds_result(this);
}
@Override
public void clear() {
this.ex1 = null;
}
public InsertionException getEx1() {
return this.ex1;
}
public insertRefunds_result setEx1(InsertionException ex1) {
this.ex1 = ex1;
return this;
}
public void unsetEx1() {
this.ex1 = null;
}
/** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
public boolean isSetEx1() {
return this.ex1 != null;
}
public void setEx1IsSet(boolean value) {
if (!value) {
this.ex1 = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EX1:
if (value == null) {
unsetEx1();
} else {
setEx1((InsertionException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof insertRefunds_result)
return this.equals((insertRefunds_result)that);
return false;
}
public boolean equals(insertRefunds_result that) {
if (that == null)
return false;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
if (this_present_ex1 || that_present_ex1) {
if (!(this_present_ex1 && that_present_ex1))
return false;
if (!this.ex1.equals(that.ex1))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
if (isSetEx1())
hashCode = hashCode * 8191 + ex1.hashCode();
return hashCode;
}
@Override
public int compareTo(insertRefunds_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEx1()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public _Fields[] getFields() {
return _Fields.values();
}
public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
return metaDataMap;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("insertRefunds_result(");
boolean first = true;
sb.append("ex1:");
if (this.ex1 == null) {
sb.append("null");
} else {
sb.append(this.ex1);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class insertRefunds_resultStandardSchemeFactory implements SchemeFactory {
public insertRefunds_resultStandardScheme getScheme() {
return new insertRefunds_resultStandardScheme();
}
}
private static class insertRefunds_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, insertRefunds_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EX1
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, insertRefunds_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ex1 != null) {
oprot.writeFieldBegin(EX1_FIELD_DESC);
struct.ex1.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class insertRefunds_resultTupleSchemeFactory implements SchemeFactory {
public insertRefunds_resultTupleScheme getScheme() {
return new insertRefunds_resultTupleScheme();
}
}
private static class insertRefunds_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, insertRefunds_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEx1()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEx1()) {
struct.ex1.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, insertRefunds_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new InsertionException();
struct.ex1.read(iprot);
struct.setEx1IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class insertChargebacks_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertChargebacks_args");
private static final org.apache.thrift.protocol.TField CHARGEBACKS_FIELD_DESC = new org.apache.thrift.protocol.TField("chargebacks", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new insertChargebacks_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new insertChargebacks_argsTupleSchemeFactory();
public List