Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A615B200CFA for ; Tue, 5 Sep 2017 22:44:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A46011616CD; Tue, 5 Sep 2017 20:44:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7DB2F161666 for ; Tue, 5 Sep 2017 22:44:06 +0200 (CEST) Received: (qmail 68622 invoked by uid 500); 5 Sep 2017 20:44:05 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 67690 invoked by uid 99); 5 Sep 2017 20:44:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2017 20:44:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFB20F56A7; Tue, 5 Sep 2017 20:44:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: machristie@apache.org To: commits@airavata.apache.org Date: Tue, 05 Sep 2017 20:44:18 -0000 Message-Id: <5c06b863c76644178eb68cada1c28fb3@git.apache.org> In-Reply-To: <5eb21ab29fee4bf3a05eb90d557ead83@git.apache.org> References: <5eb21ab29fee4bf3a05eb90d557ead83@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/52] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0 archived-at: Tue, 05 Sep 2017 20:44:08 -0000 http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java index 9c274d6..b8754ed 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java @@ -16,42 +16,15 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.appcatalog.gatewayprofile; -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.TException; -import org.apache.thrift.async.AsyncMethodCallback; -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"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class StoragePreference 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("StoragePreference"); @@ -60,16 +33,13 @@ public class StoragePreference implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new StoragePreferenceStandardSchemeFactory()); - schemes.put(TupleScheme.class, new StoragePreferenceTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StoragePreferenceStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StoragePreferenceTupleSchemeFactory(); - private String storageResourceId; // required - private String loginUserName; // optional - private String fileSystemRootLocation; // optional - private String resourceSpecificCredentialStoreToken; // optional + private java.lang.String storageResourceId; // required + private java.lang.String loginUserName; // optional + private java.lang.String fileSystemRootLocation; // optional + private java.lang.String resourceSpecificCredentialStoreToken; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -78,10 +48,10 @@ public class StoragePreference implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -110,21 +80,21 @@ public class StoragePreference implements org.apache.thrift.TBase metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.STORAGE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("storageResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LOGIN_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginUserName", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -151,7 +121,7 @@ public class StoragePreference implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_storageResourceId = true && (isSetStorageResourceId()); - list.add(present_storageResourceId); - if (present_storageResourceId) - list.add(storageResourceId); + hashCode = hashCode * 8191 + ((isSetStorageResourceId()) ? 131071 : 524287); + if (isSetStorageResourceId()) + hashCode = hashCode * 8191 + storageResourceId.hashCode(); - boolean present_loginUserName = true && (isSetLoginUserName()); - list.add(present_loginUserName); - if (present_loginUserName) - list.add(loginUserName); + hashCode = hashCode * 8191 + ((isSetLoginUserName()) ? 131071 : 524287); + if (isSetLoginUserName()) + hashCode = hashCode * 8191 + loginUserName.hashCode(); - boolean present_fileSystemRootLocation = true && (isSetFileSystemRootLocation()); - list.add(present_fileSystemRootLocation); - if (present_fileSystemRootLocation) - list.add(fileSystemRootLocation); + hashCode = hashCode * 8191 + ((isSetFileSystemRootLocation()) ? 131071 : 524287); + if (isSetFileSystemRootLocation()) + hashCode = hashCode * 8191 + fileSystemRootLocation.hashCode(); - boolean present_resourceSpecificCredentialStoreToken = true && (isSetResourceSpecificCredentialStoreToken()); - list.add(present_resourceSpecificCredentialStoreToken); - if (present_resourceSpecificCredentialStoreToken) - list.add(resourceSpecificCredentialStoreToken); + hashCode = hashCode * 8191 + ((isSetResourceSpecificCredentialStoreToken()) ? 131071 : 524287); + if (isSetResourceSpecificCredentialStoreToken()) + hashCode = hashCode * 8191 + resourceSpecificCredentialStoreToken.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -448,7 +416,7 @@ public class StoragePreference implements org.apache.thrift.TBase { + private static class StoragePreferenceStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, StoragePreference struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -669,19 +637,19 @@ public class StoragePreference implements org.apache.thrift.TBase { + private static class StoragePreferenceTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, StoragePreference struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.storageResourceId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetLoginUserName()) { optionals.set(0); } @@ -705,10 +673,10 @@ public class StoragePreference implements org.apache.thrift.TBase S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java index 1499cd8..600819f 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java @@ -16,41 +16,14 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.appcatalog.storageresource; -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.TException; -import org.apache.thrift.async.AsyncMethodCallback; -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"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) /** * Storage Resource Description * @@ -68,7 +41,7 @@ import org.slf4j.LoggerFactory; * * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class StorageResourceDescription 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("StorageResourceDescription"); @@ -78,17 +51,14 @@ public class StorageResourceDescription implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new StorageResourceDescriptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new StorageResourceDescriptionTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StorageResourceDescriptionStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StorageResourceDescriptionTupleSchemeFactory(); - private String storageResourceId; // required - private String hostName; // required - private String storageResourceDescription; // optional + private java.lang.String storageResourceId; // required + private java.lang.String hostName; // required + private java.lang.String storageResourceDescription; // optional private boolean enabled; // optional - private List dataMovementInterfaces; // optional + private java.util.List dataMovementInterfaces; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -98,10 +68,10 @@ public class StorageResourceDescription implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -132,21 +102,21 @@ public class StorageResourceDescription implements org.apache.thrift.TBase metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.STORAGE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("storageResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -178,7 +148,7 @@ public class StorageResourceDescription implements org.apache.thrift.TBase __this__dataMovementInterfaces = new ArrayList(other.dataMovementInterfaces.size()); + java.util.List __this__dataMovementInterfaces = new java.util.ArrayList(other.dataMovementInterfaces.size()); for (org.apache.airavata.model.data.movement.DataMovementInterface other_element : other.dataMovementInterfaces) { __this__dataMovementInterfaces.add(new org.apache.airavata.model.data.movement.DataMovementInterface(other_element)); } @@ -235,11 +205,11 @@ public class StorageResourceDescription implements org.apache.thrift.TBase(); + this.dataMovementInterfaces = new java.util.ArrayList(); } this.dataMovementInterfaces.add(elem); } - public List getDataMovementInterfaces() { + public java.util.List getDataMovementInterfaces() { return this.dataMovementInterfaces; } - public void setDataMovementInterfaces(List dataMovementInterfaces) { + public void setDataMovementInterfaces(java.util.List dataMovementInterfaces) { this.dataMovementInterfaces = dataMovementInterfaces; } @@ -364,13 +334,13 @@ public class StorageResourceDescription implements org.apache.thrift.TBase)value); + setDataMovementInterfaces((java.util.List)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case STORAGE_RESOURCE_ID: return getStorageResourceId(); @@ -427,13 +397,13 @@ public class StorageResourceDescription implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_storageResourceId = true && (isSetStorageResourceId()); - list.add(present_storageResourceId); - if (present_storageResourceId) - list.add(storageResourceId); + hashCode = hashCode * 8191 + ((isSetStorageResourceId()) ? 131071 : 524287); + if (isSetStorageResourceId()) + hashCode = hashCode * 8191 + storageResourceId.hashCode(); - boolean present_hostName = true && (isSetHostName()); - list.add(present_hostName); - if (present_hostName) - list.add(hostName); + hashCode = hashCode * 8191 + ((isSetHostName()) ? 131071 : 524287); + if (isSetHostName()) + hashCode = hashCode * 8191 + hostName.hashCode(); - boolean present_storageResourceDescription = true && (isSetStorageResourceDescription()); - list.add(present_storageResourceDescription); - if (present_storageResourceDescription) - list.add(storageResourceDescription); + hashCode = hashCode * 8191 + ((isSetStorageResourceDescription()) ? 131071 : 524287); + if (isSetStorageResourceDescription()) + hashCode = hashCode * 8191 + storageResourceDescription.hashCode(); - boolean present_enabled = true && (isSetEnabled()); - list.add(present_enabled); - if (present_enabled) - list.add(enabled); + hashCode = hashCode * 8191 + ((isSetEnabled()) ? 131071 : 524287); + if (isSetEnabled()) + hashCode = hashCode * 8191 + ((enabled) ? 131071 : 524287); - boolean present_dataMovementInterfaces = true && (isSetDataMovementInterfaces()); - list.add(present_dataMovementInterfaces); - if (present_dataMovementInterfaces) - list.add(dataMovementInterfaces); + hashCode = hashCode * 8191 + ((isSetDataMovementInterfaces()) ? 131071 : 524287); + if (isSetDataMovementInterfaces()) + hashCode = hashCode * 8191 + dataMovementInterfaces.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -552,7 +519,7 @@ public class StorageResourceDescription implements org.apache.thrift.TBase { + private static class StorageResourceDescriptionStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, StorageResourceDescription struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -752,7 +719,7 @@ public class StorageResourceDescription implements org.apache.thrift.TBase(_list0.size); + struct.dataMovementInterfaces = new java.util.ArrayList(_list0.size); org.apache.airavata.model.data.movement.DataMovementInterface _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { @@ -822,20 +789,20 @@ public class StorageResourceDescription implements org.apache.thrift.TBase { + private static class StorageResourceDescriptionTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, StorageResourceDescription struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.storageResourceId); oprot.writeString(struct.hostName); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetStorageResourceDescription()) { optionals.set(0); } @@ -865,12 +832,12 @@ public class StorageResourceDescription implements org.apache.thrift.TBase(_list5.size); + struct.dataMovementInterfaces = new java.util.ArrayList(_list5.size); org.apache.airavata.model.data.movement.DataMovementInterface _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { @@ -896,5 +863,8 @@ public class StorageResourceDescription implements org.apache.thrift.TBase S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java index 276b7ca..c4a179c 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java @@ -16,41 +16,14 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.appcatalog.userresourceprofile; -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.TException; -import org.apache.thrift.async.AsyncMethodCallback; -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"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) /** * User specific preferences for a Computer Resource * @@ -78,7 +51,7 @@ import org.slf4j.LoggerFactory; * default credential store. * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class UserComputeResourcePreference 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("UserComputeResourcePreference"); @@ -93,20 +66,17 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new UserComputeResourcePreferenceStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UserComputeResourcePreferenceTupleSchemeFactory()); - } - - private String computeResourceId; // required - private String loginUserName; // optional - private String preferredBatchQueue; // optional - private String scratchLocation; // optional - private String allocationProjectNumber; // optional - private String resourceSpecificCredentialStoreToken; // optional - private String qualityOfService; // optional - private String reservation; // optional + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UserComputeResourcePreferenceStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserComputeResourcePreferenceTupleSchemeFactory(); + + private java.lang.String computeResourceId; // required + private java.lang.String loginUserName; // optional + private java.lang.String preferredBatchQueue; // optional + private java.lang.String scratchLocation; // optional + private java.lang.String allocationProjectNumber; // optional + private java.lang.String resourceSpecificCredentialStoreToken; // optional + private java.lang.String qualityOfService; // optional + private java.lang.String reservation; // optional private long reservationStartTime; // optional private long reservationEndTime; // optional @@ -123,10 +93,10 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -167,21 +137,21 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LOGIN_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginUserName", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -223,7 +193,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_computeResourceId = true && (isSetComputeResourceId()); - list.add(present_computeResourceId); - if (present_computeResourceId) - list.add(computeResourceId); + hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 : 524287); + if (isSetComputeResourceId()) + hashCode = hashCode * 8191 + computeResourceId.hashCode(); - boolean present_loginUserName = true && (isSetLoginUserName()); - list.add(present_loginUserName); - if (present_loginUserName) - list.add(loginUserName); + hashCode = hashCode * 8191 + ((isSetLoginUserName()) ? 131071 : 524287); + if (isSetLoginUserName()) + hashCode = hashCode * 8191 + loginUserName.hashCode(); - boolean present_preferredBatchQueue = true && (isSetPreferredBatchQueue()); - list.add(present_preferredBatchQueue); - if (present_preferredBatchQueue) - list.add(preferredBatchQueue); + hashCode = hashCode * 8191 + ((isSetPreferredBatchQueue()) ? 131071 : 524287); + if (isSetPreferredBatchQueue()) + hashCode = hashCode * 8191 + preferredBatchQueue.hashCode(); - boolean present_scratchLocation = true && (isSetScratchLocation()); - list.add(present_scratchLocation); - if (present_scratchLocation) - list.add(scratchLocation); + hashCode = hashCode * 8191 + ((isSetScratchLocation()) ? 131071 : 524287); + if (isSetScratchLocation()) + hashCode = hashCode * 8191 + scratchLocation.hashCode(); - boolean present_allocationProjectNumber = true && (isSetAllocationProjectNumber()); - list.add(present_allocationProjectNumber); - if (present_allocationProjectNumber) - list.add(allocationProjectNumber); + hashCode = hashCode * 8191 + ((isSetAllocationProjectNumber()) ? 131071 : 524287); + if (isSetAllocationProjectNumber()) + hashCode = hashCode * 8191 + allocationProjectNumber.hashCode(); - boolean present_resourceSpecificCredentialStoreToken = true && (isSetResourceSpecificCredentialStoreToken()); - list.add(present_resourceSpecificCredentialStoreToken); - if (present_resourceSpecificCredentialStoreToken) - list.add(resourceSpecificCredentialStoreToken); + hashCode = hashCode * 8191 + ((isSetResourceSpecificCredentialStoreToken()) ? 131071 : 524287); + if (isSetResourceSpecificCredentialStoreToken()) + hashCode = hashCode * 8191 + resourceSpecificCredentialStoreToken.hashCode(); - boolean present_qualityOfService = true && (isSetQualityOfService()); - list.add(present_qualityOfService); - if (present_qualityOfService) - list.add(qualityOfService); + hashCode = hashCode * 8191 + ((isSetQualityOfService()) ? 131071 : 524287); + if (isSetQualityOfService()) + hashCode = hashCode * 8191 + qualityOfService.hashCode(); - boolean present_reservation = true && (isSetReservation()); - list.add(present_reservation); - if (present_reservation) - list.add(reservation); + hashCode = hashCode * 8191 + ((isSetReservation()) ? 131071 : 524287); + if (isSetReservation()) + hashCode = hashCode * 8191 + reservation.hashCode(); - boolean present_reservationStartTime = true && (isSetReservationStartTime()); - list.add(present_reservationStartTime); - if (present_reservationStartTime) - list.add(reservationStartTime); + hashCode = hashCode * 8191 + ((isSetReservationStartTime()) ? 131071 : 524287); + if (isSetReservationStartTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationStartTime); - boolean present_reservationEndTime = true && (isSetReservationEndTime()); - list.add(present_reservationEndTime); - if (present_reservationEndTime) - list.add(reservationEndTime); + hashCode = hashCode * 8191 + ((isSetReservationEndTime()) ? 131071 : 524287); + if (isSetReservationEndTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationEndTime); - return list.hashCode(); + return hashCode; } @Override @@ -841,7 +803,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase { + private static class UserComputeResourcePreferenceStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, UserComputeResourcePreference struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1262,19 +1224,19 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase { + private static class UserComputeResourcePreferenceTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, UserComputeResourcePreference struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.computeResourceId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetLoginUserName()) { optionals.set(0); } @@ -1334,10 +1296,10 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }