All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evernote.edam.type.Accounting Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package com.evernote.edam.type;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;

import com.evernote.thrift.*;
import com.evernote.thrift.protocol.*;

/**
 *  This represents the bookkeeping information for the user's subscription.
 * 
 * 
*
uploadLimit
*
The number of bytes that can be uploaded to the account * in the current month. For new notes that are created, this is the length * of the note content (in Unicode characters) plus the size of each resource * (in bytes). For edited notes, this is the the difference between the old * length and the new length (if this is greater than 0) plus the size of * each new resource. *
*
uploadLimitEnd
*
The date and time when the current upload limit * expires. At this time, the monthly upload count reverts to 0 and a new * limit is imposed. This date and time is exclusive, so this is effectively * the start of the new month. *
*
uploadLimitNextMonth
*
When uploadLimitEnd is reached, the service * will change uploadLimit to uploadLimitNextMonth. If a premium account is * canceled, this mechanism will reset the quota appropriately. *
*
premiumServiceStatus
*
Indicates the phases of a premium account * during the billing process. *
*
premiumOrderNumber
*
The order number used by the commerce system to * process recurring payments *
*
premiumServiceStart
*
The start date when this premium promotion * began (this number will get overwritten if a premium service is canceled * and then re-activated). *
*
premiumCommerceService
*
The commerce system used (paypal, Google * checkout, etc) *
*
premiumServiceSKU
*
The code associated with the purchase eg. monthly * or annual purchase. Clients should interpret this value and localize it. *
*
lastSuccessfulCharge
*
Date the last time the user was charged. * Null if never charged. *
*
lastFailedCharge
*
Date the last time a charge was attempted and * failed. *
*
lastFailedChargeReason
*
Reason provided for the charge failure *
*
nextPaymentDue
*
The end of the billing cycle. This could be in the * past if there are failed charges. *
*
premiumLockUntil
*
An internal variable to manage locking operations * on the commerce variables. *
*
updated
*
The date any modification where made to this record. *
*
premiumSubscriptionNumber
*
The number number identifying the * recurring subscription used to make the recurring charges. *
*
lastRequestedCharge
*
Date charge last attempted
*
currency
*
ISO 4217 currency code
*
unitPrice
*
charge in the smallest unit of the currency (e.g. cents for USD)
*
businessId
*
DEPRECATED:See BusinessUserInfo.
*
businessName
*
DEPRECATED:See BusinessUserInfo.
*
businessRole
*
DEPRECATED:See BusinessUserInfo.
*
unitDiscount
*
discount per seat in negative amount and smallest unit of the currency (e.g. cents for USD)
*
nextChargeDate
*
The next time the user will be charged, may or may not be the same as nextPaymentDue
*
*/ public class Accounting implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Accounting"); private static final TField UPLOAD_LIMIT_FIELD_DESC = new TField("uploadLimit", TType.I64, (short)1); private static final TField UPLOAD_LIMIT_END_FIELD_DESC = new TField("uploadLimitEnd", TType.I64, (short)2); private static final TField UPLOAD_LIMIT_NEXT_MONTH_FIELD_DESC = new TField("uploadLimitNextMonth", TType.I64, (short)3); private static final TField PREMIUM_SERVICE_STATUS_FIELD_DESC = new TField("premiumServiceStatus", TType.I32, (short)4); private static final TField PREMIUM_ORDER_NUMBER_FIELD_DESC = new TField("premiumOrderNumber", TType.STRING, (short)5); private static final TField PREMIUM_COMMERCE_SERVICE_FIELD_DESC = new TField("premiumCommerceService", TType.STRING, (short)6); private static final TField PREMIUM_SERVICE_START_FIELD_DESC = new TField("premiumServiceStart", TType.I64, (short)7); private static final TField PREMIUM_SERVICE_SKU_FIELD_DESC = new TField("premiumServiceSKU", TType.STRING, (short)8); private static final TField LAST_SUCCESSFUL_CHARGE_FIELD_DESC = new TField("lastSuccessfulCharge", TType.I64, (short)9); private static final TField LAST_FAILED_CHARGE_FIELD_DESC = new TField("lastFailedCharge", TType.I64, (short)10); private static final TField LAST_FAILED_CHARGE_REASON_FIELD_DESC = new TField("lastFailedChargeReason", TType.STRING, (short)11); private static final TField NEXT_PAYMENT_DUE_FIELD_DESC = new TField("nextPaymentDue", TType.I64, (short)12); private static final TField PREMIUM_LOCK_UNTIL_FIELD_DESC = new TField("premiumLockUntil", TType.I64, (short)13); private static final TField UPDATED_FIELD_DESC = new TField("updated", TType.I64, (short)14); private static final TField PREMIUM_SUBSCRIPTION_NUMBER_FIELD_DESC = new TField("premiumSubscriptionNumber", TType.STRING, (short)16); private static final TField LAST_REQUESTED_CHARGE_FIELD_DESC = new TField("lastRequestedCharge", TType.I64, (short)17); private static final TField CURRENCY_FIELD_DESC = new TField("currency", TType.STRING, (short)18); private static final TField UNIT_PRICE_FIELD_DESC = new TField("unitPrice", TType.I32, (short)19); private static final TField BUSINESS_ID_FIELD_DESC = new TField("businessId", TType.I32, (short)20); private static final TField BUSINESS_NAME_FIELD_DESC = new TField("businessName", TType.STRING, (short)21); private static final TField BUSINESS_ROLE_FIELD_DESC = new TField("businessRole", TType.I32, (short)22); private static final TField UNIT_DISCOUNT_FIELD_DESC = new TField("unitDiscount", TType.I32, (short)23); private static final TField NEXT_CHARGE_DATE_FIELD_DESC = new TField("nextChargeDate", TType.I64, (short)24); private long uploadLimit; private long uploadLimitEnd; private long uploadLimitNextMonth; private PremiumOrderStatus premiumServiceStatus; private String premiumOrderNumber; private String premiumCommerceService; private long premiumServiceStart; private String premiumServiceSKU; private long lastSuccessfulCharge; private long lastFailedCharge; private String lastFailedChargeReason; private long nextPaymentDue; private long premiumLockUntil; private long updated; private String premiumSubscriptionNumber; private long lastRequestedCharge; private String currency; private int unitPrice; private int businessId; private String businessName; private BusinessUserRole businessRole; private int unitDiscount; private long nextChargeDate; // isset id assignments private static final int __UPLOADLIMIT_ISSET_ID = 0; private static final int __UPLOADLIMITEND_ISSET_ID = 1; private static final int __UPLOADLIMITNEXTMONTH_ISSET_ID = 2; private static final int __PREMIUMSERVICESTART_ISSET_ID = 3; private static final int __LASTSUCCESSFULCHARGE_ISSET_ID = 4; private static final int __LASTFAILEDCHARGE_ISSET_ID = 5; private static final int __NEXTPAYMENTDUE_ISSET_ID = 6; private static final int __PREMIUMLOCKUNTIL_ISSET_ID = 7; private static final int __UPDATED_ISSET_ID = 8; private static final int __LASTREQUESTEDCHARGE_ISSET_ID = 9; private static final int __UNITPRICE_ISSET_ID = 10; private static final int __BUSINESSID_ISSET_ID = 11; private static final int __UNITDISCOUNT_ISSET_ID = 12; private static final int __NEXTCHARGEDATE_ISSET_ID = 13; private boolean[] __isset_vector = new boolean[14]; public Accounting() { } /** * Performs a deep copy on other. */ public Accounting(Accounting other) { System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length); this.uploadLimit = other.uploadLimit; this.uploadLimitEnd = other.uploadLimitEnd; this.uploadLimitNextMonth = other.uploadLimitNextMonth; if (other.isSetPremiumServiceStatus()) { this.premiumServiceStatus = other.premiumServiceStatus; } if (other.isSetPremiumOrderNumber()) { this.premiumOrderNumber = other.premiumOrderNumber; } if (other.isSetPremiumCommerceService()) { this.premiumCommerceService = other.premiumCommerceService; } this.premiumServiceStart = other.premiumServiceStart; if (other.isSetPremiumServiceSKU()) { this.premiumServiceSKU = other.premiumServiceSKU; } this.lastSuccessfulCharge = other.lastSuccessfulCharge; this.lastFailedCharge = other.lastFailedCharge; if (other.isSetLastFailedChargeReason()) { this.lastFailedChargeReason = other.lastFailedChargeReason; } this.nextPaymentDue = other.nextPaymentDue; this.premiumLockUntil = other.premiumLockUntil; this.updated = other.updated; if (other.isSetPremiumSubscriptionNumber()) { this.premiumSubscriptionNumber = other.premiumSubscriptionNumber; } this.lastRequestedCharge = other.lastRequestedCharge; if (other.isSetCurrency()) { this.currency = other.currency; } this.unitPrice = other.unitPrice; this.businessId = other.businessId; if (other.isSetBusinessName()) { this.businessName = other.businessName; } if (other.isSetBusinessRole()) { this.businessRole = other.businessRole; } this.unitDiscount = other.unitDiscount; this.nextChargeDate = other.nextChargeDate; } public Accounting deepCopy() { return new Accounting(this); } public void clear() { setUploadLimitIsSet(false); this.uploadLimit = 0; setUploadLimitEndIsSet(false); this.uploadLimitEnd = 0; setUploadLimitNextMonthIsSet(false); this.uploadLimitNextMonth = 0; this.premiumServiceStatus = null; this.premiumOrderNumber = null; this.premiumCommerceService = null; setPremiumServiceStartIsSet(false); this.premiumServiceStart = 0; this.premiumServiceSKU = null; setLastSuccessfulChargeIsSet(false); this.lastSuccessfulCharge = 0; setLastFailedChargeIsSet(false); this.lastFailedCharge = 0; this.lastFailedChargeReason = null; setNextPaymentDueIsSet(false); this.nextPaymentDue = 0; setPremiumLockUntilIsSet(false); this.premiumLockUntil = 0; setUpdatedIsSet(false); this.updated = 0; this.premiumSubscriptionNumber = null; setLastRequestedChargeIsSet(false); this.lastRequestedCharge = 0; this.currency = null; setUnitPriceIsSet(false); this.unitPrice = 0; setBusinessIdIsSet(false); this.businessId = 0; this.businessName = null; this.businessRole = null; setUnitDiscountIsSet(false); this.unitDiscount = 0; setNextChargeDateIsSet(false); this.nextChargeDate = 0; } public long getUploadLimit() { return this.uploadLimit; } public void setUploadLimit(long uploadLimit) { this.uploadLimit = uploadLimit; setUploadLimitIsSet(true); } public void unsetUploadLimit() { __isset_vector[__UPLOADLIMIT_ISSET_ID] = false; } /** Returns true if field uploadLimit is set (has been asigned a value) and false otherwise */ public boolean isSetUploadLimit() { return __isset_vector[__UPLOADLIMIT_ISSET_ID]; } public void setUploadLimitIsSet(boolean value) { __isset_vector[__UPLOADLIMIT_ISSET_ID] = value; } public long getUploadLimitEnd() { return this.uploadLimitEnd; } public void setUploadLimitEnd(long uploadLimitEnd) { this.uploadLimitEnd = uploadLimitEnd; setUploadLimitEndIsSet(true); } public void unsetUploadLimitEnd() { __isset_vector[__UPLOADLIMITEND_ISSET_ID] = false; } /** Returns true if field uploadLimitEnd is set (has been asigned a value) and false otherwise */ public boolean isSetUploadLimitEnd() { return __isset_vector[__UPLOADLIMITEND_ISSET_ID]; } public void setUploadLimitEndIsSet(boolean value) { __isset_vector[__UPLOADLIMITEND_ISSET_ID] = value; } public long getUploadLimitNextMonth() { return this.uploadLimitNextMonth; } public void setUploadLimitNextMonth(long uploadLimitNextMonth) { this.uploadLimitNextMonth = uploadLimitNextMonth; setUploadLimitNextMonthIsSet(true); } public void unsetUploadLimitNextMonth() { __isset_vector[__UPLOADLIMITNEXTMONTH_ISSET_ID] = false; } /** Returns true if field uploadLimitNextMonth is set (has been asigned a value) and false otherwise */ public boolean isSetUploadLimitNextMonth() { return __isset_vector[__UPLOADLIMITNEXTMONTH_ISSET_ID]; } public void setUploadLimitNextMonthIsSet(boolean value) { __isset_vector[__UPLOADLIMITNEXTMONTH_ISSET_ID] = value; } /** * * @see PremiumOrderStatus */ public PremiumOrderStatus getPremiumServiceStatus() { return this.premiumServiceStatus; } /** * * @see PremiumOrderStatus */ public void setPremiumServiceStatus(PremiumOrderStatus premiumServiceStatus) { this.premiumServiceStatus = premiumServiceStatus; } public void unsetPremiumServiceStatus() { this.premiumServiceStatus = null; } /** Returns true if field premiumServiceStatus is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumServiceStatus() { return this.premiumServiceStatus != null; } public void setPremiumServiceStatusIsSet(boolean value) { if (!value) { this.premiumServiceStatus = null; } } public String getPremiumOrderNumber() { return this.premiumOrderNumber; } public void setPremiumOrderNumber(String premiumOrderNumber) { this.premiumOrderNumber = premiumOrderNumber; } public void unsetPremiumOrderNumber() { this.premiumOrderNumber = null; } /** Returns true if field premiumOrderNumber is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumOrderNumber() { return this.premiumOrderNumber != null; } public void setPremiumOrderNumberIsSet(boolean value) { if (!value) { this.premiumOrderNumber = null; } } public String getPremiumCommerceService() { return this.premiumCommerceService; } public void setPremiumCommerceService(String premiumCommerceService) { this.premiumCommerceService = premiumCommerceService; } public void unsetPremiumCommerceService() { this.premiumCommerceService = null; } /** Returns true if field premiumCommerceService is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumCommerceService() { return this.premiumCommerceService != null; } public void setPremiumCommerceServiceIsSet(boolean value) { if (!value) { this.premiumCommerceService = null; } } public long getPremiumServiceStart() { return this.premiumServiceStart; } public void setPremiumServiceStart(long premiumServiceStart) { this.premiumServiceStart = premiumServiceStart; setPremiumServiceStartIsSet(true); } public void unsetPremiumServiceStart() { __isset_vector[__PREMIUMSERVICESTART_ISSET_ID] = false; } /** Returns true if field premiumServiceStart is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumServiceStart() { return __isset_vector[__PREMIUMSERVICESTART_ISSET_ID]; } public void setPremiumServiceStartIsSet(boolean value) { __isset_vector[__PREMIUMSERVICESTART_ISSET_ID] = value; } public String getPremiumServiceSKU() { return this.premiumServiceSKU; } public void setPremiumServiceSKU(String premiumServiceSKU) { this.premiumServiceSKU = premiumServiceSKU; } public void unsetPremiumServiceSKU() { this.premiumServiceSKU = null; } /** Returns true if field premiumServiceSKU is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumServiceSKU() { return this.premiumServiceSKU != null; } public void setPremiumServiceSKUIsSet(boolean value) { if (!value) { this.premiumServiceSKU = null; } } public long getLastSuccessfulCharge() { return this.lastSuccessfulCharge; } public void setLastSuccessfulCharge(long lastSuccessfulCharge) { this.lastSuccessfulCharge = lastSuccessfulCharge; setLastSuccessfulChargeIsSet(true); } public void unsetLastSuccessfulCharge() { __isset_vector[__LASTSUCCESSFULCHARGE_ISSET_ID] = false; } /** Returns true if field lastSuccessfulCharge is set (has been asigned a value) and false otherwise */ public boolean isSetLastSuccessfulCharge() { return __isset_vector[__LASTSUCCESSFULCHARGE_ISSET_ID]; } public void setLastSuccessfulChargeIsSet(boolean value) { __isset_vector[__LASTSUCCESSFULCHARGE_ISSET_ID] = value; } public long getLastFailedCharge() { return this.lastFailedCharge; } public void setLastFailedCharge(long lastFailedCharge) { this.lastFailedCharge = lastFailedCharge; setLastFailedChargeIsSet(true); } public void unsetLastFailedCharge() { __isset_vector[__LASTFAILEDCHARGE_ISSET_ID] = false; } /** Returns true if field lastFailedCharge is set (has been asigned a value) and false otherwise */ public boolean isSetLastFailedCharge() { return __isset_vector[__LASTFAILEDCHARGE_ISSET_ID]; } public void setLastFailedChargeIsSet(boolean value) { __isset_vector[__LASTFAILEDCHARGE_ISSET_ID] = value; } public String getLastFailedChargeReason() { return this.lastFailedChargeReason; } public void setLastFailedChargeReason(String lastFailedChargeReason) { this.lastFailedChargeReason = lastFailedChargeReason; } public void unsetLastFailedChargeReason() { this.lastFailedChargeReason = null; } /** Returns true if field lastFailedChargeReason is set (has been asigned a value) and false otherwise */ public boolean isSetLastFailedChargeReason() { return this.lastFailedChargeReason != null; } public void setLastFailedChargeReasonIsSet(boolean value) { if (!value) { this.lastFailedChargeReason = null; } } public long getNextPaymentDue() { return this.nextPaymentDue; } public void setNextPaymentDue(long nextPaymentDue) { this.nextPaymentDue = nextPaymentDue; setNextPaymentDueIsSet(true); } public void unsetNextPaymentDue() { __isset_vector[__NEXTPAYMENTDUE_ISSET_ID] = false; } /** Returns true if field nextPaymentDue is set (has been asigned a value) and false otherwise */ public boolean isSetNextPaymentDue() { return __isset_vector[__NEXTPAYMENTDUE_ISSET_ID]; } public void setNextPaymentDueIsSet(boolean value) { __isset_vector[__NEXTPAYMENTDUE_ISSET_ID] = value; } public long getPremiumLockUntil() { return this.premiumLockUntil; } public void setPremiumLockUntil(long premiumLockUntil) { this.premiumLockUntil = premiumLockUntil; setPremiumLockUntilIsSet(true); } public void unsetPremiumLockUntil() { __isset_vector[__PREMIUMLOCKUNTIL_ISSET_ID] = false; } /** Returns true if field premiumLockUntil is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumLockUntil() { return __isset_vector[__PREMIUMLOCKUNTIL_ISSET_ID]; } public void setPremiumLockUntilIsSet(boolean value) { __isset_vector[__PREMIUMLOCKUNTIL_ISSET_ID] = value; } public long getUpdated() { return this.updated; } public void setUpdated(long updated) { this.updated = updated; setUpdatedIsSet(true); } public void unsetUpdated() { __isset_vector[__UPDATED_ISSET_ID] = false; } /** Returns true if field updated is set (has been asigned a value) and false otherwise */ public boolean isSetUpdated() { return __isset_vector[__UPDATED_ISSET_ID]; } public void setUpdatedIsSet(boolean value) { __isset_vector[__UPDATED_ISSET_ID] = value; } public String getPremiumSubscriptionNumber() { return this.premiumSubscriptionNumber; } public void setPremiumSubscriptionNumber(String premiumSubscriptionNumber) { this.premiumSubscriptionNumber = premiumSubscriptionNumber; } public void unsetPremiumSubscriptionNumber() { this.premiumSubscriptionNumber = null; } /** Returns true if field premiumSubscriptionNumber is set (has been asigned a value) and false otherwise */ public boolean isSetPremiumSubscriptionNumber() { return this.premiumSubscriptionNumber != null; } public void setPremiumSubscriptionNumberIsSet(boolean value) { if (!value) { this.premiumSubscriptionNumber = null; } } public long getLastRequestedCharge() { return this.lastRequestedCharge; } public void setLastRequestedCharge(long lastRequestedCharge) { this.lastRequestedCharge = lastRequestedCharge; setLastRequestedChargeIsSet(true); } public void unsetLastRequestedCharge() { __isset_vector[__LASTREQUESTEDCHARGE_ISSET_ID] = false; } /** Returns true if field lastRequestedCharge is set (has been asigned a value) and false otherwise */ public boolean isSetLastRequestedCharge() { return __isset_vector[__LASTREQUESTEDCHARGE_ISSET_ID]; } public void setLastRequestedChargeIsSet(boolean value) { __isset_vector[__LASTREQUESTEDCHARGE_ISSET_ID] = value; } public String getCurrency() { return this.currency; } public void setCurrency(String currency) { this.currency = currency; } public void unsetCurrency() { this.currency = null; } /** Returns true if field currency is set (has been asigned a value) and false otherwise */ public boolean isSetCurrency() { return this.currency != null; } public void setCurrencyIsSet(boolean value) { if (!value) { this.currency = null; } } public int getUnitPrice() { return this.unitPrice; } public void setUnitPrice(int unitPrice) { this.unitPrice = unitPrice; setUnitPriceIsSet(true); } public void unsetUnitPrice() { __isset_vector[__UNITPRICE_ISSET_ID] = false; } /** Returns true if field unitPrice is set (has been asigned a value) and false otherwise */ public boolean isSetUnitPrice() { return __isset_vector[__UNITPRICE_ISSET_ID]; } public void setUnitPriceIsSet(boolean value) { __isset_vector[__UNITPRICE_ISSET_ID] = value; } public int getBusinessId() { return this.businessId; } public void setBusinessId(int businessId) { this.businessId = businessId; setBusinessIdIsSet(true); } public void unsetBusinessId() { __isset_vector[__BUSINESSID_ISSET_ID] = false; } /** Returns true if field businessId is set (has been asigned a value) and false otherwise */ public boolean isSetBusinessId() { return __isset_vector[__BUSINESSID_ISSET_ID]; } public void setBusinessIdIsSet(boolean value) { __isset_vector[__BUSINESSID_ISSET_ID] = value; } public String getBusinessName() { return this.businessName; } public void setBusinessName(String businessName) { this.businessName = businessName; } public void unsetBusinessName() { this.businessName = null; } /** Returns true if field businessName is set (has been asigned a value) and false otherwise */ public boolean isSetBusinessName() { return this.businessName != null; } public void setBusinessNameIsSet(boolean value) { if (!value) { this.businessName = null; } } /** * * @see BusinessUserRole */ public BusinessUserRole getBusinessRole() { return this.businessRole; } /** * * @see BusinessUserRole */ public void setBusinessRole(BusinessUserRole businessRole) { this.businessRole = businessRole; } public void unsetBusinessRole() { this.businessRole = null; } /** Returns true if field businessRole is set (has been asigned a value) and false otherwise */ public boolean isSetBusinessRole() { return this.businessRole != null; } public void setBusinessRoleIsSet(boolean value) { if (!value) { this.businessRole = null; } } public int getUnitDiscount() { return this.unitDiscount; } public void setUnitDiscount(int unitDiscount) { this.unitDiscount = unitDiscount; setUnitDiscountIsSet(true); } public void unsetUnitDiscount() { __isset_vector[__UNITDISCOUNT_ISSET_ID] = false; } /** Returns true if field unitDiscount is set (has been asigned a value) and false otherwise */ public boolean isSetUnitDiscount() { return __isset_vector[__UNITDISCOUNT_ISSET_ID]; } public void setUnitDiscountIsSet(boolean value) { __isset_vector[__UNITDISCOUNT_ISSET_ID] = value; } public long getNextChargeDate() { return this.nextChargeDate; } public void setNextChargeDate(long nextChargeDate) { this.nextChargeDate = nextChargeDate; setNextChargeDateIsSet(true); } public void unsetNextChargeDate() { __isset_vector[__NEXTCHARGEDATE_ISSET_ID] = false; } /** Returns true if field nextChargeDate is set (has been asigned a value) and false otherwise */ public boolean isSetNextChargeDate() { return __isset_vector[__NEXTCHARGEDATE_ISSET_ID]; } public void setNextChargeDateIsSet(boolean value) { __isset_vector[__NEXTCHARGEDATE_ISSET_ID] = value; } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Accounting) return this.equals((Accounting)that); return false; } public boolean equals(Accounting that) { if (that == null) return false; boolean this_present_uploadLimit = true && this.isSetUploadLimit(); boolean that_present_uploadLimit = true && that.isSetUploadLimit(); if (this_present_uploadLimit || that_present_uploadLimit) { if (!(this_present_uploadLimit && that_present_uploadLimit)) return false; if (this.uploadLimit != that.uploadLimit) return false; } boolean this_present_uploadLimitEnd = true && this.isSetUploadLimitEnd(); boolean that_present_uploadLimitEnd = true && that.isSetUploadLimitEnd(); if (this_present_uploadLimitEnd || that_present_uploadLimitEnd) { if (!(this_present_uploadLimitEnd && that_present_uploadLimitEnd)) return false; if (this.uploadLimitEnd != that.uploadLimitEnd) return false; } boolean this_present_uploadLimitNextMonth = true && this.isSetUploadLimitNextMonth(); boolean that_present_uploadLimitNextMonth = true && that.isSetUploadLimitNextMonth(); if (this_present_uploadLimitNextMonth || that_present_uploadLimitNextMonth) { if (!(this_present_uploadLimitNextMonth && that_present_uploadLimitNextMonth)) return false; if (this.uploadLimitNextMonth != that.uploadLimitNextMonth) return false; } boolean this_present_premiumServiceStatus = true && this.isSetPremiumServiceStatus(); boolean that_present_premiumServiceStatus = true && that.isSetPremiumServiceStatus(); if (this_present_premiumServiceStatus || that_present_premiumServiceStatus) { if (!(this_present_premiumServiceStatus && that_present_premiumServiceStatus)) return false; if (!this.premiumServiceStatus.equals(that.premiumServiceStatus)) return false; } boolean this_present_premiumOrderNumber = true && this.isSetPremiumOrderNumber(); boolean that_present_premiumOrderNumber = true && that.isSetPremiumOrderNumber(); if (this_present_premiumOrderNumber || that_present_premiumOrderNumber) { if (!(this_present_premiumOrderNumber && that_present_premiumOrderNumber)) return false; if (!this.premiumOrderNumber.equals(that.premiumOrderNumber)) return false; } boolean this_present_premiumCommerceService = true && this.isSetPremiumCommerceService(); boolean that_present_premiumCommerceService = true && that.isSetPremiumCommerceService(); if (this_present_premiumCommerceService || that_present_premiumCommerceService) { if (!(this_present_premiumCommerceService && that_present_premiumCommerceService)) return false; if (!this.premiumCommerceService.equals(that.premiumCommerceService)) return false; } boolean this_present_premiumServiceStart = true && this.isSetPremiumServiceStart(); boolean that_present_premiumServiceStart = true && that.isSetPremiumServiceStart(); if (this_present_premiumServiceStart || that_present_premiumServiceStart) { if (!(this_present_premiumServiceStart && that_present_premiumServiceStart)) return false; if (this.premiumServiceStart != that.premiumServiceStart) return false; } boolean this_present_premiumServiceSKU = true && this.isSetPremiumServiceSKU(); boolean that_present_premiumServiceSKU = true && that.isSetPremiumServiceSKU(); if (this_present_premiumServiceSKU || that_present_premiumServiceSKU) { if (!(this_present_premiumServiceSKU && that_present_premiumServiceSKU)) return false; if (!this.premiumServiceSKU.equals(that.premiumServiceSKU)) return false; } boolean this_present_lastSuccessfulCharge = true && this.isSetLastSuccessfulCharge(); boolean that_present_lastSuccessfulCharge = true && that.isSetLastSuccessfulCharge(); if (this_present_lastSuccessfulCharge || that_present_lastSuccessfulCharge) { if (!(this_present_lastSuccessfulCharge && that_present_lastSuccessfulCharge)) return false; if (this.lastSuccessfulCharge != that.lastSuccessfulCharge) return false; } boolean this_present_lastFailedCharge = true && this.isSetLastFailedCharge(); boolean that_present_lastFailedCharge = true && that.isSetLastFailedCharge(); if (this_present_lastFailedCharge || that_present_lastFailedCharge) { if (!(this_present_lastFailedCharge && that_present_lastFailedCharge)) return false; if (this.lastFailedCharge != that.lastFailedCharge) return false; } boolean this_present_lastFailedChargeReason = true && this.isSetLastFailedChargeReason(); boolean that_present_lastFailedChargeReason = true && that.isSetLastFailedChargeReason(); if (this_present_lastFailedChargeReason || that_present_lastFailedChargeReason) { if (!(this_present_lastFailedChargeReason && that_present_lastFailedChargeReason)) return false; if (!this.lastFailedChargeReason.equals(that.lastFailedChargeReason)) return false; } boolean this_present_nextPaymentDue = true && this.isSetNextPaymentDue(); boolean that_present_nextPaymentDue = true && that.isSetNextPaymentDue(); if (this_present_nextPaymentDue || that_present_nextPaymentDue) { if (!(this_present_nextPaymentDue && that_present_nextPaymentDue)) return false; if (this.nextPaymentDue != that.nextPaymentDue) return false; } boolean this_present_premiumLockUntil = true && this.isSetPremiumLockUntil(); boolean that_present_premiumLockUntil = true && that.isSetPremiumLockUntil(); if (this_present_premiumLockUntil || that_present_premiumLockUntil) { if (!(this_present_premiumLockUntil && that_present_premiumLockUntil)) return false; if (this.premiumLockUntil != that.premiumLockUntil) return false; } boolean this_present_updated = true && this.isSetUpdated(); boolean that_present_updated = true && that.isSetUpdated(); if (this_present_updated || that_present_updated) { if (!(this_present_updated && that_present_updated)) return false; if (this.updated != that.updated) return false; } boolean this_present_premiumSubscriptionNumber = true && this.isSetPremiumSubscriptionNumber(); boolean that_present_premiumSubscriptionNumber = true && that.isSetPremiumSubscriptionNumber(); if (this_present_premiumSubscriptionNumber || that_present_premiumSubscriptionNumber) { if (!(this_present_premiumSubscriptionNumber && that_present_premiumSubscriptionNumber)) return false; if (!this.premiumSubscriptionNumber.equals(that.premiumSubscriptionNumber)) return false; } boolean this_present_lastRequestedCharge = true && this.isSetLastRequestedCharge(); boolean that_present_lastRequestedCharge = true && that.isSetLastRequestedCharge(); if (this_present_lastRequestedCharge || that_present_lastRequestedCharge) { if (!(this_present_lastRequestedCharge && that_present_lastRequestedCharge)) return false; if (this.lastRequestedCharge != that.lastRequestedCharge) return false; } boolean this_present_currency = true && this.isSetCurrency(); boolean that_present_currency = true && that.isSetCurrency(); if (this_present_currency || that_present_currency) { if (!(this_present_currency && that_present_currency)) return false; if (!this.currency.equals(that.currency)) return false; } boolean this_present_unitPrice = true && this.isSetUnitPrice(); boolean that_present_unitPrice = true && that.isSetUnitPrice(); if (this_present_unitPrice || that_present_unitPrice) { if (!(this_present_unitPrice && that_present_unitPrice)) return false; if (this.unitPrice != that.unitPrice) return false; } boolean this_present_businessId = true && this.isSetBusinessId(); boolean that_present_businessId = true && that.isSetBusinessId(); if (this_present_businessId || that_present_businessId) { if (!(this_present_businessId && that_present_businessId)) return false; if (this.businessId != that.businessId) return false; } boolean this_present_businessName = true && this.isSetBusinessName(); boolean that_present_businessName = true && that.isSetBusinessName(); if (this_present_businessName || that_present_businessName) { if (!(this_present_businessName && that_present_businessName)) return false; if (!this.businessName.equals(that.businessName)) return false; } boolean this_present_businessRole = true && this.isSetBusinessRole(); boolean that_present_businessRole = true && that.isSetBusinessRole(); if (this_present_businessRole || that_present_businessRole) { if (!(this_present_businessRole && that_present_businessRole)) return false; if (!this.businessRole.equals(that.businessRole)) return false; } boolean this_present_unitDiscount = true && this.isSetUnitDiscount(); boolean that_present_unitDiscount = true && that.isSetUnitDiscount(); if (this_present_unitDiscount || that_present_unitDiscount) { if (!(this_present_unitDiscount && that_present_unitDiscount)) return false; if (this.unitDiscount != that.unitDiscount) return false; } boolean this_present_nextChargeDate = true && this.isSetNextChargeDate(); boolean that_present_nextChargeDate = true && that.isSetNextChargeDate(); if (this_present_nextChargeDate || that_present_nextChargeDate) { if (!(this_present_nextChargeDate && that_present_nextChargeDate)) return false; if (this.nextChargeDate != that.nextChargeDate) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(Accounting other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; Accounting typedOther = (Accounting)other; lastComparison = Boolean.valueOf(isSetUploadLimit()).compareTo(typedOther.isSetUploadLimit()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadLimit()) { lastComparison = TBaseHelper.compareTo(this.uploadLimit, typedOther.uploadLimit); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUploadLimitEnd()).compareTo(typedOther.isSetUploadLimitEnd()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadLimitEnd()) { lastComparison = TBaseHelper.compareTo(this.uploadLimitEnd, typedOther.uploadLimitEnd); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUploadLimitNextMonth()).compareTo(typedOther.isSetUploadLimitNextMonth()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadLimitNextMonth()) { lastComparison = TBaseHelper.compareTo(this.uploadLimitNextMonth, typedOther.uploadLimitNextMonth); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumServiceStatus()).compareTo(typedOther.isSetPremiumServiceStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumServiceStatus()) { lastComparison = TBaseHelper.compareTo(this.premiumServiceStatus, typedOther.premiumServiceStatus); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumOrderNumber()).compareTo(typedOther.isSetPremiumOrderNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumOrderNumber()) { lastComparison = TBaseHelper.compareTo(this.premiumOrderNumber, typedOther.premiumOrderNumber); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumCommerceService()).compareTo(typedOther.isSetPremiumCommerceService()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumCommerceService()) { lastComparison = TBaseHelper.compareTo(this.premiumCommerceService, typedOther.premiumCommerceService); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumServiceStart()).compareTo(typedOther.isSetPremiumServiceStart()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumServiceStart()) { lastComparison = TBaseHelper.compareTo(this.premiumServiceStart, typedOther.premiumServiceStart); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumServiceSKU()).compareTo(typedOther.isSetPremiumServiceSKU()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumServiceSKU()) { lastComparison = TBaseHelper.compareTo(this.premiumServiceSKU, typedOther.premiumServiceSKU); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLastSuccessfulCharge()).compareTo(typedOther.isSetLastSuccessfulCharge()); if (lastComparison != 0) { return lastComparison; } if (isSetLastSuccessfulCharge()) { lastComparison = TBaseHelper.compareTo(this.lastSuccessfulCharge, typedOther.lastSuccessfulCharge); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLastFailedCharge()).compareTo(typedOther.isSetLastFailedCharge()); if (lastComparison != 0) { return lastComparison; } if (isSetLastFailedCharge()) { lastComparison = TBaseHelper.compareTo(this.lastFailedCharge, typedOther.lastFailedCharge); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLastFailedChargeReason()).compareTo(typedOther.isSetLastFailedChargeReason()); if (lastComparison != 0) { return lastComparison; } if (isSetLastFailedChargeReason()) { lastComparison = TBaseHelper.compareTo(this.lastFailedChargeReason, typedOther.lastFailedChargeReason); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNextPaymentDue()).compareTo(typedOther.isSetNextPaymentDue()); if (lastComparison != 0) { return lastComparison; } if (isSetNextPaymentDue()) { lastComparison = TBaseHelper.compareTo(this.nextPaymentDue, typedOther.nextPaymentDue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumLockUntil()).compareTo(typedOther.isSetPremiumLockUntil()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumLockUntil()) { lastComparison = TBaseHelper.compareTo(this.premiumLockUntil, typedOther.premiumLockUntil); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUpdated()).compareTo(typedOther.isSetUpdated()); if (lastComparison != 0) { return lastComparison; } if (isSetUpdated()) { lastComparison = TBaseHelper.compareTo(this.updated, typedOther.updated); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPremiumSubscriptionNumber()).compareTo(typedOther.isSetPremiumSubscriptionNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetPremiumSubscriptionNumber()) { lastComparison = TBaseHelper.compareTo(this.premiumSubscriptionNumber, typedOther.premiumSubscriptionNumber); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLastRequestedCharge()).compareTo(typedOther.isSetLastRequestedCharge()); if (lastComparison != 0) { return lastComparison; } if (isSetLastRequestedCharge()) { lastComparison = TBaseHelper.compareTo(this.lastRequestedCharge, typedOther.lastRequestedCharge); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCurrency()).compareTo(typedOther.isSetCurrency()); if (lastComparison != 0) { return lastComparison; } if (isSetCurrency()) { lastComparison = TBaseHelper.compareTo(this.currency, typedOther.currency); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice()); if (lastComparison != 0) { return lastComparison; } if (isSetUnitPrice()) { lastComparison = TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBusinessId()).compareTo(typedOther.isSetBusinessId()); if (lastComparison != 0) { return lastComparison; } if (isSetBusinessId()) { lastComparison = TBaseHelper.compareTo(this.businessId, typedOther.businessId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBusinessName()).compareTo(typedOther.isSetBusinessName()); if (lastComparison != 0) { return lastComparison; } if (isSetBusinessName()) { lastComparison = TBaseHelper.compareTo(this.businessName, typedOther.businessName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBusinessRole()).compareTo(typedOther.isSetBusinessRole()); if (lastComparison != 0) { return lastComparison; } if (isSetBusinessRole()) { lastComparison = TBaseHelper.compareTo(this.businessRole, typedOther.businessRole); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUnitDiscount()).compareTo(typedOther.isSetUnitDiscount()); if (lastComparison != 0) { return lastComparison; } if (isSetUnitDiscount()) { lastComparison = TBaseHelper.compareTo(this.unitDiscount, typedOther.unitDiscount); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNextChargeDate()).compareTo(typedOther.isSetNextChargeDate()); if (lastComparison != 0) { return lastComparison; } if (isSetNextChargeDate()) { lastComparison = TBaseHelper.compareTo(this.nextChargeDate, typedOther.nextChargeDate); if (lastComparison != 0) { return lastComparison; } } return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 1: // UPLOAD_LIMIT if (field.type == TType.I64) { this.uploadLimit = iprot.readI64(); setUploadLimitIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 2: // UPLOAD_LIMIT_END if (field.type == TType.I64) { this.uploadLimitEnd = iprot.readI64(); setUploadLimitEndIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 3: // UPLOAD_LIMIT_NEXT_MONTH if (field.type == TType.I64) { this.uploadLimitNextMonth = iprot.readI64(); setUploadLimitNextMonthIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 4: // PREMIUM_SERVICE_STATUS if (field.type == TType.I32) { this.premiumServiceStatus = PremiumOrderStatus.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; case 5: // PREMIUM_ORDER_NUMBER if (field.type == TType.STRING) { this.premiumOrderNumber = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 6: // PREMIUM_COMMERCE_SERVICE if (field.type == TType.STRING) { this.premiumCommerceService = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 7: // PREMIUM_SERVICE_START if (field.type == TType.I64) { this.premiumServiceStart = iprot.readI64(); setPremiumServiceStartIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 8: // PREMIUM_SERVICE_SKU if (field.type == TType.STRING) { this.premiumServiceSKU = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 9: // LAST_SUCCESSFUL_CHARGE if (field.type == TType.I64) { this.lastSuccessfulCharge = iprot.readI64(); setLastSuccessfulChargeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 10: // LAST_FAILED_CHARGE if (field.type == TType.I64) { this.lastFailedCharge = iprot.readI64(); setLastFailedChargeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 11: // LAST_FAILED_CHARGE_REASON if (field.type == TType.STRING) { this.lastFailedChargeReason = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 12: // NEXT_PAYMENT_DUE if (field.type == TType.I64) { this.nextPaymentDue = iprot.readI64(); setNextPaymentDueIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 13: // PREMIUM_LOCK_UNTIL if (field.type == TType.I64) { this.premiumLockUntil = iprot.readI64(); setPremiumLockUntilIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 14: // UPDATED if (field.type == TType.I64) { this.updated = iprot.readI64(); setUpdatedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 16: // PREMIUM_SUBSCRIPTION_NUMBER if (field.type == TType.STRING) { this.premiumSubscriptionNumber = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 17: // LAST_REQUESTED_CHARGE if (field.type == TType.I64) { this.lastRequestedCharge = iprot.readI64(); setLastRequestedChargeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 18: // CURRENCY if (field.type == TType.STRING) { this.currency = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 19: // UNIT_PRICE if (field.type == TType.I32) { this.unitPrice = iprot.readI32(); setUnitPriceIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 20: // BUSINESS_ID if (field.type == TType.I32) { this.businessId = iprot.readI32(); setBusinessIdIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 21: // BUSINESS_NAME if (field.type == TType.STRING) { this.businessName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 22: // BUSINESS_ROLE if (field.type == TType.I32) { this.businessRole = BusinessUserRole.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; case 23: // UNIT_DISCOUNT if (field.type == TType.I32) { this.unitDiscount = iprot.readI32(); setUnitDiscountIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 24: // NEXT_CHARGE_DATE if (field.type == TType.I64) { this.nextChargeDate = iprot.readI64(); setNextChargeDateIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (isSetUploadLimit()) { oprot.writeFieldBegin(UPLOAD_LIMIT_FIELD_DESC); oprot.writeI64(this.uploadLimit); oprot.writeFieldEnd(); } if (isSetUploadLimitEnd()) { oprot.writeFieldBegin(UPLOAD_LIMIT_END_FIELD_DESC); oprot.writeI64(this.uploadLimitEnd); oprot.writeFieldEnd(); } if (isSetUploadLimitNextMonth()) { oprot.writeFieldBegin(UPLOAD_LIMIT_NEXT_MONTH_FIELD_DESC); oprot.writeI64(this.uploadLimitNextMonth); oprot.writeFieldEnd(); } if (this.premiumServiceStatus != null) { if (isSetPremiumServiceStatus()) { oprot.writeFieldBegin(PREMIUM_SERVICE_STATUS_FIELD_DESC); oprot.writeI32(this.premiumServiceStatus.getValue()); oprot.writeFieldEnd(); } } if (this.premiumOrderNumber != null) { if (isSetPremiumOrderNumber()) { oprot.writeFieldBegin(PREMIUM_ORDER_NUMBER_FIELD_DESC); oprot.writeString(this.premiumOrderNumber); oprot.writeFieldEnd(); } } if (this.premiumCommerceService != null) { if (isSetPremiumCommerceService()) { oprot.writeFieldBegin(PREMIUM_COMMERCE_SERVICE_FIELD_DESC); oprot.writeString(this.premiumCommerceService); oprot.writeFieldEnd(); } } if (isSetPremiumServiceStart()) { oprot.writeFieldBegin(PREMIUM_SERVICE_START_FIELD_DESC); oprot.writeI64(this.premiumServiceStart); oprot.writeFieldEnd(); } if (this.premiumServiceSKU != null) { if (isSetPremiumServiceSKU()) { oprot.writeFieldBegin(PREMIUM_SERVICE_SKU_FIELD_DESC); oprot.writeString(this.premiumServiceSKU); oprot.writeFieldEnd(); } } if (isSetLastSuccessfulCharge()) { oprot.writeFieldBegin(LAST_SUCCESSFUL_CHARGE_FIELD_DESC); oprot.writeI64(this.lastSuccessfulCharge); oprot.writeFieldEnd(); } if (isSetLastFailedCharge()) { oprot.writeFieldBegin(LAST_FAILED_CHARGE_FIELD_DESC); oprot.writeI64(this.lastFailedCharge); oprot.writeFieldEnd(); } if (this.lastFailedChargeReason != null) { if (isSetLastFailedChargeReason()) { oprot.writeFieldBegin(LAST_FAILED_CHARGE_REASON_FIELD_DESC); oprot.writeString(this.lastFailedChargeReason); oprot.writeFieldEnd(); } } if (isSetNextPaymentDue()) { oprot.writeFieldBegin(NEXT_PAYMENT_DUE_FIELD_DESC); oprot.writeI64(this.nextPaymentDue); oprot.writeFieldEnd(); } if (isSetPremiumLockUntil()) { oprot.writeFieldBegin(PREMIUM_LOCK_UNTIL_FIELD_DESC); oprot.writeI64(this.premiumLockUntil); oprot.writeFieldEnd(); } if (isSetUpdated()) { oprot.writeFieldBegin(UPDATED_FIELD_DESC); oprot.writeI64(this.updated); oprot.writeFieldEnd(); } if (this.premiumSubscriptionNumber != null) { if (isSetPremiumSubscriptionNumber()) { oprot.writeFieldBegin(PREMIUM_SUBSCRIPTION_NUMBER_FIELD_DESC); oprot.writeString(this.premiumSubscriptionNumber); oprot.writeFieldEnd(); } } if (isSetLastRequestedCharge()) { oprot.writeFieldBegin(LAST_REQUESTED_CHARGE_FIELD_DESC); oprot.writeI64(this.lastRequestedCharge); oprot.writeFieldEnd(); } if (this.currency != null) { if (isSetCurrency()) { oprot.writeFieldBegin(CURRENCY_FIELD_DESC); oprot.writeString(this.currency); oprot.writeFieldEnd(); } } if (isSetUnitPrice()) { oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC); oprot.writeI32(this.unitPrice); oprot.writeFieldEnd(); } if (isSetBusinessId()) { oprot.writeFieldBegin(BUSINESS_ID_FIELD_DESC); oprot.writeI32(this.businessId); oprot.writeFieldEnd(); } if (this.businessName != null) { if (isSetBusinessName()) { oprot.writeFieldBegin(BUSINESS_NAME_FIELD_DESC); oprot.writeString(this.businessName); oprot.writeFieldEnd(); } } if (this.businessRole != null) { if (isSetBusinessRole()) { oprot.writeFieldBegin(BUSINESS_ROLE_FIELD_DESC); oprot.writeI32(this.businessRole.getValue()); oprot.writeFieldEnd(); } } if (isSetUnitDiscount()) { oprot.writeFieldBegin(UNIT_DISCOUNT_FIELD_DESC); oprot.writeI32(this.unitDiscount); oprot.writeFieldEnd(); } if (isSetNextChargeDate()) { oprot.writeFieldBegin(NEXT_CHARGE_DATE_FIELD_DESC); oprot.writeI64(this.nextChargeDate); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("Accounting("); boolean first = true; if (isSetUploadLimit()) { sb.append("uploadLimit:"); sb.append(this.uploadLimit); first = false; } if (isSetUploadLimitEnd()) { if (!first) sb.append(", "); sb.append("uploadLimitEnd:"); sb.append(this.uploadLimitEnd); first = false; } if (isSetUploadLimitNextMonth()) { if (!first) sb.append(", "); sb.append("uploadLimitNextMonth:"); sb.append(this.uploadLimitNextMonth); first = false; } if (isSetPremiumServiceStatus()) { if (!first) sb.append(", "); sb.append("premiumServiceStatus:"); if (this.premiumServiceStatus == null) { sb.append("null"); } else { sb.append(this.premiumServiceStatus); } first = false; } if (isSetPremiumOrderNumber()) { if (!first) sb.append(", "); sb.append("premiumOrderNumber:"); if (this.premiumOrderNumber == null) { sb.append("null"); } else { sb.append(this.premiumOrderNumber); } first = false; } if (isSetPremiumCommerceService()) { if (!first) sb.append(", "); sb.append("premiumCommerceService:"); if (this.premiumCommerceService == null) { sb.append("null"); } else { sb.append(this.premiumCommerceService); } first = false; } if (isSetPremiumServiceStart()) { if (!first) sb.append(", "); sb.append("premiumServiceStart:"); sb.append(this.premiumServiceStart); first = false; } if (isSetPremiumServiceSKU()) { if (!first) sb.append(", "); sb.append("premiumServiceSKU:"); if (this.premiumServiceSKU == null) { sb.append("null"); } else { sb.append(this.premiumServiceSKU); } first = false; } if (isSetLastSuccessfulCharge()) { if (!first) sb.append(", "); sb.append("lastSuccessfulCharge:"); sb.append(this.lastSuccessfulCharge); first = false; } if (isSetLastFailedCharge()) { if (!first) sb.append(", "); sb.append("lastFailedCharge:"); sb.append(this.lastFailedCharge); first = false; } if (isSetLastFailedChargeReason()) { if (!first) sb.append(", "); sb.append("lastFailedChargeReason:"); if (this.lastFailedChargeReason == null) { sb.append("null"); } else { sb.append(this.lastFailedChargeReason); } first = false; } if (isSetNextPaymentDue()) { if (!first) sb.append(", "); sb.append("nextPaymentDue:"); sb.append(this.nextPaymentDue); first = false; } if (isSetPremiumLockUntil()) { if (!first) sb.append(", "); sb.append("premiumLockUntil:"); sb.append(this.premiumLockUntil); first = false; } if (isSetUpdated()) { if (!first) sb.append(", "); sb.append("updated:"); sb.append(this.updated); first = false; } if (isSetPremiumSubscriptionNumber()) { if (!first) sb.append(", "); sb.append("premiumSubscriptionNumber:"); if (this.premiumSubscriptionNumber == null) { sb.append("null"); } else { sb.append(this.premiumSubscriptionNumber); } first = false; } if (isSetLastRequestedCharge()) { if (!first) sb.append(", "); sb.append("lastRequestedCharge:"); sb.append(this.lastRequestedCharge); first = false; } if (isSetCurrency()) { if (!first) sb.append(", "); sb.append("currency:"); if (this.currency == null) { sb.append("null"); } else { sb.append(this.currency); } first = false; } if (isSetUnitPrice()) { if (!first) sb.append(", "); sb.append("unitPrice:"); sb.append(this.unitPrice); first = false; } if (isSetBusinessId()) { if (!first) sb.append(", "); sb.append("businessId:"); sb.append(this.businessId); first = false; } if (isSetBusinessName()) { if (!first) sb.append(", "); sb.append("businessName:"); if (this.businessName == null) { sb.append("null"); } else { sb.append(this.businessName); } first = false; } if (isSetBusinessRole()) { if (!first) sb.append(", "); sb.append("businessRole:"); if (this.businessRole == null) { sb.append("null"); } else { sb.append(this.businessRole); } first = false; } if (isSetUnitDiscount()) { if (!first) sb.append(", "); sb.append("unitDiscount:"); sb.append(this.unitDiscount); first = false; } if (isSetNextChargeDate()) { if (!first) sb.append(", "); sb.append("nextChargeDate:"); sb.append(this.nextChargeDate); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy