blob: e626d2453a81fec1b3a9ab06886f01af59e2240c [file] [log] [blame]
/**
* 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.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.service.profile.user.cpi;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class UserProfileService {
public interface Iface extends org.apache.airavata.base.api.BaseAPI.Iface {
public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException;
/**
* Create an initial UserProfile based on information in the IAM service for this user.
*
* @param authzToken
*/
public java.lang.String initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.lang.String addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public org.apache.airavata.model.user.UserProfile getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.user.UserProfile> getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean doesUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.airavata.base.api.BaseAPI .AsyncIface {
public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException;
public void deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
public void doesUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.airavata.base.api.BaseAPI.Client 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 java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException
{
send_getAPIVersion();
return recv_getAPIVersion();
}
public void send_getAPIVersion() throws org.apache.thrift.TException
{
getAPIVersion_args args = new getAPIVersion_args();
sendBase("getAPIVersion", args);
}
public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException
{
getAPIVersion_result result = new getAPIVersion_result();
receiveBase(result, "getAPIVersion");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
}
public java.lang.String initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_initializeUserProfile(authzToken);
return recv_initializeUserProfile();
}
public void send_initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
{
initializeUserProfile_args args = new initializeUserProfile_args();
args.setAuthzToken(authzToken);
sendBase("initializeUserProfile", args);
}
public java.lang.String recv_initializeUserProfile() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
initializeUserProfile_result result = new initializeUserProfile_result();
receiveBase(result, "initializeUserProfile");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeUserProfile failed: unknown result");
}
public java.lang.String addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_addUserProfile(authzToken, userProfile);
return recv_addUserProfile();
}
public void send_addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException
{
addUserProfile_args args = new addUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserProfile(userProfile);
sendBase("addUserProfile", args);
}
public java.lang.String recv_addUserProfile() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
addUserProfile_result result = new addUserProfile_result();
receiveBase(result, "addUserProfile");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addUserProfile failed: unknown result");
}
public boolean updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_updateUserProfile(authzToken, userProfile);
return recv_updateUserProfile();
}
public void send_updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException
{
updateUserProfile_args args = new updateUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserProfile(userProfile);
sendBase("updateUserProfile", args);
}
public boolean recv_updateUserProfile() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
updateUserProfile_result result = new updateUserProfile_result();
receiveBase(result, "updateUserProfile");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateUserProfile failed: unknown result");
}
public org.apache.airavata.model.user.UserProfile getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getUserProfileById(authzToken, userId, gatewayId);
return recv_getUserProfileById();
}
public void send_getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
getUserProfileById_args args = new getUserProfileById_args();
args.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
sendBase("getUserProfileById", args);
}
public org.apache.airavata.model.user.UserProfile recv_getUserProfileById() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getUserProfileById_result result = new getUserProfileById_result();
receiveBase(result, "getUserProfileById");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserProfileById failed: unknown result");
}
public boolean deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_deleteUserProfile(authzToken, userId, gatewayId);
return recv_deleteUserProfile();
}
public void send_deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
deleteUserProfile_args args = new deleteUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
sendBase("deleteUserProfile", args);
}
public boolean recv_deleteUserProfile() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
deleteUserProfile_result result = new deleteUserProfile_result();
receiveBase(result, "deleteUserProfile");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteUserProfile failed: unknown result");
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getAllUserProfilesInGateway(authzToken, gatewayId, offset, limit);
return recv_getAllUserProfilesInGateway();
}
public void send_getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit) throws org.apache.thrift.TException
{
getAllUserProfilesInGateway_args args = new getAllUserProfilesInGateway_args();
args.setAuthzToken(authzToken);
args.setGatewayId(gatewayId);
args.setOffset(offset);
args.setLimit(limit);
sendBase("getAllUserProfilesInGateway", args);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> recv_getAllUserProfilesInGateway() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result();
receiveBase(result, "getAllUserProfilesInGateway");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserProfilesInGateway failed: unknown result");
}
public boolean doesUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_doesUserExist(authzToken, userId, gatewayId);
return recv_doesUserExist();
}
public void send_doesUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
doesUserExist_args args = new doesUserExist_args();
args.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
sendBase("doesUserExist", args);
}
public boolean recv_doesUserExist() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
doesUserExist_result result = new doesUserExist_result();
receiveBase(result, "doesUserExist");
if (result.isSetSuccess()) {
return result.success;
}
if (result.upe != null) {
throw result.upe;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserExist failed: unknown result");
}
}
public static class AsyncClient extends org.apache.airavata.base.api.BaseAPI.AsyncClient 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 getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAPIVersion_args args = new getAPIVersion_args();
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_getAPIVersion();
}
}
public void initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
initializeUserProfile_call method_call = new initializeUserProfile_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class initializeUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
private org.apache.airavata.model.security.AuthzToken authzToken;
public initializeUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.authzToken = authzToken;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0));
initializeUserProfile_args args = new initializeUserProfile_args();
args.setAuthzToken(authzToken);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_initializeUserProfile();
}
}
public void addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
addUserProfile_call method_call = new addUserProfile_call(authzToken, userProfile, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.user.UserProfile userProfile;
public addUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.authzToken = authzToken;
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.setAuthzToken(authzToken);
args.setUserProfile(userProfile);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateUserProfile_call method_call = new updateUserProfile_call(authzToken, userProfile, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class updateUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.user.UserProfile userProfile;
public updateUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.authzToken = authzToken;
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.setAuthzToken(authzToken);
args.setUserProfile(userProfile);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserProfileById_call method_call = new getUserProfileById_call(authzToken, 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<org.apache.airavata.model.user.UserProfile> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String userId;
private java.lang.String gatewayId;
public getUserProfileById_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> 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.authzToken = authzToken;
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.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public org.apache.airavata.model.user.UserProfile getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteUserProfile_call method_call = new deleteUserProfile_call(authzToken, userId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String userId;
private java.lang.String gatewayId;
public deleteUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.authzToken = authzToken;
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("deleteUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteUserProfile_args args = new deleteUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllUserProfilesInGateway_call method_call = new getAllUserProfilesInGateway_call(authzToken, 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<java.util.List<org.apache.airavata.model.user.UserProfile>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String gatewayId;
private int offset;
private int limit;
public getAllUserProfilesInGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> 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.authzToken = authzToken;
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.setAuthzToken(authzToken);
args.setGatewayId(gatewayId);
args.setOffset(offset);
args.setLimit(limit);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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 doesUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
doesUserExist_call method_call = new doesUserExist_call(authzToken, userId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class doesUserExist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String userId;
private java.lang.String gatewayId;
public doesUserExist_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.authzToken = authzToken;
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("doesUserExist", org.apache.thrift.protocol.TMessageType.CALL, 0));
doesUserExist_args args = new doesUserExist_args();
args.setAuthzToken(authzToken);
args.setUserId(userId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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.airavata.base.api.BaseAPI.Processor<I> implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("initializeUserProfile", new initializeUserProfile());
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("doesUserExist", new doesUserExist());
return processMap;
}
public static class getAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAPIVersion_args> {
public getAPIVersion() {
super("getAPIVersion");
}
public getAPIVersion_args getEmptyArgsInstance() {
return new getAPIVersion_args();
}
protected boolean isOneway() {
return false;
}
public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
getAPIVersion_result result = new getAPIVersion_result();
try {
result.success = iface.getAPIVersion();
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
}
return result;
}
}
public static class initializeUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeUserProfile_args> {
public initializeUserProfile() {
super("initializeUserProfile");
}
public initializeUserProfile_args getEmptyArgsInstance() {
return new initializeUserProfile_args();
}
protected boolean isOneway() {
return false;
}
public initializeUserProfile_result getResult(I iface, initializeUserProfile_args args) throws org.apache.thrift.TException {
initializeUserProfile_result result = new initializeUserProfile_result();
try {
result.success = iface.initializeUserProfile(args.authzToken);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
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.authzToken, args.userProfile);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
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.authzToken, args.userProfile);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
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.authzToken, args.userId, args.gatewayId);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
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.authzToken, args.userId, args.gatewayId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
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.authzToken, args.gatewayId, args.offset, args.limit);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
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.authzToken, args.userId, args.gatewayId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
result.upe = upe;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.airavata.base.api.BaseAPI.AsyncProcessor<I> {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("initializeUserProfile", new initializeUserProfile());
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("doesUserExist", new doesUserExist());
return processMap;
}
public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, java.lang.String> {
public getAPIVersion() {
super("getAPIVersion");
}
public getAPIVersion_args getEmptyArgsInstance() {
return new getAPIVersion_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
getAPIVersion_result result = new getAPIVersion_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getAPIVersion_result result = new getAPIVersion_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.getAPIVersion(resultHandler);
}
}
public static class initializeUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, initializeUserProfile_args, java.lang.String> {
public initializeUserProfile() {
super("initializeUserProfile");
}
public initializeUserProfile_args getEmptyArgsInstance() {
return new initializeUserProfile_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
initializeUserProfile_result result = new initializeUserProfile_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
initializeUserProfile_result result = new initializeUserProfile_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, initializeUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.initializeUserProfile(args.authzToken,resultHandler);
}
}
public static class addUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserProfile_args, java.lang.String> {
public addUserProfile() {
super("addUserProfile");
}
public addUserProfile_args getEmptyArgsInstance() {
return new addUserProfile_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
addUserProfile_result result = new addUserProfile_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
addUserProfile_result result = new addUserProfile_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.addUserProfile(args.authzToken, args.userProfile,resultHandler);
}
}
public static class updateUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserProfile_args, java.lang.Boolean> {
public updateUserProfile() {
super("updateUserProfile");
}
public updateUserProfile_args getEmptyArgsInstance() {
return new updateUserProfile_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
updateUserProfile_result result = new updateUserProfile_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.updateUserProfile(args.authzToken, 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 org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getUserProfileById_result result = new getUserProfileById_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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 org.apache.thrift.TException {
iface.getUserProfileById(args.authzToken, args.userId, args.gatewayId,resultHandler);
}
}
public static class deleteUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserProfile_args, java.lang.Boolean> {
public deleteUserProfile() {
super("deleteUserProfile");
}
public deleteUserProfile_args getEmptyArgsInstance() {
return new deleteUserProfile_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
deleteUserProfile_result result = new deleteUserProfile_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.deleteUserProfile(args.authzToken, args.userId, args.gatewayId,resultHandler);
}
}
public static class getAllUserProfilesInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserProfilesInGateway_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
public getAllUserProfilesInGateway() {
super("getAllUserProfilesInGateway");
}
public getAllUserProfilesInGateway_args getEmptyArgsInstance() {
return new getAllUserProfilesInGateway_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() {
public void onComplete(java.util.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
iface.getAllUserProfilesInGateway(args.authzToken, args.gatewayId, args.offset, args.limit,resultHandler);
}
}
public static class doesUserExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserExist_args, java.lang.Boolean> {
public doesUserExist() {
super("doesUserExist");
}
public doesUserExist_args getEmptyArgsInstance() {
return new doesUserExist_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
doesUserExist_result result = new doesUserExist_result();
if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
result.setUpeIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.doesUserExist(args.authzToken, args.userId, args.gatewayId,resultHandler);
}
}
}
public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
}
public getAPIVersion_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_args(getAPIVersion_args other) {
}
public getAPIVersion_args deepCopy() {
return new getAPIVersion_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAPIVersion_args)
return this.equals((getAPIVersion_args)that);
return false;
}
public boolean equals(getAPIVersion_args that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(getAPIVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 getAPIVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_argsStandardScheme getScheme() {
return new getAPIVersion_argsStandardScheme();
}
}
private static class getAPIVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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) {
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, getAPIVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAPIVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_argsTupleScheme getScheme() {
return new getAPIVersion_argsTupleScheme();
}
}
private static class getAPIVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // 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"),
UPE((short)1, "upe");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
}
public getAPIVersion_result() {
}
public getAPIVersion_result(
java.lang.String success,
org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe)
{
this();
this.success = success;
this.upe = upe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_result(getAPIVersion_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
}
public getAPIVersion_result deepCopy() {
return new getAPIVersion_result(this);
}
@Override
public void clear() {
this.success = null;
this.upe = null;
}
public java.lang.String getSuccess() {
return this.success;
}
public getAPIVersion_result setSuccess(java.lang.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.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public getAPIVersion_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case UPE:
return getUpe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAPIVersion_result)
return this.equals((getAPIVersion_result)that);
return false;
}
public boolean equals(getAPIVersion_result that) {
if (that == null)
return false;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
return hashCode;
}
@Override
public int compareTo(getAPIVersion_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_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("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
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, java.lang.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 getAPIVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_resultStandardScheme getScheme() {
return new getAPIVersion_resultStandardScheme();
}
}
private static class getAPIVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(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, getAPIVersion_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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAPIVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_resultTupleScheme getScheme() {
return new getAPIVersion_resultTupleScheme();
}
}
private static class getAPIVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class initializeUserProfile_args implements org.apache.thrift.TBase<initializeUserProfile_args, initializeUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<initializeUserProfile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeUserProfile_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new initializeUserProfile_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new initializeUserProfile_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // 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 {
AUTHZ_TOKEN((short)1, "authzToken");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeUserProfile_args.class, metaDataMap);
}
public initializeUserProfile_args() {
}
public initializeUserProfile_args(
org.apache.airavata.model.security.AuthzToken authzToken)
{
this();
this.authzToken = authzToken;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public initializeUserProfile_args(initializeUserProfile_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
}
public initializeUserProfile_args deepCopy() {
return new initializeUserProfile_args(this);
}
@Override
public void clear() {
this.authzToken = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public initializeUserProfile_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof initializeUserProfile_args)
return this.equals((initializeUserProfile_args)that);
return false;
}
public boolean equals(initializeUserProfile_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
return hashCode;
}
@Override
public int compareTo(initializeUserProfile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("initializeUserProfile_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.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, java.lang.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 initializeUserProfile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public initializeUserProfile_argsStandardScheme getScheme() {
return new initializeUserProfile_argsStandardScheme();
}
}
private static class initializeUserProfile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<initializeUserProfile_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, initializeUserProfile_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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(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, initializeUserProfile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class initializeUserProfile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public initializeUserProfile_argsTupleScheme getScheme() {
return new initializeUserProfile_argsTupleScheme();
}
}
private static class initializeUserProfile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<initializeUserProfile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, initializeUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, initializeUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class initializeUserProfile_result implements org.apache.thrift.TBase<initializeUserProfile_result, initializeUserProfile_result._Fields>, java.io.Serializable, Cloneable, Comparable<initializeUserProfile_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeUserProfile_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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new initializeUserProfile_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new initializeUserProfile_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeUserProfile_result.class, metaDataMap);
}
public initializeUserProfile_result() {
}
public initializeUserProfile_result(
java.lang.String success,
org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.upe = upe;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public initializeUserProfile_result(initializeUserProfile_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public initializeUserProfile_result deepCopy() {
return new initializeUserProfile_result(this);
}
@Override
public void clear() {
this.success = null;
this.upe = null;
this.ae = null;
}
public java.lang.String getSuccess() {
return this.success;
}
public initializeUserProfile_result setSuccess(java.lang.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.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public initializeUserProfile_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public initializeUserProfile_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof initializeUserProfile_result)
return this.equals((initializeUserProfile_result)that);
return false;
}
public boolean equals(initializeUserProfile_result that) {
if (that == null)
return false;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(initializeUserProfile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("initializeUserProfile_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("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 initializeUserProfile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public initializeUserProfile_resultStandardScheme getScheme() {
return new initializeUserProfile_resultStandardScheme();
}
}
private static class initializeUserProfile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<initializeUserProfile_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, initializeUserProfile_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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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, initializeUserProfile_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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class initializeUserProfile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public initializeUserProfile_resultTupleScheme getScheme() {
return new initializeUserProfile_resultTupleScheme();
}
}
private static class initializeUserProfile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<initializeUserProfile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, initializeUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, initializeUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addUserProfile_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addUserProfile_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
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 {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_PROFILE((short)2, "userProfile");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUserProfile_args.class, metaDataMap);
}
public addUserProfile_args() {
}
public addUserProfile_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.user.UserProfile userProfile)
{
this();
this.authzToken = authzToken;
this.userProfile = userProfile;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addUserProfile_args(addUserProfile_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
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.authzToken = null;
this.userProfile = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public addUserProfile_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = 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, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_PROFILE:
if (value == null) {
unsetUserProfile();
} else {
setUserProfile((org.apache.airavata.model.user.UserProfile)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_PROFILE:
return getUserProfile();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_PROFILE:
return isSetUserProfile();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserProfile()) ? 131071 : 524287);
if (isSetUserProfile())
hashCode = hashCode * 8191 + userProfile.hashCode();
return hashCode;
}
@Override
public int compareTo(addUserProfile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("addUserProfile_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (userProfile == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userProfile' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addUserProfile_argsStandardScheme getScheme() {
return new addUserProfile_argsStandardScheme();
}
}
private static class addUserProfile_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 org.apache.thrift.scheme.SchemeFactory {
public addUserProfile_argsTupleScheme getScheme() {
return new addUserProfile_argsTupleScheme();
}
}
private static class addUserProfile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addUserProfile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.userProfile.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userProfile = new org.apache.airavata.model.user.UserProfile();
struct.userProfile.read(iprot);
struct.setUserProfileIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addUserProfile_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addUserProfile_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUserProfile_result.class, metaDataMap);
}
public addUserProfile_result() {
}
public addUserProfile_result(
java.lang.String success,
org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.upe = upe;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addUserProfile_result(addUserProfile_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public addUserProfile_result deepCopy() {
return new addUserProfile_result(this);
}
@Override
public void clear() {
this.success = null;
this.upe = null;
this.ae = null;
}
public java.lang.String getSuccess() {
return this.success;
}
public addUserProfile_result setSuccess(java.lang.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.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public addUserProfile_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public addUserProfile_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(addUserProfile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addUserProfile_resultStandardScheme getScheme() {
return new addUserProfile_resultStandardScheme();
}
}
private static class addUserProfile_resultStandardScheme extends org.apache.thrift.scheme.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addUserProfile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addUserProfile_resultTupleScheme getScheme() {
return new addUserProfile_resultTupleScheme();
}
}
private static class addUserProfile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addUserProfile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateUserProfile_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateUserProfile_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
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 {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_PROFILE((short)2, "userProfile");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUserProfile_args.class, metaDataMap);
}
public updateUserProfile_args() {
}
public updateUserProfile_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.user.UserProfile userProfile)
{
this();
this.authzToken = authzToken;
this.userProfile = userProfile;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public updateUserProfile_args(updateUserProfile_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
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.authzToken = null;
this.userProfile = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public updateUserProfile_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = 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, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_PROFILE:
if (value == null) {
unsetUserProfile();
} else {
setUserProfile((org.apache.airavata.model.user.UserProfile)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_PROFILE:
return getUserProfile();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_PROFILE:
return isSetUserProfile();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserProfile()) ? 131071 : 524287);
if (isSetUserProfile())
hashCode = hashCode * 8191 + userProfile.hashCode();
return hashCode;
}
@Override
public int compareTo(updateUserProfile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("updateUserProfile_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (userProfile == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userProfile' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_argsStandardScheme getScheme() {
return new updateUserProfile_argsStandardScheme();
}
}
private static class updateUserProfile_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_argsTupleScheme getScheme() {
return new updateUserProfile_argsTupleScheme();
}
}
private static class updateUserProfile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateUserProfile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.userProfile.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userProfile = new org.apache.airavata.model.user.UserProfile();
struct.userProfile.read(iprot);
struct.setUserProfileIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateUserProfile_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateUserProfile_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.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.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.upe = upe;
this.ae = ae;
}
/**
* 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.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public updateUserProfile_result deepCopy() {
return new updateUserProfile_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.upe = null;
this.ae = 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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public updateUserProfile_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public updateUserProfile_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(updateUserProfile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("updateUserProfile_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_resultStandardScheme getScheme() {
return new updateUserProfile_resultStandardScheme();
}
}
private static class updateUserProfile_resultStandardScheme extends org.apache.thrift.scheme.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class updateUserProfile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_resultTupleScheme getScheme() {
return new updateUserProfile_resultTupleScheme();
}
}
private static class updateUserProfile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateUserProfile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
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)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserProfileById_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserProfileById_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String userId; // required
public java.lang.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 {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_ID((short)2, "userId"),
GATEWAY_ID((short)3, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USER_ID
return USER_ID;
case 3: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileById_args.class, metaDataMap);
}
public getUserProfileById_args() {
}
public getUserProfileById_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String userId,
java.lang.String gatewayId)
{
this();
this.authzToken = authzToken;
this.userId = userId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUserProfileById_args(getUserProfileById_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
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.authzToken = null;
this.userId = null;
this.gatewayId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getUserProfileById_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUserId() {
return this.userId;
}
public getUserProfileById_args setUserId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getUserProfileById_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_ID:
return getUserId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_ID:
return isSetUserId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
if (isSetUserId())
hashCode = hashCode * 8191 + userId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getUserProfileById_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserProfileById_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
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
if (authzToken != null) {
authzToken.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getUserProfileById_argsStandardScheme getScheme() {
return new getUserProfileById_argsStandardScheme();
}
}
private static class getUserProfileById_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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 3: // 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.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 org.apache.thrift.scheme.SchemeFactory {
public getUserProfileById_argsTupleScheme getScheme() {
return new getUserProfileById_argsTupleScheme();
}
}
private static class getUserProfileById_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserProfileById_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserProfileById_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserProfileById_resultTupleSchemeFactory();
public org.apache.airavata.model.user.UserProfile success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.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.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.upe = upe;
this.ae = ae;
}
/**
* 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.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getUserProfileById_result deepCopy() {
return new getUserProfileById_result(this);
}
@Override
public void clear() {
this.success = null;
this.upe = null;
this.ae = 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.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public getUserProfileById_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getUserProfileById_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((org.apache.airavata.model.user.UserProfile)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getUserProfileById_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getUserProfileById_resultStandardScheme getScheme() {
return new getUserProfileById_resultStandardScheme();
}
}
private static class getUserProfileById_resultStandardScheme extends org.apache.thrift.scheme.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUserProfileById_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUserProfileById_resultTupleScheme getScheme() {
return new getUserProfileById_resultTupleScheme();
}
}
private static class getUserProfileById_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserProfileById_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileById_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
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.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
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)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteUserProfile_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteUserProfile_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String userId; // required
public java.lang.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 {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_ID((short)2, "userId"),
GATEWAY_ID((short)3, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USER_ID
return USER_ID;
case 3: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteUserProfile_args.class, metaDataMap);
}
public deleteUserProfile_args() {
}
public deleteUserProfile_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String userId,
java.lang.String gatewayId)
{
this();
this.authzToken = authzToken;
this.userId = userId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteUserProfile_args(deleteUserProfile_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserId()) {
this.userId = other.userId;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public deleteUserProfile_args deepCopy() {
return new deleteUserProfile_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userId = null;
this.gatewayId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public deleteUserProfile_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUserId() {
return this.userId;
}
public deleteUserProfile_args setUserId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public deleteUserProfile_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_ID:
return getUserId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_ID:
return isSetUserId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
if (isSetUserId())
hashCode = hashCode * 8191 + userId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteUserProfile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteUserProfile_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
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
if (authzToken != null) {
authzToken.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deleteUserProfile_argsStandardScheme getScheme() {
return new deleteUserProfile_argsStandardScheme();
}
}
private static class deleteUserProfile_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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 3: // 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, deleteUserProfile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 deleteUserProfile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUserProfile_argsTupleScheme getScheme() {
return new deleteUserProfile_argsTupleScheme();
}
}
private static class deleteUserProfile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteUserProfile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.userId);
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteUserProfile_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteUserProfile_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.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.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.upe = upe;
this.ae = ae;
}
/**
* 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.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public deleteUserProfile_result deepCopy() {
return new deleteUserProfile_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.upe = null;
this.ae = 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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public deleteUserProfile_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public deleteUserProfile_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteUserProfile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteUserProfile_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deleteUserProfile_resultStandardScheme getScheme() {
return new deleteUserProfile_resultStandardScheme();
}
}
private static class deleteUserProfile_resultStandardScheme extends org.apache.thrift.scheme.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteUserProfile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUserProfile_resultTupleScheme getScheme() {
return new deleteUserProfile_resultTupleScheme();
}
}
private static class deleteUserProfile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteUserProfile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (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 org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)3);
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)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllUserProfilesInGateway_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllUserProfilesInGateway_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.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 {
AUTHZ_TOKEN((short)1, "authzToken"),
GATEWAY_ID((short)2, "gatewayId"),
OFFSET((short)3, "offset"),
LIMIT((short)4, "limit");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // GATEWAY_ID
return GATEWAY_ID;
case 3: // OFFSET
return OFFSET;
case 4: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.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 java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserProfilesInGateway_args.class, metaDataMap);
}
public getAllUserProfilesInGateway_args() {
}
public getAllUserProfilesInGateway_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String gatewayId,
int offset,
int limit)
{
this();
this.authzToken = authzToken;
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.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
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.authzToken = null;
this.gatewayId = null;
setOffsetIsSet(false);
this.offset = 0;
setLimitIsSet(false);
this.limit = 0;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getAllUserProfilesInGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
public getAllUserProfilesInGateway_args setGatewayId(java.lang.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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
}
public void setOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID);
}
public void setLimitIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
case OFFSET:
if (value == null) {
unsetOffset();
} else {
setOffset((java.lang.Integer)value);
}
break;
case LIMIT:
if (value == null) {
unsetLimit();
} else {
setLimit((java.lang.Integer)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GATEWAY_ID:
return getGatewayId();
case OFFSET:
return getOffset();
case LIMIT:
return getLimit();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case GATEWAY_ID:
return isSetGatewayId();
case OFFSET:
return isSetOffset();
case LIMIT:
return isSetLimit();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
hashCode = hashCode * 8191 + offset;
hashCode = hashCode * 8191 + limit;
return hashCode;
}
@Override
public int compareTo(getAllUserProfilesInGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAllUserProfilesInGateway_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
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
if (authzToken != null) {
authzToken.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllUserProfilesInGateway_argsStandardScheme getScheme() {
return new getAllUserProfilesInGateway_argsStandardScheme();
}
}
private static class getAllUserProfilesInGateway_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(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;
case 3: // 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 4: // 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.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 org.apache.thrift.scheme.SchemeFactory {
public getAllUserProfilesInGateway_argsTupleScheme getScheme() {
return new getAllUserProfilesInGateway_argsTupleScheme();
}
}
private static class getAllUserProfilesInGateway_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllUserProfilesInGateway_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
struct.offset = iprot.readI32();
struct.setOffsetIsSet(true);
struct.limit = iprot.readI32();
struct.setLimitIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllUserProfilesInGateway_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllUserProfilesInGateway_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.user.UserProfile> success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserProfilesInGateway_result.class, metaDataMap);
}
public getAllUserProfilesInGateway_result() {
}
public getAllUserProfilesInGateway_result(
java.util.List<org.apache.airavata.model.user.UserProfile> success,
org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.upe = upe;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAllUserProfilesInGateway_result(getAllUserProfilesInGateway_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.user.UserProfile> __this__success = new java.util.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.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getAllUserProfilesInGateway_result deepCopy() {
return new getAllUserProfilesInGateway_result(this);
}
@Override
public void clear() {
this.success = null;
this.upe = null;
this.ae = 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 java.util.ArrayList<org.apache.airavata.model.user.UserProfile>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getSuccess() {
return this.success;
}
public getAllUserProfilesInGateway_result setSuccess(java.util.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.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public getAllUserProfilesInGateway_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getAllUserProfilesInGateway_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List<org.apache.airavata.model.user.UserProfile>)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllUserProfilesInGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllUserProfilesInGateway_resultStandardScheme getScheme() {
return new getAllUserProfilesInGateway_resultStandardScheme();
}
}
private static class getAllUserProfilesInGateway_resultStandardScheme extends org.apache.thrift.scheme.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 java.util.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAllUserProfilesInGateway_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllUserProfilesInGateway_resultTupleScheme getScheme() {
return new getAllUserProfilesInGateway_resultTupleScheme();
}
}
private static class getAllUserProfilesInGateway_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllUserProfilesInGateway_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (org.apache.airavata.model.user.UserProfile _iter4 : struct.success)
{
_iter4.write(oprot);
}
}
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllUserProfilesInGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
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 java.util.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.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
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)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new doesUserExist_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new doesUserExist_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String userId; // required
public java.lang.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 {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_ID((short)2, "userId"),
GATEWAY_ID((short)3, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USER_ID
return USER_ID;
case 3: // 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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserExist_args.class, metaDataMap);
}
public doesUserExist_args() {
}
public doesUserExist_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String userId,
java.lang.String gatewayId)
{
this();
this.authzToken = authzToken;
this.userId = userId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public doesUserExist_args(doesUserExist_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserId()) {
this.userId = other.userId;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public doesUserExist_args deepCopy() {
return new doesUserExist_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userId = null;
this.gatewayId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public doesUserExist_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUserId() {
return this.userId;
}
public doesUserExist_args setUserId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public doesUserExist_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_ID:
return getUserId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_ID:
return isSetUserId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
if (isSetUserId())
hashCode = hashCode * 8191 + userId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(doesUserExist_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("doesUserExist_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
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 (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
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
if (authzToken != null) {
authzToken.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public doesUserExist_argsStandardScheme getScheme() {
return new doesUserExist_argsStandardScheme();
}
}
private static class doesUserExist_argsStandardScheme extends org.apache.thrift.scheme.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: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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 3: // 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.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
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 doesUserExist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public doesUserExist_argsTupleScheme getScheme() {
return new doesUserExist_argsTupleScheme();
}
}
private static class doesUserExist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<doesUserExist_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, doesUserExist_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.userId);
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, doesUserExist_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new doesUserExist_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new doesUserExist_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
public org.apache.airavata.model.error.AuthorizationException ae; // 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"),
UPE((short)1, "upe"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // UPE
return UPE;
case 2: // AE
return AE;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.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.service.profile.user.cpi.exception.UserProfileServiceException upe,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.upe = upe;
this.ae = ae;
}
/**
* 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.isSetUpe()) {
this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public doesUserExist_result deepCopy() {
return new doesUserExist_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.upe = null;
this.ae = 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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
return this.upe;
}
public doesUserExist_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
this.upe = upe;
return this;
}
public void unsetUpe() {
this.upe = null;
}
/** Returns true if field upe is set (has been assigned a value) and false otherwise */
public boolean isSetUpe() {
return this.upe != null;
}
public void setUpeIsSet(boolean value) {
if (!value) {
this.upe = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public doesUserExist_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case UPE:
if (value == null) {
unsetUpe();
} else {
setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case UPE:
return getUpe();
case AE:
return getAe();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case UPE:
return isSetUpe();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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_upe = true && this.isSetUpe();
boolean that_present_upe = true && that.isSetUpe();
if (this_present_upe || that_present_upe) {
if (!(this_present_upe && that_present_upe))
return false;
if (!this.upe.equals(that.upe))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
if (isSetUpe())
hashCode = hashCode * 8191 + upe.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(doesUserExist_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("doesUserExist_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("upe:");
if (this.upe == null) {
sb.append("null");
} else {
sb.append(this.upe);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public doesUserExist_resultStandardScheme getScheme() {
return new doesUserExist_resultStandardScheme();
}
}
private static class doesUserExist_resultStandardScheme extends org.apache.thrift.scheme.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: // UPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(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.upe != null) {
oprot.writeFieldBegin(UPE_FIELD_DESC);
struct.upe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class doesUserExist_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public doesUserExist_resultTupleScheme getScheme() {
return new doesUserExist_resultTupleScheme();
}
}
private static class doesUserExist_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<doesUserExist_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, doesUserExist_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetUpe()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetUpe()) {
struct.upe.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, doesUserExist_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
struct.upe.read(iprot);
struct.setUpeIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}