/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.userprofile.cpi; 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)") public class UserProfileService { public interface Iface { public String addUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public boolean updateUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public org.apache.airavata.model.user.UserProfile getUserProfileById(String userId, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public boolean deleteUserProfile(String userId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public List<org.apache.airavata.model.user.UserProfile> getAllUserProfilesInGateway(String gatewayId, int offset, int limit) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public org.apache.airavata.model.user.UserProfile getUserProfileByName(String userName, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; public boolean doesUserExist(String userName, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException; } public interface AsyncIface { public void addUserProfile(org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateUserProfile(org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUserProfileById(String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteUserProfile(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllUserProfilesInGateway(String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUserProfileByName(String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void doesUserExist(String userName, String gatewayId, 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<Client> { 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 String addUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_addUserProfile(userProfile); return recv_addUserProfile(); } public void send_addUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException { addUserProfile_args args = new addUserProfile_args(); args.setUserProfile(userProfile); sendBase("addUserProfile", args); } public String recv_addUserProfile() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { addUserProfile_result result = new addUserProfile_result(); receiveBase(result, "addUserProfile"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addUserProfile failed: unknown result"); } public boolean updateUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_updateUserProfile(userProfile); return recv_updateUserProfile(); } public void send_updateUserProfile(org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException { updateUserProfile_args args = new updateUserProfile_args(); args.setUserProfile(userProfile); sendBase("updateUserProfile", args); } public boolean recv_updateUserProfile() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { updateUserProfile_result result = new updateUserProfile_result(); receiveBase(result, "updateUserProfile"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateUserProfile failed: unknown result"); } public org.apache.airavata.model.user.UserProfile getUserProfileById(String userId, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_getUserProfileById(userId, gatewayId); return recv_getUserProfileById(); } public void send_getUserProfileById(String userId, String gatewayId) throws org.apache.thrift.TException { getUserProfileById_args args = new getUserProfileById_args(); args.setUserId(userId); args.setGatewayId(gatewayId); sendBase("getUserProfileById", args); } public org.apache.airavata.model.user.UserProfile recv_getUserProfileById() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { getUserProfileById_result result = new getUserProfileById_result(); receiveBase(result, "getUserProfileById"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserProfileById failed: unknown result"); } public boolean deleteUserProfile(String userId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_deleteUserProfile(userId); return recv_deleteUserProfile(); } public void send_deleteUserProfile(String userId) throws org.apache.thrift.TException { deleteUserProfile_args args = new deleteUserProfile_args(); args.setUserId(userId); sendBase("deleteUserProfile", args); } public boolean recv_deleteUserProfile() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { deleteUserProfile_result result = new deleteUserProfile_result(); receiveBase(result, "deleteUserProfile"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteUserProfile failed: unknown result"); } public List<org.apache.airavata.model.user.UserProfile> getAllUserProfilesInGateway(String gatewayId, int offset, int limit) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_getAllUserProfilesInGateway(gatewayId, offset, limit); return recv_getAllUserProfilesInGateway(); } public void send_getAllUserProfilesInGateway(String gatewayId, int offset, int limit) throws org.apache.thrift.TException { getAllUserProfilesInGateway_args args = new getAllUserProfilesInGateway_args(); args.setGatewayId(gatewayId); args.setOffset(offset); args.setLimit(limit); sendBase("getAllUserProfilesInGateway", args); } public List<org.apache.airavata.model.user.UserProfile> recv_getAllUserProfilesInGateway() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); receiveBase(result, "getAllUserProfilesInGateway"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserProfilesInGateway failed: unknown result"); } public org.apache.airavata.model.user.UserProfile getUserProfileByName(String userName, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_getUserProfileByName(userName, gatewayId); return recv_getUserProfileByName(); } public void send_getUserProfileByName(String userName, String gatewayId) throws org.apache.thrift.TException { getUserProfileByName_args args = new getUserProfileByName_args(); args.setUserName(userName); args.setGatewayId(gatewayId); sendBase("getUserProfileByName", args); } public org.apache.airavata.model.user.UserProfile recv_getUserProfileByName() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { getUserProfileByName_result result = new getUserProfileByName_result(); receiveBase(result, "getUserProfileByName"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserProfileByName failed: unknown result"); } public boolean doesUserExist(String userName, String gatewayId) throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { send_doesUserExist(userName, gatewayId); return recv_doesUserExist(); } public void send_doesUserExist(String userName, String gatewayId) throws org.apache.thrift.TException { doesUserExist_args args = new doesUserExist_args(); args.setUserName(userName); args.setGatewayId(gatewayId); sendBase("doesUserExist", args); } public boolean recv_doesUserExist() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, org.apache.thrift.TException { doesUserExist_result result = new doesUserExist_result(); receiveBase(result, "doesUserExist"); if (result.isSetSuccess()) { return result.success; } if (result.userProfileException != null) { throw result.userProfileException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserExist failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { 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 addUserProfile(org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addUserProfile_call method_call = new addUserProfile_call(userProfile, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.user.UserProfile userProfile; public addUserProfile_call(org.apache.airavata.model.user.UserProfile userProfile, 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.userProfile = userProfile; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); addUserProfile_args args = new addUserProfile_args(); args.setUserProfile(userProfile); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_addUserProfile(); } } public void updateUserProfile(org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); updateUserProfile_call method_call = new updateUserProfile_call(userProfile, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.user.UserProfile userProfile; public updateUserProfile_call(org.apache.airavata.model.user.UserProfile userProfile, 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.userProfile = userProfile; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); updateUserProfile_args args = new updateUserProfile_args(); args.setUserProfile(userProfile); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_updateUserProfile(); } } public void getUserProfileById(String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUserProfileById_call method_call = new getUserProfileById_call(userId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserProfileById_call extends org.apache.thrift.async.TAsyncMethodCall { private String userId; private String gatewayId; public getUserProfileById_call(String userId, String gatewayId, 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.userId = userId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserProfileById", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserProfileById_args args = new getUserProfileById_args(); args.setUserId(userId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.user.UserProfile getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_getUserProfileById(); } } public void deleteUserProfile(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteUserProfile_call method_call = new deleteUserProfile_call(userId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { private String userId; public deleteUserProfile_call(String userId, 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.userId = userId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); deleteUserProfile_args args = new deleteUserProfile_args(); args.setUserId(userId); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_deleteUserProfile(); } } public void getAllUserProfilesInGateway(String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllUserProfilesInGateway_call method_call = new getAllUserProfilesInGateway_call(gatewayId, offset, limit, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllUserProfilesInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private String gatewayId; private int offset; private int limit; public getAllUserProfilesInGateway_call(String gatewayId, int offset, int limit, 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.gatewayId = gatewayId; this.offset = offset; this.limit = limit; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserProfilesInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllUserProfilesInGateway_args args = new getAllUserProfilesInGateway_args(); args.setGatewayId(gatewayId); args.setOffset(offset); args.setLimit(limit); args.write(prot); prot.writeMessageEnd(); } public List<org.apache.airavata.model.user.UserProfile> getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_getAllUserProfilesInGateway(); } } public void getUserProfileByName(String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUserProfileByName_call method_call = new getUserProfileByName_call(userName, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserProfileByName_call extends org.apache.thrift.async.TAsyncMethodCall { private String userName; private String gatewayId; public getUserProfileByName_call(String userName, String gatewayId, 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.userName = userName; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserProfileByName", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserProfileByName_args args = new getUserProfileByName_args(); args.setUserName(userName); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.user.UserProfile getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_getUserProfileByName(); } } public void doesUserExist(String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); doesUserExist_call method_call = new doesUserExist_call(userName, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class doesUserExist_call extends org.apache.thrift.async.TAsyncMethodCall { private String userName; private String gatewayId; public doesUserExist_call(String userName, String gatewayId, 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.userName = userName; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doesUserExist", org.apache.thrift.protocol.TMessageType.CALL, 0)); doesUserExist_args args = new doesUserExist_args(); args.setUserName(userName); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException, 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)).recv_doesUserExist(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("addUserProfile", new addUserProfile()); processMap.put("updateUserProfile", new updateUserProfile()); processMap.put("getUserProfileById", new getUserProfileById()); processMap.put("deleteUserProfile", new deleteUserProfile()); processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway()); processMap.put("getUserProfileByName", new getUserProfileByName()); processMap.put("doesUserExist", new doesUserExist()); return processMap; } public static class addUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addUserProfile_args> { public addUserProfile() { super("addUserProfile"); } public addUserProfile_args getEmptyArgsInstance() { return new addUserProfile_args(); } protected boolean isOneway() { return false; } public addUserProfile_result getResult(I iface, addUserProfile_args args) throws org.apache.thrift.TException { addUserProfile_result result = new addUserProfile_result(); try { result.success = iface.addUserProfile(args.userProfile); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class updateUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateUserProfile_args> { public updateUserProfile() { super("updateUserProfile"); } public updateUserProfile_args getEmptyArgsInstance() { return new updateUserProfile_args(); } protected boolean isOneway() { return false; } public updateUserProfile_result getResult(I iface, updateUserProfile_args args) throws org.apache.thrift.TException { updateUserProfile_result result = new updateUserProfile_result(); try { result.success = iface.updateUserProfile(args.userProfile); result.setSuccessIsSet(true); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class getUserProfileById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserProfileById_args> { public getUserProfileById() { super("getUserProfileById"); } public getUserProfileById_args getEmptyArgsInstance() { return new getUserProfileById_args(); } protected boolean isOneway() { return false; } public getUserProfileById_result getResult(I iface, getUserProfileById_args args) throws org.apache.thrift.TException { getUserProfileById_result result = new getUserProfileById_result(); try { result.success = iface.getUserProfileById(args.userId, args.gatewayId); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class deleteUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteUserProfile_args> { public deleteUserProfile() { super("deleteUserProfile"); } public deleteUserProfile_args getEmptyArgsInstance() { return new deleteUserProfile_args(); } protected boolean isOneway() { return false; } public deleteUserProfile_result getResult(I iface, deleteUserProfile_args args) throws org.apache.thrift.TException { deleteUserProfile_result result = new deleteUserProfile_result(); try { result.success = iface.deleteUserProfile(args.userId); result.setSuccessIsSet(true); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class getAllUserProfilesInGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserProfilesInGateway_args> { public getAllUserProfilesInGateway() { super("getAllUserProfilesInGateway"); } public getAllUserProfilesInGateway_args getEmptyArgsInstance() { return new getAllUserProfilesInGateway_args(); } protected boolean isOneway() { return false; } public getAllUserProfilesInGateway_result getResult(I iface, getAllUserProfilesInGateway_args args) throws org.apache.thrift.TException { getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); try { result.success = iface.getAllUserProfilesInGateway(args.gatewayId, args.offset, args.limit); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class getUserProfileByName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserProfileByName_args> { public getUserProfileByName() { super("getUserProfileByName"); } public getUserProfileByName_args getEmptyArgsInstance() { return new getUserProfileByName_args(); } protected boolean isOneway() { return false; } public getUserProfileByName_result getResult(I iface, getUserProfileByName_args args) throws org.apache.thrift.TException { getUserProfileByName_result result = new getUserProfileByName_result(); try { result.success = iface.getUserProfileByName(args.userName, args.gatewayId); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } public static class doesUserExist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doesUserExist_args> { public doesUserExist() { super("doesUserExist"); } public doesUserExist_args getEmptyArgsInstance() { return new doesUserExist_args(); } protected boolean isOneway() { return false; } public doesUserExist_result getResult(I iface, doesUserExist_args args) throws org.apache.thrift.TException { doesUserExist_result result = new doesUserExist_result(); try { result.success = iface.doesUserExist(args.userName, args.gatewayId); result.setSuccessIsSet(true); } catch (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { result.userProfileException = userProfileException; } return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("addUserProfile", new addUserProfile()); processMap.put("updateUserProfile", new updateUserProfile()); processMap.put("getUserProfileById", new getUserProfileById()); processMap.put("deleteUserProfile", new deleteUserProfile()); processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway()); processMap.put("getUserProfileByName", new getUserProfileByName()); processMap.put("doesUserExist", new doesUserExist()); return processMap; } public static class addUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserProfile_args, String> { public addUserProfile() { super("addUserProfile"); } public addUserProfile_args getEmptyArgsInstance() { return new addUserProfile_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { addUserProfile_result result = new addUserProfile_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; addUserProfile_result result = new addUserProfile_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, addUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.addUserProfile(args.userProfile,resultHandler); } } public static class updateUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserProfile_args, Boolean> { public updateUserProfile() { super("updateUserProfile"); } public updateUserProfile_args getEmptyArgsInstance() { return new updateUserProfile_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { updateUserProfile_result result = new updateUserProfile_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; updateUserProfile_result result = new updateUserProfile_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, updateUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.updateUserProfile(args.userProfile,resultHandler); } } public static class getUserProfileById<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProfileById_args, org.apache.airavata.model.user.UserProfile> { public getUserProfileById() { super("getUserProfileById"); } public getUserProfileById_args getEmptyArgsInstance() { return new getUserProfileById_args(); } public AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.user.UserProfile>() { public void onComplete(org.apache.airavata.model.user.UserProfile o) { getUserProfileById_result result = new getUserProfileById_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getUserProfileById_result result = new getUserProfileById_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getUserProfileById_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws TException { iface.getUserProfileById(args.userId, args.gatewayId,resultHandler); } } public static class deleteUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserProfile_args, Boolean> { public deleteUserProfile() { super("deleteUserProfile"); } public deleteUserProfile_args getEmptyArgsInstance() { return new deleteUserProfile_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { deleteUserProfile_result result = new deleteUserProfile_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deleteUserProfile_result result = new deleteUserProfile_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, deleteUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.deleteUserProfile(args.userId,resultHandler); } } public static class getAllUserProfilesInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserProfilesInGateway_args, List<org.apache.airavata.model.user.UserProfile>> { public getAllUserProfilesInGateway() { super("getAllUserProfilesInGateway"); } public getAllUserProfilesInGateway_args getEmptyArgsInstance() { return new getAllUserProfilesInGateway_args(); } public AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>>() { public void onComplete(List<org.apache.airavata.model.user.UserProfile> o) { getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllUserProfilesInGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws TException { iface.getAllUserProfilesInGateway(args.gatewayId, args.offset, args.limit,resultHandler); } } public static class getUserProfileByName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProfileByName_args, org.apache.airavata.model.user.UserProfile> { public getUserProfileByName() { super("getUserProfileByName"); } public getUserProfileByName_args getEmptyArgsInstance() { return new getUserProfileByName_args(); } public AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.user.UserProfile>() { public void onComplete(org.apache.airavata.model.user.UserProfile o) { getUserProfileByName_result result = new getUserProfileByName_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getUserProfileByName_result result = new getUserProfileByName_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getUserProfileByName_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws TException { iface.getUserProfileByName(args.userName, args.gatewayId,resultHandler); } } public static class doesUserExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserExist_args, Boolean> { public doesUserExist() { super("doesUserExist"); } public doesUserExist_args getEmptyArgsInstance() { return new doesUserExist_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { doesUserExist_result result = new doesUserExist_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; doesUserExist_result result = new doesUserExist_result(); if (e instanceof org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) { result.userProfileException = (org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException) e; result.setUserProfileExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, doesUserExist_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.doesUserExist(args.userName, args.gatewayId,resultHandler); } } } public static class addUserProfile_args implements org.apache.thrift.TBase<addUserProfile_args, addUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<addUserProfile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUserProfile_args"); private static final org.apache.thrift.protocol.TField USER_PROFILE_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfile", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addUserProfile_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addUserProfile_argsTupleSchemeFactory()); } public org.apache.airavata.model.user.UserProfile userProfile; // 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 { USER_PROFILE((short)1, "userProfile"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_PROFILE return USER_PROFILE; 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.USER_PROFILE, new org.apache.thrift.meta_data.FieldMetaData("userProfile", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUserProfile_args.class, metaDataMap); } public addUserProfile_args() { } public addUserProfile_args( org.apache.airavata.model.user.UserProfile userProfile) { this(); this.userProfile = userProfile; } /** * Performs a deep copy on <i>other</i>. */ public addUserProfile_args(addUserProfile_args other) { if (other.isSetUserProfile()) { this.userProfile = new org.apache.airavata.model.user.UserProfile(other.userProfile); } } public addUserProfile_args deepCopy() { return new addUserProfile_args(this); } @Override public void clear() { this.userProfile = null; } public org.apache.airavata.model.user.UserProfile getUserProfile() { return this.userProfile; } public addUserProfile_args setUserProfile(org.apache.airavata.model.user.UserProfile userProfile) { this.userProfile = userProfile; return this; } public void unsetUserProfile() { this.userProfile = null; } /** Returns true if field userProfile is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfile() { return this.userProfile != null; } public void setUserProfileIsSet(boolean value) { if (!value) { this.userProfile = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_PROFILE: if (value == null) { unsetUserProfile(); } else { setUserProfile((org.apache.airavata.model.user.UserProfile)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_PROFILE: return getUserProfile(); } 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 USER_PROFILE: return isSetUserProfile(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addUserProfile_args) return this.equals((addUserProfile_args)that); return false; } public boolean equals(addUserProfile_args that) { if (that == null) return false; boolean this_present_userProfile = true && this.isSetUserProfile(); boolean that_present_userProfile = true && that.isSetUserProfile(); if (this_present_userProfile || that_present_userProfile) { if (!(this_present_userProfile && that_present_userProfile)) return false; if (!this.userProfile.equals(that.userProfile)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userProfile = true && (isSetUserProfile()); list.add(present_userProfile); if (present_userProfile) list.add(userProfile); return list.hashCode(); } @Override public int compareTo(addUserProfile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserProfile()).compareTo(other.isSetUserProfile()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfile()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfile, other.userProfile); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("addUserProfile_args("); boolean first = true; sb.append("userProfile:"); if (this.userProfile == null) { sb.append("null"); } else { sb.append(this.userProfile); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userProfile == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userProfile' was not present! Struct: " + toString()); } // check for sub-struct validity if (userProfile != null) { userProfile.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 addUserProfile_argsStandardSchemeFactory implements SchemeFactory { public addUserProfile_argsStandardScheme getScheme() { return new addUserProfile_argsStandardScheme(); } } private static class addUserProfile_argsStandardScheme extends StandardScheme<addUserProfile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, addUserProfile_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: // USER_PROFILE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfile = new org.apache.airavata.model.user.UserProfile(); struct.userProfile.read(iprot); struct.setUserProfileIsSet(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, addUserProfile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userProfile != null) { oprot.writeFieldBegin(USER_PROFILE_FIELD_DESC); struct.userProfile.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addUserProfile_argsTupleSchemeFactory implements SchemeFactory { public addUserProfile_argsTupleScheme getScheme() { return new addUserProfile_argsTupleScheme(); } } private static class addUserProfile_argsTupleScheme extends TupleScheme<addUserProfile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.userProfile.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userProfile = new org.apache.airavata.model.user.UserProfile(); struct.userProfile.read(iprot); struct.setUserProfileIsSet(true); } } } public static class addUserProfile_result implements org.apache.thrift.TBase<addUserProfile_result, addUserProfile_result._Fields>, java.io.Serializable, Cloneable, Comparable<addUserProfile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUserProfile_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addUserProfile_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addUserProfile_resultTupleSchemeFactory()); } public String success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUserProfile_result.class, metaDataMap); } public addUserProfile_result() { } public addUserProfile_result( String success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public addUserProfile_result(addUserProfile_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public addUserProfile_result deepCopy() { return new addUserProfile_result(this); } @Override public void clear() { this.success = null; this.userProfileException = null; } public String getSuccess() { return this.success; } public addUserProfile_result setSuccess(String 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 org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public addUserProfile_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addUserProfile_result) return this.equals((addUserProfile_result)that); return false; } public boolean equals(addUserProfile_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; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(addUserProfile_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("addUserProfile_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 addUserProfile_resultStandardSchemeFactory implements SchemeFactory { public addUserProfile_resultStandardScheme getScheme() { return new addUserProfile_resultStandardScheme(); } } private static class addUserProfile_resultStandardScheme extends StandardScheme<addUserProfile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, addUserProfile_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.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, addUserProfile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addUserProfile_resultTupleSchemeFactory implements SchemeFactory { public addUserProfile_resultTupleScheme getScheme() { return new addUserProfile_resultTupleScheme(); } } private static class addUserProfile_resultTupleScheme extends TupleScheme<addUserProfile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class updateUserProfile_args implements org.apache.thrift.TBase<updateUserProfile_args, updateUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUserProfile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUserProfile_args"); private static final org.apache.thrift.protocol.TField USER_PROFILE_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfile", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new updateUserProfile_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new updateUserProfile_argsTupleSchemeFactory()); } public org.apache.airavata.model.user.UserProfile userProfile; // 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 { USER_PROFILE((short)1, "userProfile"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_PROFILE return USER_PROFILE; 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.USER_PROFILE, new org.apache.thrift.meta_data.FieldMetaData("userProfile", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUserProfile_args.class, metaDataMap); } public updateUserProfile_args() { } public updateUserProfile_args( org.apache.airavata.model.user.UserProfile userProfile) { this(); this.userProfile = userProfile; } /** * Performs a deep copy on <i>other</i>. */ public updateUserProfile_args(updateUserProfile_args other) { if (other.isSetUserProfile()) { this.userProfile = new org.apache.airavata.model.user.UserProfile(other.userProfile); } } public updateUserProfile_args deepCopy() { return new updateUserProfile_args(this); } @Override public void clear() { this.userProfile = null; } public org.apache.airavata.model.user.UserProfile getUserProfile() { return this.userProfile; } public updateUserProfile_args setUserProfile(org.apache.airavata.model.user.UserProfile userProfile) { this.userProfile = userProfile; return this; } public void unsetUserProfile() { this.userProfile = null; } /** Returns true if field userProfile is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfile() { return this.userProfile != null; } public void setUserProfileIsSet(boolean value) { if (!value) { this.userProfile = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_PROFILE: if (value == null) { unsetUserProfile(); } else { setUserProfile((org.apache.airavata.model.user.UserProfile)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_PROFILE: return getUserProfile(); } 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 USER_PROFILE: return isSetUserProfile(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof updateUserProfile_args) return this.equals((updateUserProfile_args)that); return false; } public boolean equals(updateUserProfile_args that) { if (that == null) return false; boolean this_present_userProfile = true && this.isSetUserProfile(); boolean that_present_userProfile = true && that.isSetUserProfile(); if (this_present_userProfile || that_present_userProfile) { if (!(this_present_userProfile && that_present_userProfile)) return false; if (!this.userProfile.equals(that.userProfile)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userProfile = true && (isSetUserProfile()); list.add(present_userProfile); if (present_userProfile) list.add(userProfile); return list.hashCode(); } @Override public int compareTo(updateUserProfile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserProfile()).compareTo(other.isSetUserProfile()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfile()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfile, other.userProfile); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("updateUserProfile_args("); boolean first = true; sb.append("userProfile:"); if (this.userProfile == null) { sb.append("null"); } else { sb.append(this.userProfile); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userProfile == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userProfile' was not present! Struct: " + toString()); } // check for sub-struct validity if (userProfile != null) { userProfile.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 updateUserProfile_argsStandardSchemeFactory implements SchemeFactory { public updateUserProfile_argsStandardScheme getScheme() { return new updateUserProfile_argsStandardScheme(); } } private static class updateUserProfile_argsStandardScheme extends StandardScheme<updateUserProfile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, updateUserProfile_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: // USER_PROFILE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfile = new org.apache.airavata.model.user.UserProfile(); struct.userProfile.read(iprot); struct.setUserProfileIsSet(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, updateUserProfile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userProfile != null) { oprot.writeFieldBegin(USER_PROFILE_FIELD_DESC); struct.userProfile.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateUserProfile_argsTupleSchemeFactory implements SchemeFactory { public updateUserProfile_argsTupleScheme getScheme() { return new updateUserProfile_argsTupleScheme(); } } private static class updateUserProfile_argsTupleScheme extends TupleScheme<updateUserProfile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.userProfile.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userProfile = new org.apache.airavata.model.user.UserProfile(); struct.userProfile.read(iprot); struct.setUserProfileIsSet(true); } } } public static class updateUserProfile_result implements org.apache.thrift.TBase<updateUserProfile_result, updateUserProfile_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUserProfile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUserProfile_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new updateUserProfile_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new updateUserProfile_resultTupleSchemeFactory()); } public boolean success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUserProfile_result.class, metaDataMap); } public updateUserProfile_result() { } public updateUserProfile_result( boolean success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; setSuccessIsSet(true); this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public updateUserProfile_result(updateUserProfile_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public updateUserProfile_result deepCopy() { return new updateUserProfile_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.userProfileException = null; } public boolean isSuccess() { return this.success; } public updateUserProfile_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public updateUserProfile_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof updateUserProfile_result) return this.equals((updateUserProfile_result)that); return false; } public boolean equals(updateUserProfile_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(updateUserProfile_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("updateUserProfile_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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 updateUserProfile_resultStandardSchemeFactory implements SchemeFactory { public updateUserProfile_resultStandardScheme getScheme() { return new updateUserProfile_resultStandardScheme(); } } private static class updateUserProfile_resultStandardScheme extends StandardScheme<updateUserProfile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, updateUserProfile_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.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, updateUserProfile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateUserProfile_resultTupleSchemeFactory implements SchemeFactory { public updateUserProfile_resultTupleScheme getScheme() { return new updateUserProfile_resultTupleScheme(); } } private static class updateUserProfile_resultTupleScheme extends TupleScheme<updateUserProfile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class getUserProfileById_args implements org.apache.thrift.TBase<getUserProfileById_args, getUserProfileById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileById_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileById_args"); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getUserProfileById_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUserProfileById_argsTupleSchemeFactory()); } public String userId; // required public String gatewayId; // 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 { USER_ID((short)1, "userId"), GATEWAY_ID((short)2, "gatewayId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_ID return USER_ID; case 2: // GATEWAY_ID return GATEWAY_ID; 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileById_args.class, metaDataMap); } public getUserProfileById_args() { } public getUserProfileById_args( String userId, String gatewayId) { this(); this.userId = userId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getUserProfileById_args(getUserProfileById_args other) { if (other.isSetUserId()) { this.userId = other.userId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getUserProfileById_args deepCopy() { return new getUserProfileById_args(this); } @Override public void clear() { this.userId = null; this.gatewayId = null; } public String getUserId() { return this.userId; } public getUserProfileById_args setUserId(String userId) { this.userId = userId; return this; } public void unsetUserId() { this.userId = null; } /** Returns true if field userId is set (has been assigned a value) and false otherwise */ public boolean isSetUserId() { return this.userId != null; } public void setUserIdIsSet(boolean value) { if (!value) { this.userId = null; } } public String getGatewayId() { return this.gatewayId; } public getUserProfileById_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } public void unsetGatewayId() { this.gatewayId = null; } /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ public boolean isSetGatewayId() { return this.gatewayId != null; } public void setGatewayIdIsSet(boolean value) { if (!value) { this.gatewayId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_ID: if (value == null) { unsetUserId(); } else { setUserId((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_ID: return getUserId(); case GATEWAY_ID: return getGatewayId(); } 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 USER_ID: return isSetUserId(); case GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getUserProfileById_args) return this.equals((getUserProfileById_args)that); return false; } public boolean equals(getUserProfileById_args that) { if (that == null) return false; boolean this_present_userId = true && this.isSetUserId(); boolean that_present_userId = true && that.isSetUserId(); if (this_present_userId || that_present_userId) { if (!(this_present_userId && that_present_userId)) return false; if (!this.userId.equals(that.userId)) return false; } boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { if (!(this_present_gatewayId && that_present_gatewayId)) return false; if (!this.gatewayId.equals(that.gatewayId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userId = true && (isSetUserId()); list.add(present_userId); if (present_userId) list.add(userId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getUserProfileById_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); if (lastComparison != 0) { return lastComparison; } if (isSetUserId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getUserProfileById_args("); boolean first = true; sb.append("userId:"); if (this.userId == null) { sb.append("null"); } else { sb.append(this.userId); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getUserProfileById_argsStandardSchemeFactory implements SchemeFactory { public getUserProfileById_argsStandardScheme getScheme() { return new getUserProfileById_argsStandardScheme(); } } private static class getUserProfileById_argsStandardScheme extends StandardScheme<getUserProfileById_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileById_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: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(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, getUserProfileById_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userId != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userId); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserProfileById_argsTupleSchemeFactory implements SchemeFactory { public getUserProfileById_argsTupleScheme getScheme() { return new getUserProfileById_argsTupleScheme(); } } private static class getUserProfileById_argsTupleScheme extends TupleScheme<getUserProfileById_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.userId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userId = iprot.readString(); struct.setUserIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getUserProfileById_result implements org.apache.thrift.TBase<getUserProfileById_result, getUserProfileById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileById_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileById_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 org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getUserProfileById_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUserProfileById_resultTupleSchemeFactory()); } public org.apache.airavata.model.user.UserProfile success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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, org.apache.airavata.model.user.UserProfile.class))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileById_result.class, metaDataMap); } public getUserProfileById_result() { } public getUserProfileById_result( org.apache.airavata.model.user.UserProfile success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public getUserProfileById_result(getUserProfileById_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.user.UserProfile(other.success); } if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public getUserProfileById_result deepCopy() { return new getUserProfileById_result(this); } @Override public void clear() { this.success = null; this.userProfileException = null; } public org.apache.airavata.model.user.UserProfile getSuccess() { return this.success; } public getUserProfileById_result setSuccess(org.apache.airavata.model.user.UserProfile 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 org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public getUserProfileById_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.user.UserProfile)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getUserProfileById_result) return this.equals((getUserProfileById_result)that); return false; } public boolean equals(getUserProfileById_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; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(getUserProfileById_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getUserProfileById_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 getUserProfileById_resultStandardSchemeFactory implements SchemeFactory { public getUserProfileById_resultStandardScheme getScheme() { return new getUserProfileById_resultStandardScheme(); } } private static class getUserProfileById_resultStandardScheme extends StandardScheme<getUserProfileById_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileById_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 org.apache.airavata.model.user.UserProfile(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, getUserProfileById_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(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserProfileById_resultTupleSchemeFactory implements SchemeFactory { public getUserProfileById_resultTupleScheme getScheme() { return new getUserProfileById_resultTupleScheme(); } } private static class getUserProfileById_resultTupleScheme extends TupleScheme<getUserProfileById_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.user.UserProfile(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class deleteUserProfile_args implements org.apache.thrift.TBase<deleteUserProfile_args, deleteUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUserProfile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteUserProfile_args"); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteUserProfile_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteUserProfile_argsTupleSchemeFactory()); } public String userId; // 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 { USER_ID((short)1, "userId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_ID return USER_ID; 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteUserProfile_args.class, metaDataMap); } public deleteUserProfile_args() { } public deleteUserProfile_args( String userId) { this(); this.userId = userId; } /** * Performs a deep copy on <i>other</i>. */ public deleteUserProfile_args(deleteUserProfile_args other) { if (other.isSetUserId()) { this.userId = other.userId; } } public deleteUserProfile_args deepCopy() { return new deleteUserProfile_args(this); } @Override public void clear() { this.userId = null; } public String getUserId() { return this.userId; } public deleteUserProfile_args setUserId(String userId) { this.userId = userId; return this; } public void unsetUserId() { this.userId = null; } /** Returns true if field userId is set (has been assigned a value) and false otherwise */ public boolean isSetUserId() { return this.userId != null; } public void setUserIdIsSet(boolean value) { if (!value) { this.userId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_ID: if (value == null) { unsetUserId(); } else { setUserId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_ID: return getUserId(); } 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 USER_ID: return isSetUserId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteUserProfile_args) return this.equals((deleteUserProfile_args)that); return false; } public boolean equals(deleteUserProfile_args that) { if (that == null) return false; boolean this_present_userId = true && this.isSetUserId(); boolean that_present_userId = true && that.isSetUserId(); if (this_present_userId || that_present_userId) { if (!(this_present_userId && that_present_userId)) return false; if (!this.userId.equals(that.userId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userId = true && (isSetUserId()); list.add(present_userId); if (present_userId) list.add(userId); return list.hashCode(); } @Override public int compareTo(deleteUserProfile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); if (lastComparison != 0) { return lastComparison; } if (isSetUserId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deleteUserProfile_args("); boolean first = true; sb.append("userId:"); if (this.userId == null) { sb.append("null"); } else { sb.append(this.userId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString()); } // 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 deleteUserProfile_argsStandardSchemeFactory implements SchemeFactory { public deleteUserProfile_argsStandardScheme getScheme() { return new deleteUserProfile_argsStandardScheme(); } } private static class deleteUserProfile_argsStandardScheme extends StandardScheme<deleteUserProfile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteUserProfile_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: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(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, deleteUserProfile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userId != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteUserProfile_argsTupleSchemeFactory implements SchemeFactory { public deleteUserProfile_argsTupleScheme getScheme() { return new deleteUserProfile_argsTupleScheme(); } } private static class deleteUserProfile_argsTupleScheme extends TupleScheme<deleteUserProfile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.userId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userId = iprot.readString(); struct.setUserIdIsSet(true); } } } public static class deleteUserProfile_result implements org.apache.thrift.TBase<deleteUserProfile_result, deleteUserProfile_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUserProfile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteUserProfile_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteUserProfile_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteUserProfile_resultTupleSchemeFactory()); } public boolean success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteUserProfile_result.class, metaDataMap); } public deleteUserProfile_result() { } public deleteUserProfile_result( boolean success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; setSuccessIsSet(true); this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public deleteUserProfile_result(deleteUserProfile_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public deleteUserProfile_result deepCopy() { return new deleteUserProfile_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.userProfileException = null; } public boolean isSuccess() { return this.success; } public deleteUserProfile_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public deleteUserProfile_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteUserProfile_result) return this.equals((deleteUserProfile_result)that); return false; } public boolean equals(deleteUserProfile_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(deleteUserProfile_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deleteUserProfile_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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 deleteUserProfile_resultStandardSchemeFactory implements SchemeFactory { public deleteUserProfile_resultStandardScheme getScheme() { return new deleteUserProfile_resultStandardScheme(); } } private static class deleteUserProfile_resultStandardScheme extends StandardScheme<deleteUserProfile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteUserProfile_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.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, deleteUserProfile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteUserProfile_resultTupleSchemeFactory implements SchemeFactory { public deleteUserProfile_resultTupleScheme getScheme() { return new deleteUserProfile_resultTupleScheme(); } } private static class deleteUserProfile_resultTupleScheme extends TupleScheme<deleteUserProfile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class getAllUserProfilesInGateway_args implements org.apache.thrift.TBase<getAllUserProfilesInGateway_args, getAllUserProfilesInGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserProfilesInGateway_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserProfilesInGateway_args"); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllUserProfilesInGateway_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllUserProfilesInGateway_argsTupleSchemeFactory()); } public String gatewayId; // required public int offset; // required public int limit; // 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 { GATEWAY_ID((short)1, "gatewayId"), OFFSET((short)2, "offset"), LIMIT((short)3, "limit"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // GATEWAY_ID return GATEWAY_ID; case 2: // OFFSET return OFFSET; case 3: // LIMIT return LIMIT; 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 private static final int __OFFSET_ISSET_ID = 0; private static final int __LIMIT_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserProfilesInGateway_args.class, metaDataMap); } public getAllUserProfilesInGateway_args() { } public getAllUserProfilesInGateway_args( String gatewayId, int offset, int limit) { this(); this.gatewayId = gatewayId; this.offset = offset; setOffsetIsSet(true); this.limit = limit; setLimitIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public getAllUserProfilesInGateway_args(getAllUserProfilesInGateway_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } this.offset = other.offset; this.limit = other.limit; } public getAllUserProfilesInGateway_args deepCopy() { return new getAllUserProfilesInGateway_args(this); } @Override public void clear() { this.gatewayId = null; setOffsetIsSet(false); this.offset = 0; setLimitIsSet(false); this.limit = 0; } public String getGatewayId() { return this.gatewayId; } public getAllUserProfilesInGateway_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } public void unsetGatewayId() { this.gatewayId = null; } /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ public boolean isSetGatewayId() { return this.gatewayId != null; } public void setGatewayIdIsSet(boolean value) { if (!value) { this.gatewayId = null; } } public int getOffset() { return this.offset; } public getAllUserProfilesInGateway_args setOffset(int offset) { this.offset = offset; setOffsetIsSet(true); return this; } public void unsetOffset() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID); } /** Returns true if field offset is set (has been assigned a value) and false otherwise */ public boolean isSetOffset() { return EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID); } public void setOffsetIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value); } public int getLimit() { return this.limit; } public getAllUserProfilesInGateway_args setLimit(int limit) { this.limit = limit; setLimitIsSet(true); return this; } public void unsetLimit() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMIT_ISSET_ID); } /** Returns true if field limit is set (has been assigned a value) and false otherwise */ public boolean isSetLimit() { return EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID); } public void setLimitIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; case OFFSET: if (value == null) { unsetOffset(); } else { setOffset((Integer)value); } break; case LIMIT: if (value == null) { unsetLimit(); } else { setLimit((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case GATEWAY_ID: return getGatewayId(); case OFFSET: return getOffset(); case LIMIT: return getLimit(); } 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 GATEWAY_ID: return isSetGatewayId(); case OFFSET: return isSetOffset(); case LIMIT: return isSetLimit(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllUserProfilesInGateway_args) return this.equals((getAllUserProfilesInGateway_args)that); return false; } public boolean equals(getAllUserProfilesInGateway_args that) { if (that == null) return false; boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { if (!(this_present_gatewayId && that_present_gatewayId)) return false; if (!this.gatewayId.equals(that.gatewayId)) return false; } boolean this_present_offset = true; boolean that_present_offset = true; if (this_present_offset || that_present_offset) { if (!(this_present_offset && that_present_offset)) return false; if (this.offset != that.offset) return false; } boolean this_present_limit = true; boolean that_present_limit = true; if (this_present_limit || that_present_limit) { if (!(this_present_limit && that_present_limit)) return false; if (this.limit != that.limit) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); boolean present_offset = true; list.add(present_offset); if (present_offset) list.add(offset); boolean present_limit = true; list.add(present_limit); if (present_limit) list.add(limit); return list.hashCode(); } @Override public int compareTo(getAllUserProfilesInGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset()); if (lastComparison != 0) { return lastComparison; } if (isSetOffset()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLimit()).compareTo(other.isSetLimit()); if (lastComparison != 0) { return lastComparison; } if (isSetLimit()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getAllUserProfilesInGateway_args("); boolean first = true; sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; if (!first) sb.append(", "); sb.append("offset:"); sb.append(this.offset); first = false; if (!first) sb.append(", "); sb.append("limit:"); sb.append(this.limit); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // alas, we cannot check 'offset' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'limit' because it's a primitive and you chose the non-beans generator. // 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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 getAllUserProfilesInGateway_argsStandardSchemeFactory implements SchemeFactory { public getAllUserProfilesInGateway_argsStandardScheme getScheme() { return new getAllUserProfilesInGateway_argsStandardScheme(); } } private static class getAllUserProfilesInGateway_argsStandardScheme extends StandardScheme<getAllUserProfilesInGateway_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUserProfilesInGateway_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: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OFFSET if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.offset = iprot.readI32(); struct.setOffsetIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // LIMIT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.limit = iprot.readI32(); struct.setLimitIsSet(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 if (!struct.isSetOffset()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'offset' was not found in serialized data! Struct: " + toString()); } if (!struct.isSetLimit()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'limit' was not found in serialized data! Struct: " + toString()); } struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getAllUserProfilesInGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(OFFSET_FIELD_DESC); oprot.writeI32(struct.offset); oprot.writeFieldEnd(); oprot.writeFieldBegin(LIMIT_FIELD_DESC); oprot.writeI32(struct.limit); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllUserProfilesInGateway_argsTupleSchemeFactory implements SchemeFactory { public getAllUserProfilesInGateway_argsTupleScheme getScheme() { return new getAllUserProfilesInGateway_argsTupleScheme(); } } private static class getAllUserProfilesInGateway_argsTupleScheme extends TupleScheme<getAllUserProfilesInGateway_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.gatewayId); oprot.writeI32(struct.offset); oprot.writeI32(struct.limit); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.offset = iprot.readI32(); struct.setOffsetIsSet(true); struct.limit = iprot.readI32(); struct.setLimitIsSet(true); } } } public static class getAllUserProfilesInGateway_result implements org.apache.thrift.TBase<getAllUserProfilesInGateway_result, getAllUserProfilesInGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserProfilesInGateway_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserProfilesInGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllUserProfilesInGateway_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllUserProfilesInGateway_resultTupleSchemeFactory()); } public List<org.apache.airavata.model.user.UserProfile> success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class)))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserProfilesInGateway_result.class, metaDataMap); } public getAllUserProfilesInGateway_result() { } public getAllUserProfilesInGateway_result( List<org.apache.airavata.model.user.UserProfile> success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public getAllUserProfilesInGateway_result(getAllUserProfilesInGateway_result other) { if (other.isSetSuccess()) { List<org.apache.airavata.model.user.UserProfile> __this__success = new ArrayList<org.apache.airavata.model.user.UserProfile>(other.success.size()); for (org.apache.airavata.model.user.UserProfile other_element : other.success) { __this__success.add(new org.apache.airavata.model.user.UserProfile(other_element)); } this.success = __this__success; } if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public getAllUserProfilesInGateway_result deepCopy() { return new getAllUserProfilesInGateway_result(this); } @Override public void clear() { this.success = null; this.userProfileException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<org.apache.airavata.model.user.UserProfile> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(org.apache.airavata.model.user.UserProfile elem) { if (this.success == null) { this.success = new ArrayList<org.apache.airavata.model.user.UserProfile>(); } this.success.add(elem); } public List<org.apache.airavata.model.user.UserProfile> getSuccess() { return this.success; } public getAllUserProfilesInGateway_result setSuccess(List<org.apache.airavata.model.user.UserProfile> 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 org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public getAllUserProfilesInGateway_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<org.apache.airavata.model.user.UserProfile>)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllUserProfilesInGateway_result) return this.equals((getAllUserProfilesInGateway_result)that); return false; } public boolean equals(getAllUserProfilesInGateway_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; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(getAllUserProfilesInGateway_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getAllUserProfilesInGateway_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 getAllUserProfilesInGateway_resultStandardSchemeFactory implements SchemeFactory { public getAllUserProfilesInGateway_resultStandardScheme getScheme() { return new getAllUserProfilesInGateway_resultStandardScheme(); } } private static class getAllUserProfilesInGateway_resultStandardScheme extends StandardScheme<getAllUserProfilesInGateway_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUserProfilesInGateway_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.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.success = new ArrayList<org.apache.airavata.model.user.UserProfile>(_list0.size); org.apache.airavata.model.user.UserProfile _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = new org.apache.airavata.model.user.UserProfile(); _elem1.read(iprot); struct.success.add(_elem1); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, getAllUserProfilesInGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (org.apache.airavata.model.user.UserProfile _iter3 : struct.success) { _iter3.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllUserProfilesInGateway_resultTupleSchemeFactory implements SchemeFactory { public getAllUserProfilesInGateway_resultTupleScheme getScheme() { return new getAllUserProfilesInGateway_resultTupleScheme(); } } private static class getAllUserProfilesInGateway_resultTupleScheme extends TupleScheme<getAllUserProfilesInGateway_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (org.apache.airavata.model.user.UserProfile _iter4 : struct.success) { _iter4.write(oprot); } } } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<org.apache.airavata.model.user.UserProfile>(_list5.size); org.apache.airavata.model.user.UserProfile _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new org.apache.airavata.model.user.UserProfile(); _elem6.read(iprot); struct.success.add(_elem6); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class getUserProfileByName_args implements org.apache.thrift.TBase<getUserProfileByName_args, getUserProfileByName_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileByName_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileByName_args"); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getUserProfileByName_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUserProfileByName_argsTupleSchemeFactory()); } public String userName; // required public String gatewayId; // 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 { USER_NAME((short)1, "userName"), GATEWAY_ID((short)2, "gatewayId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_NAME return USER_NAME; case 2: // GATEWAY_ID return GATEWAY_ID; 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileByName_args.class, metaDataMap); } public getUserProfileByName_args() { } public getUserProfileByName_args( String userName, String gatewayId) { this(); this.userName = userName; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getUserProfileByName_args(getUserProfileByName_args other) { if (other.isSetUserName()) { this.userName = other.userName; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getUserProfileByName_args deepCopy() { return new getUserProfileByName_args(this); } @Override public void clear() { this.userName = null; this.gatewayId = null; } public String getUserName() { return this.userName; } public getUserProfileByName_args setUserName(String userName) { this.userName = userName; return this; } public void unsetUserName() { this.userName = null; } /** Returns true if field userName is set (has been assigned a value) and false otherwise */ public boolean isSetUserName() { return this.userName != null; } public void setUserNameIsSet(boolean value) { if (!value) { this.userName = null; } } public String getGatewayId() { return this.gatewayId; } public getUserProfileByName_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } public void unsetGatewayId() { this.gatewayId = null; } /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ public boolean isSetGatewayId() { return this.gatewayId != null; } public void setGatewayIdIsSet(boolean value) { if (!value) { this.gatewayId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_NAME: if (value == null) { unsetUserName(); } else { setUserName((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_NAME: return getUserName(); case GATEWAY_ID: return getGatewayId(); } 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 USER_NAME: return isSetUserName(); case GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getUserProfileByName_args) return this.equals((getUserProfileByName_args)that); return false; } public boolean equals(getUserProfileByName_args that) { if (that == null) return false; boolean this_present_userName = true && this.isSetUserName(); boolean that_present_userName = true && that.isSetUserName(); if (this_present_userName || that_present_userName) { if (!(this_present_userName && that_present_userName)) return false; if (!this.userName.equals(that.userName)) return false; } boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { if (!(this_present_gatewayId && that_present_gatewayId)) return false; if (!this.gatewayId.equals(that.gatewayId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userName = true && (isSetUserName()); list.add(present_userName); if (present_userName) list.add(userName); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getUserProfileByName_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); if (lastComparison != 0) { return lastComparison; } if (isSetUserName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getUserProfileByName_args("); boolean first = true; sb.append("userName:"); if (this.userName == null) { sb.append("null"); } else { sb.append(this.userName); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userName == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getUserProfileByName_argsStandardSchemeFactory implements SchemeFactory { public getUserProfileByName_argsStandardScheme getScheme() { return new getUserProfileByName_argsStandardScheme(); } } private static class getUserProfileByName_argsStandardScheme extends StandardScheme<getUserProfileByName_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileByName_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: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(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, getUserProfileByName_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userName != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.userName); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserProfileByName_argsTupleSchemeFactory implements SchemeFactory { public getUserProfileByName_argsTupleScheme getScheme() { return new getUserProfileByName_argsTupleScheme(); } } private static class getUserProfileByName_argsTupleScheme extends TupleScheme<getUserProfileByName_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.userName); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userName = iprot.readString(); struct.setUserNameIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getUserProfileByName_result implements org.apache.thrift.TBase<getUserProfileByName_result, getUserProfileByName_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileByName_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileByName_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 org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getUserProfileByName_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUserProfileByName_resultTupleSchemeFactory()); } public org.apache.airavata.model.user.UserProfile success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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, org.apache.airavata.model.user.UserProfile.class))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileByName_result.class, metaDataMap); } public getUserProfileByName_result() { } public getUserProfileByName_result( org.apache.airavata.model.user.UserProfile success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public getUserProfileByName_result(getUserProfileByName_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.user.UserProfile(other.success); } if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public getUserProfileByName_result deepCopy() { return new getUserProfileByName_result(this); } @Override public void clear() { this.success = null; this.userProfileException = null; } public org.apache.airavata.model.user.UserProfile getSuccess() { return this.success; } public getUserProfileByName_result setSuccess(org.apache.airavata.model.user.UserProfile 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 org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public getUserProfileByName_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.user.UserProfile)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getUserProfileByName_result) return this.equals((getUserProfileByName_result)that); return false; } public boolean equals(getUserProfileByName_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; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(getUserProfileByName_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getUserProfileByName_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 getUserProfileByName_resultStandardSchemeFactory implements SchemeFactory { public getUserProfileByName_resultStandardScheme getScheme() { return new getUserProfileByName_resultStandardScheme(); } } private static class getUserProfileByName_resultStandardScheme extends StandardScheme<getUserProfileByName_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileByName_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 org.apache.airavata.model.user.UserProfile(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, getUserProfileByName_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(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserProfileByName_resultTupleSchemeFactory implements SchemeFactory { public getUserProfileByName_resultTupleScheme getScheme() { return new getUserProfileByName_resultTupleScheme(); } } private static class getUserProfileByName_resultTupleScheme extends TupleScheme<getUserProfileByName_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.user.UserProfile(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } public static class doesUserExist_args implements org.apache.thrift.TBase<doesUserExist_args, doesUserExist_args._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserExist_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserExist_args"); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new doesUserExist_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new doesUserExist_argsTupleSchemeFactory()); } public String userName; // required public String gatewayId; // 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 { USER_NAME((short)1, "userName"), GATEWAY_ID((short)2, "gatewayId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // USER_NAME return USER_NAME; case 2: // GATEWAY_ID return GATEWAY_ID; 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserExist_args.class, metaDataMap); } public doesUserExist_args() { } public doesUserExist_args( String userName, String gatewayId) { this(); this.userName = userName; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public doesUserExist_args(doesUserExist_args other) { if (other.isSetUserName()) { this.userName = other.userName; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public doesUserExist_args deepCopy() { return new doesUserExist_args(this); } @Override public void clear() { this.userName = null; this.gatewayId = null; } public String getUserName() { return this.userName; } public doesUserExist_args setUserName(String userName) { this.userName = userName; return this; } public void unsetUserName() { this.userName = null; } /** Returns true if field userName is set (has been assigned a value) and false otherwise */ public boolean isSetUserName() { return this.userName != null; } public void setUserNameIsSet(boolean value) { if (!value) { this.userName = null; } } public String getGatewayId() { return this.gatewayId; } public doesUserExist_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } public void unsetGatewayId() { this.gatewayId = null; } /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ public boolean isSetGatewayId() { return this.gatewayId != null; } public void setGatewayIdIsSet(boolean value) { if (!value) { this.gatewayId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_NAME: if (value == null) { unsetUserName(); } else { setUserName((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_NAME: return getUserName(); case GATEWAY_ID: return getGatewayId(); } 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 USER_NAME: return isSetUserName(); case GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof doesUserExist_args) return this.equals((doesUserExist_args)that); return false; } public boolean equals(doesUserExist_args that) { if (that == null) return false; boolean this_present_userName = true && this.isSetUserName(); boolean that_present_userName = true && that.isSetUserName(); if (this_present_userName || that_present_userName) { if (!(this_present_userName && that_present_userName)) return false; if (!this.userName.equals(that.userName)) return false; } boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { if (!(this_present_gatewayId && that_present_gatewayId)) return false; if (!this.gatewayId.equals(that.gatewayId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_userName = true && (isSetUserName()); list.add(present_userName); if (present_userName) list.add(userName); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(doesUserExist_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); if (lastComparison != 0) { return lastComparison; } if (isSetUserName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("doesUserExist_args("); boolean first = true; sb.append("userName:"); if (this.userName == null) { sb.append("null"); } else { sb.append(this.userName); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (userName == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 doesUserExist_argsStandardSchemeFactory implements SchemeFactory { public doesUserExist_argsStandardScheme getScheme() { return new doesUserExist_argsStandardScheme(); } } private static class doesUserExist_argsStandardScheme extends StandardScheme<doesUserExist_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, doesUserExist_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: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(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, doesUserExist_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userName != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.userName); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class doesUserExist_argsTupleSchemeFactory implements SchemeFactory { public doesUserExist_argsTupleScheme getScheme() { return new doesUserExist_argsTupleScheme(); } } private static class doesUserExist_argsTupleScheme extends TupleScheme<doesUserExist_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, doesUserExist_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.userName); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, doesUserExist_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.userName = iprot.readString(); struct.setUserNameIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class doesUserExist_result implements org.apache.thrift.TBase<doesUserExist_result, doesUserExist_result._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserExist_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserExist_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField USER_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new doesUserExist_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new doesUserExist_resultTupleSchemeFactory()); } public boolean success; // required public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException; // 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"), USER_PROFILE_EXCEPTION((short)1, "userProfileException"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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; case 1: // USER_PROFILE_EXCEPTION return USER_PROFILE_EXCEPTION; 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.USER_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("userProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserExist_result.class, metaDataMap); } public doesUserExist_result() { } public doesUserExist_result( boolean success, org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this(); this.success = success; setSuccessIsSet(true); this.userProfileException = userProfileException; } /** * Performs a deep copy on <i>other</i>. */ public doesUserExist_result(doesUserExist_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetUserProfileException()) { this.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(other.userProfileException); } } public doesUserExist_result deepCopy() { return new doesUserExist_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.userProfileException = null; } public boolean isSuccess() { return this.success; } public doesUserExist_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException getUserProfileException() { return this.userProfileException; } public doesUserExist_result setUserProfileException(org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException userProfileException) { this.userProfileException = userProfileException; return this; } public void unsetUserProfileException() { this.userProfileException = null; } /** Returns true if field userProfileException is set (has been assigned a value) and false otherwise */ public boolean isSetUserProfileException() { return this.userProfileException != null; } public void setUserProfileExceptionIsSet(boolean value) { if (!value) { this.userProfileException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case USER_PROFILE_EXCEPTION: if (value == null) { unsetUserProfileException(); } else { setUserProfileException((org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case USER_PROFILE_EXCEPTION: return getUserProfileException(); } 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(); case USER_PROFILE_EXCEPTION: return isSetUserProfileException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof doesUserExist_result) return this.equals((doesUserExist_result)that); return false; } public boolean equals(doesUserExist_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_userProfileException = true && this.isSetUserProfileException(); boolean that_present_userProfileException = true && that.isSetUserProfileException(); if (this_present_userProfileException || that_present_userProfileException) { if (!(this_present_userProfileException && that_present_userProfileException)) return false; if (!this.userProfileException.equals(that.userProfileException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_userProfileException = true && (isSetUserProfileException()); list.add(present_userProfileException); if (present_userProfileException) list.add(userProfileException); return list.hashCode(); } @Override public int compareTo(doesUserExist_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; } } lastComparison = Boolean.valueOf(isSetUserProfileException()).compareTo(other.isSetUserProfileException()); if (lastComparison != 0) { return lastComparison; } if (isSetUserProfileException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userProfileException, other.userProfileException); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("doesUserExist_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("userProfileException:"); if (this.userProfileException == null) { sb.append("null"); } else { sb.append(this.userProfileException); } 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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 doesUserExist_resultStandardSchemeFactory implements SchemeFactory { public doesUserExist_resultStandardScheme getScheme() { return new doesUserExist_resultStandardScheme(); } } private static class doesUserExist_resultStandardScheme extends StandardScheme<doesUserExist_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, doesUserExist_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.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // USER_PROFILE_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(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, doesUserExist_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.userProfileException != null) { oprot.writeFieldBegin(USER_PROFILE_EXCEPTION_FIELD_DESC); struct.userProfileException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class doesUserExist_resultTupleSchemeFactory implements SchemeFactory { public doesUserExist_resultTupleScheme getScheme() { return new doesUserExist_resultTupleScheme(); } } private static class doesUserExist_resultTupleScheme extends TupleScheme<doesUserExist_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, doesUserExist_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetUserProfileException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetUserProfileException()) { struct.userProfileException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, doesUserExist_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.userProfileException = new org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException(); struct.userProfileException.read(iprot); struct.setUserProfileExceptionIsSet(true); } } } } }